[PATCH for 4.18 2/6] rseq: use get_user/put_user rather than __get_user/__put_user

From
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date
2018-07-09 18:19:29
Also in
linux-api, lkml
Reply to
Linus Torvalds, 2018-07-09
----- On Jul 9, 2018, at 2:04 PM, Linus Torvalds torvalds at linux-foundation.org wrote:
On Mon, Jul 9, 2018 at 10:28 AM Mathieu Desnoyers
[off-list ref] wrote:
quoted
So, another twist to this story: ppc32 does not implement u64 get_user().
I was going to say that "that's not possible", since we actually have
64-bit arguments at least in the form of "loff_t __user *".

But when I started looking, it turns out that yeah, we do
"copy_from_user()" on them, and instead made the x86 copy_from_user()
have special cases for constant sizes.

So a 8-byte copy_from_user() is fine. It ends up being a "get_user()"
on x86 anyway.
Given that this memory area has already been checked with access_ok()
on rseq registration, are you fine with leaving
__get_user/__put_user/__copy_{from,to}_user in place so we do the
minimal change at this stage of rc, or should I go ahead and replace
the lot with get_user/put_user/copy_{from,to}_user ?

Thanks,

Mathieu


-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Thread (7 messages) 7 messages, 3 authors, last reply 2018-07-10
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