Thread (14 messages) flat view 14 messages, 4 authors, 2018-07-07

Re: [RFC PATCH for 4.18 3/5] rseq: uapi: declare rseq_cs field as union, update includes

From: Andy Lutomirski <luto@kernel.org>
Date: 2018-07-06 19:56:42
Also in: lkml

On Fri, Jul 6, 2018 at 12:31 PM, Linus Torvalds
[off-list ref] wrote:
On Fri, Jul 6, 2018 at 12:23 PM Mathieu Desnoyers
[off-list ref] wrote:
quoted
For -rc, I would favor the following simpler approach. Or I could even
just use get_user() instead. Thoughts ?
Please just use "get_user()".

In fact, we should be thinking seriosly about just removing
__get_user() entirely. It's wrong. It optimizes the wrong thing
entirely. It _used_ to be that the range check was noticeable, and it
really isn't any more. These days the expensive parts are the SMAP
costs, and both get_user() and __get_user() have those, except
get_user() is safer and doesn't waste I$ on inlining the code to
disable and re-enable SMAP.
If Al and Christoph ever manage to get rid of set_fs(), I bet we can
rewrite access_ok() and get_user() so that gcc can fold redundant
checks together and generate optimal code for get_user() of
consecutive struct fields all by itself.  Or maybe I'm giving gcc more
credit than it deserves.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help