[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <160771286080.3364.15021065980824456713.tip-bot2@tip-bot2>
Date: Fri, 11 Dec 2020 18:54:20 -0000
From: "tip-bot2 for Lukas Bulwahn" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Lukas Bulwahn <lukas.bulwahn@...il.com>,
Borislav Petkov <bp@...e.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/cleanups] x86/ia32_signal: Propagate __user annotation properly
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 9a02fd8b19247e80e2354a227b6e2392e8fae78a
Gitweb: https://git.kernel.org/tip/9a02fd8b19247e80e2354a227b6e2392e8fae78a
Author: Lukas Bulwahn <lukas.bulwahn@...il.com>
AuthorDate: Mon, 07 Dec 2020 13:41:41 +01:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Fri, 11 Dec 2020 19:44:31 +01:00
x86/ia32_signal: Propagate __user annotation properly
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 <lukas.bulwahn@...il.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Link: https://lkml.kernel.org/r/20201207124141.21859-1-lukas.bulwahn@gmail.com
---
arch/x86/ia32/ia32_signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index 81cf223..5e3d9b7 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -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))
Powered by blists - more mailing lists