[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170622155549.57dfc856@alans-desktop>
Date: Thu, 22 Jun 2017 15:55:49 +0100
From: Alan Cox <gnomes@...rguk.ukuu.org.uk>
To: Kees Cook <keescook@...omium.org>
Cc: Paolo Abeni <pabeni@...hat.com>, "x86@...nel.org" <x86@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Al Viro <viro@...iv.linux.org.uk>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/uaccess: use unrolled string copy for short strings
> > diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h
> > index c5504b9..16a8871 100644
> > --- a/arch/x86/include/asm/uaccess_64.h
> > +++ b/arch/x86/include/asm/uaccess_64.h
> > @@ -28,6 +28,9 @@ copy_user_generic(void *to, const void *from, unsigned len)
> > {
> > unsigned ret;
> >
> > + if (len <= 64)
> > + return copy_user_generic_unrolled(to, from, len);
> > +
Given this gets inlined surely that should bracketed with an ifdef
against optimizing for space.
Also you give one set of benchmarks but how do they look on different
processors - AMD v Intel, Atom v Core, Ryzen v older AMD etc ?
Alan
Powered by blists - more mailing lists