Re: [PATCH 06/18] x86, barrier: stop speculation for failed access_ok

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2018-01-07 01:20:58
Also in
lkml, netdev
Reply to
Dan Williams, 2018-01-06
On Sat, Jan 6, 2018 at 3:31 PM, Dan Williams [off-list ref] wrote:
I assume if we put this in uaccess_begin() we also need audit for
paths that use access_ok but don't do on to call uaccess_begin()? A
quick glance shows a few places where we are open coding the stac().
Perhaps land the lfence in stac() directly?
Yeah, we should put it in uaccess_begin(), and in the actual user
accessor helpers that do stac. Some of them probably should be changed
to use uaccess_begin() instead while at it.

One question for the CPU people: do we actually care and need to do
this for things that might *write* to something? The speculative write
obviously is killed, but does it perhaps bring in a cacheline even
when killed?

Because maybe we don't need the lfence in put_user(), only in get_user()?

               Linus
Thread (136 messages) 136 messages, 29 authors, last reply 2018-01-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help