From: Andrew Morton <akpm@linux-foundation.org>
To: Mike Rapoport <rppt@linux.ibm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
xingwei lee <xrivendell7@gmail.com>,
davem@davemloft.net, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
samsun1006219@gmail.com,
Linus Torvalds <torvalds@linux-foundation.org>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org
Subject: Re: BUG: unable to handle kernel paging request in crypto_sha3_update
Date: Tue, 2 Apr 2024 10:10:23 -0700 [thread overview]
Message-ID: <20240402101023.aea0f8ed981903077dcd9e6b@linux-foundation.org> (raw)
In-Reply-To: <ZgwfoSj7GqFiOOsc@linux.ibm.com>
On Tue, 2 Apr 2024 18:09:21 +0300 Mike Rapoport <rppt@linux.ibm.com> wrote:
> On Tue, Apr 02, 2024 at 04:36:11PM +0800, Herbert Xu wrote:
> > On Wed, Mar 20, 2024 at 10:57:53AM +0800, xingwei lee wrote:
> > >
> > > syscall(__NR_bind, /*fd=*/r[0], /*addr=*/0x20000000ul, /*addrlen=*/0x58ul);
> > > res = syscall(__NR_accept, /*fd=*/r[0], /*peer=*/0ul, /*peerlen=*/0ul);
> > > if (res != -1)
> > > r[1] = res;
> > > res = syscall(__NR_memfd_secret, /*flags=*/0ul);
> > > if (res != -1)
> > > r[2] = res;
> >
> > So this is the key to the issue. The whole point of memfd_secret is
> > to make the pages inaccessible to the kernel. The issue is those
> > pages are then gifted to the kernel through sendmsg. Somewhere
> > along the line someone is supposed to throw up an error about this,
> > or map the pages properly. I guess neither happened which is why
> > we end up with a page fault.
>
> Yeah, there was a bug in folio_is_secretmem() that should have throw an
> error about this.
>
> David Hildenbrand sent a fix, it's in Andrew's tree
>
> https://lore.kernel.org/all/20240326143210.291116-1-david@redhat.com
I'll send "mm/secretmem: fix GUP-fast succeeding on secretmem folios"
upstream this week.
next prev parent reply other threads:[~2024-04-02 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 2:57 xingwei lee
2024-04-02 8:36 ` Herbert Xu
2024-04-02 15:09 ` Mike Rapoport
2024-04-02 17:10 ` Andrew Morton [this message]
2024-04-03 4:34 ` Herbert Xu
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=20240402101023.aea0f8ed981903077dcd9e6b@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rppt@linux.ibm.com \
--cc=samsun1006219@gmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=torvalds@linux-foundation.org \
--cc=xrivendell7@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
all inboxes | Powered by JetHome®