lkml.org 
[lkml]   [2022]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] x86/dumpstack: Inline copy_from_user_nmi()
On Mon, Sep 19, 2022 at 04:46:39PM +0200, Peter Zijlstra wrote:
> On Fri, Sep 16, 2022 at 12:57:23PM -0700, Andrew Morton wrote:
> > Why is this so complicated.
> >
> > There's virtually zero value in running all those debug checks from within
> > copy_from_user_nmi().
> >
> > --- a/arch/x86/lib/usercopy.c~a
> > +++ a/arch/x86/lib/usercopy.c
> > @@ -44,7 +44,7 @@ copy_from_user_nmi(void *to, const void
> > * called from other contexts.
> > */
> > pagefault_disable();
> > - ret = __copy_from_user_inatomic(to, from, n);
> > + ret = raw_copy_from_user(to, from, n);
> > pagefault_enable();
> >
> > return ret;
>
> I'm with Andrew here; this looks a *LOT* saner than all the other stuff.

Yeah, I'd agree -- it's a special case of a special case. I'll send a
new patch.

Thanks!

--
Kees Cook

\
 
 \ /
  Last update: 2022-09-19 21:26    [W:0.036 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site