[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d75f1259c3e64387a161ebcb0448d594@AcuMS.aculab.com>
Date: Thu, 24 Feb 2022 09:12:51 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Geert Uytterhoeven' <geert@...ux-m68k.org>,
Kees Cook <keescook@...omium.org>
CC: linux-m68k <linux-m68k@...ts.linux-m68k.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-hardening@...r.kernel.org" <linux-hardening@...r.kernel.org>
Subject: RE: [PATCH] m68k: Implement "current_stack_pointer"
From: Geert Uytterhoeven
> Sent: 24 February 2022 08:59
...
> > +register unsigned long current_stack_pointer __asm__("sp");
>
> I don't know what HARDENED_USERCOPY does, so I don't know if you need
> "usp" (see rdusp()) or "sp"?
HARDENED_USERCOPY significantly slows down some systems calls
(especially things like sendmsg()) by trying to run-time verify
that the kernel buffer doesn't overrun a stack frame or kmalloc()ed
buffer.
I've got measurable improvements by either using __copy_to/from_user()
(which skips the tests) or user_access_begin() and __get_user().
At the moment the code for reading a compat iovec[] is actually
faster than that for a native one!
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists