]> Git Repo - linux.git/commitdiff
x86/ia32_signal: Propagate __user annotation properly
authorLukas Bulwahn <[email protected]>
Mon, 7 Dec 2020 12:41:41 +0000 (13:41 +0100)
committerBorislav Petkov <[email protected]>
Fri, 11 Dec 2020 18:44:31 +0000 (19:44 +0100)
Commit

  57d563c82925 ("x86: ia32_setup_rt_frame(): consolidate uaccess areas")

dropped a __user annotation in a cast when refactoring __put_user() to
unsafe_put_user().

Hence, since then, sparse warns in arch/x86/ia32/ia32_signal.c:350:9:

  warning: cast removes address space '__user' of expression
  warning: incorrect type in argument 1 (different address spaces)
    expected void const volatile [noderef] __user *ptr
    got unsigned long long [usertype] *

Add the __user annotation to restore the propagation of address spaces.

Signed-off-by: Lukas Bulwahn <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
arch/x86/ia32/ia32_signal.c

index 81cf22398cd16c81c5d18338251fced04cb41a6b..5e3d9b7fd5fb0896ae28e44f71826c072b05a92e 100644 (file)
@@ -347,7 +347,7 @@ int ia32_setup_rt_frame(int sig, struct ksignal *ksig,
         */
        unsafe_put_user(*((u64 *)&code), (u64 __user *)frame->retcode, Efault);
        unsafe_put_sigcontext32(&frame->uc.uc_mcontext, fp, regs, set, Efault);
-       unsafe_put_user(*(__u64 *)set, (__u64 *)&frame->uc.uc_sigmask, Efault);
+       unsafe_put_user(*(__u64 *)set, (__u64 __user *)&frame->uc.uc_sigmask, Efault);
        user_access_end();
 
        if (__copy_siginfo_to_user32(&frame->info, &ksig->info))
This page took 0.057184 seconds and 4 git commands to generate.