Message ID | 20170823222911.29453-2-bart.vanassche@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 2017-08-23 at 15:29 -0700, Bart Van Assche wrote: > copy_in_user() copies data from user-space address @from to user- > space address @to. Hence declare both @from and @to as user-space > pointers. > [ ... ] Hi Al, Can you have a look at this patch? Patch 2/2 from this series already got queued for kernel v4.14 by Jens. Thanks, Bart.
On Thu, Aug 31, 2017 at 09:21:37PM +0000, Bart Van Assche wrote: > On Wed, 2017-08-23 at 15:29 -0700, Bart Van Assche wrote: > > copy_in_user() copies data from user-space address @from to user- > > space address @to. Hence declare both @from and @to as user-space > > pointers. > > [ ... ] > > Hi Al, > > Can you have a look at this patch? Patch 2/2 from this series already got > queued for kernel v4.14 by Jens. Yes, it's in #for-linus in my local tree.
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index acdd6f915a8d..20ef8e6ec2db 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h @@ -156,7 +156,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n) } #ifdef CONFIG_COMPAT static __always_inline unsigned long __must_check -copy_in_user(void __user *to, const void *from, unsigned long n) +copy_in_user(void __user *to, const void __user *from, unsigned long n) { might_fault(); if (access_ok(VERIFY_WRITE, to, n) && access_ok(VERIFY_READ, from, n))
copy_in_user() copies data from user-space address @from to user- space address @to. Hence declare both @from and @to as user-space pointers. Fixes: commit d597580d3737 ("generic ...copy_..._user primitives") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: <stable@vger.kernel.org> --- include/linux/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)