netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: David Laight <David.Laight@aculab.com>
Cc: 'Sagi Grimberg' <sagi@grimberg.me>,
	kernel test robot <oliver.sang@intel.com>,
	"oe-lkp@lists.linux.dev" <oe-lkp@lists.linux.dev>,
	"lkp@intel.com" <lkp@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH] net: micro-optimize skb_datagram_iter
Date: Sun, 16 Jun 2024 22:53:20 +0100	[thread overview]
Message-ID: <Zm9e0OpCaucP4836@casper.infradead.org> (raw)
In-Reply-To: <e2bce6704b20491e8eb2edd822ae6404@AcuMS.aculab.com>

On Sun, Jun 16, 2024 at 09:51:05PM +0000, David Laight wrote:
> From: Sagi Grimberg
> > Sent: 16 June 2024 10:24
> ...
> > > [ 13.498663][ T189] EIP: usercopy_abort (mm/usercopy.c:102 (discriminator 12))
> > > [   13.499424][  T194] usercopy: Kernel memory exposure attempt detected from kmap (offset 0, size
> > 8192)!
> > 
> > Hmm, not sure I understand exactly why changing kmap() to
> > kmap_local_page() expose this,
> > but it looks like mm/usercopy does not like size=8192 when copying for
> > the skb frag.
> 
> Can't a usercopy fault and have to read the page from swap?
> So the process can sleep and then be rescheduled on a different cpu?
> So you can't use kmap_local_page() here at all.

I don't think you understand how kmap_local_page() works.

  reply	other threads:[~2024-06-16 21:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 11:35 [PATCH] net: micro-optimize skb_datagram_iter Sagi Grimberg
2024-06-15  2:40 ` patchwork-bot+netdevbpf
2024-06-16  8:06 ` kernel test robot
2024-06-16  9:24   ` Sagi Grimberg
2024-06-16 21:51     ` David Laight
2024-06-16 21:53       ` Matthew Wilcox [this message]
2024-06-17 10:18         ` David Laight
2024-06-16 21:56     ` Matthew Wilcox
2024-06-17  6:29       ` Sagi Grimberg
2024-06-17 16:58         ` Jakub Kicinski
2024-06-18  6:37           ` Sagi Grimberg
2024-06-19 12:46         ` David Howells
2024-06-19 13:54           ` Sagi Grimberg
2024-06-19 14:51             ` Eric Dumazet
2024-06-19 14:56               ` Eric Dumazet
2024-06-19 15:25               ` Sagi Grimberg
2024-06-21  7:54             ` David Howells

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=Zm9e0OpCaucP4836@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=David.Laight@aculab.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=sagi@grimberg.me \
    /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;
as well as URLs for NNTP newsgroup(s).