linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: linux-mm@kvack.org, David Herrmann <dh.herrmann@gmail.com>,
	yshuiv7@gmail.com
Cc: bugzilla-daemon@kernel.org
Subject: Re: [Bug 217238] New: Creating shared read-only map is denied after add write seal to a memfd
Date: Fri, 24 Mar 2023 13:36:46 -0700	[thread overview]
Message-ID: <20230324133646.16101dfa666f253c4715d965@linux-foundation.org> (raw)
In-Reply-To: <bug-217238-27@https.bugzilla.kernel.org/>

(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@kernel.org 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@linux-foundation.org
>           Reporter: yshuiv7@gmail.com
>         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.


       reply	other threads:[~2023-03-24 20:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-217238-27@https.bugzilla.kernel.org/>
2023-03-24 20:36 ` Andrew Morton [this message]
2023-03-25 14:51   ` Lorenzo Stoakes
2023-03-30 19:24     ` Lorenzo Stoakes
2023-03-30 20:47       ` Andy Lutomirski
2023-03-30 21:46         ` Lorenzo Stoakes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230324133646.16101dfa666f253c4715d965@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bugzilla-daemon@kernel.org \
    --cc=dh.herrmann@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=yshuiv7@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox