(switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface). On Fri, 24 Mar 2023 03:34:23 +0000 bugzilla-daemon@xxxxxxxxxx wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=217238 > > Bug ID: 217238 > Summary: Creating shared read-only map is denied after add > write seal to a memfd > Product: Memory Management > Version: 2.5 > Kernel Version: 6.2.8 > Hardware: All > OS: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: Other > Assignee: akpm@xxxxxxxxxxxxxxxxxxxx > Reporter: yshuiv7@xxxxxxxxx > Regression: No > > Test case: > > int main() { > int fd = memfd_create("test", MFD_ALLOW_SEALING); > write(fd, "test", 4); > fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE); > > void *ret = mmap(NULL, 4, PROT_READ, MAP_SHARED, fd, 0); > } > > This fails with EPERM. This is in contradiction with what's described in the > documentation of F_SEAL_WRITE. > > -- > You may reply to this email to add a comment. > > You are receiving this mail because: > You are the assignee for the bug.