[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zm9e0OpCaucP4836@casper.infradead.org>
Date: Sun, 16 Jun 2024 22:53:20 +0100
From: Matthew Wilcox <willy@...radead.org>
To: David Laight <David.Laight@...lab.com>
Cc: 'Sagi Grimberg' <sagi@...mberg.me>,
kernel test robot <oliver.sang@...el.com>,
"oe-lkp@...ts.linux.dev" <oe-lkp@...ts.linux.dev>,
"lkp@...el.com" <lkp@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH] net: micro-optimize skb_datagram_iter
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.
Powered by blists - more mailing lists