Re: [PATCH v2 4/4] x86/uaccess: Fix implicit cast of __user pointer

2019-03-29 Thread Mukesh Ojha
On 3/29/2019 10:00 PM, Jann Horn wrote: The first two arguments of __user_atomic_cmpxchg_inatomic() are: - `uval` is a kernel pointer into which the old value should be stored - `ptr` is the user pointer on which the cmpxchg should operate This means that casting `uval` to `__typeof__(ptr

[PATCH v2 4/4] x86/uaccess: Fix implicit cast of __user pointer

2019-03-29 Thread Jann Horn
The first two arguments of __user_atomic_cmpxchg_inatomic() are: - `uval` is a kernel pointer into which the old value should be stored - `ptr` is the user pointer on which the cmpxchg should operate This means that casting `uval` to `__typeof__(ptr)` is wrong. Since `uval` is only used once in