From: Peter Zijlstra <peterz@infradead.org>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
tipbuild@zytor.com, Ingo Molnar <mingo@kernel.org>
Subject: Re: [tip:core/objtool 26/27] arch/x86/kernel/signal.c:357:16: sparse: got unsigned long long [usertype] *__pu_ptr
Date: Wed, 24 Apr 2019 18:00:46 +0200 [thread overview]
Message-ID: <20190424160046.GQ12232@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <201904242047.cHccU4xI%lkp@intel.com>
On Wed, Apr 24, 2019 at 08:38:53PM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/objtool
> head: 29da93fea3ea39ab9b12270cc6be1b70ef201c9e
> commit: 6ae865615fc43d014da2fd1f1bba7e81ee622d1b [26/27] x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation
> reproduce:
> # apt-get install sparse
> git checkout 6ae865615fc43d014da2fd1f1bba7e81ee622d1b
> make ARCH=x86_64 allmodconfig
> make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> sparse warnings: (new ones prefixed by >>)
>
> arch/x86/kernel/signal.c:357:16: sparse: sparse: cast removes address space '<asn:1>' of expression
> arch/x86/kernel/signal.c:357:16: sparse: sparse: cast removes address space '<asn:1>' of expression
> arch/x86/kernel/signal.c:357:16: sparse: sparse: cast removes address space '<asn:1>' of expression
> arch/x86/kernel/signal.c:357:16: sparse: sparse: cast removes address space '<asn:1>' of expression
> arch/x86/kernel/signal.c:357:16: sparse: sparse: cast removes address space '<asn:1>' of expression
> arch/x86/kernel/signal.c:357:16: sparse: sparse: cast removes address space '<asn:1>' of expression
> arch/x86/kernel/signal.c:357:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:1> * @@ got st volatile [noderef] <asn:1> * @@
> arch/x86/kernel/signal.c:357:16: sparse: expected void const volatile [noderef] <asn:1> *
> >> arch/x86/kernel/signal.c:357:16: sparse: got unsigned long long [usertype] *__pu_ptr
> arch/x86/kernel/signal.c:417:17: sparse: sparse: cast removes address space '<asn:1>' of expression
> arch/x86/kernel/signal.c:417:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:1> * @@ got st volatile [noderef] <asn:1> * @@
> arch/x86/kernel/signal.c:417:17: sparse: expected void const volatile [noderef] <asn:1> *
> arch/x86/kernel/signal.c:417:17: sparse: got unsigned long long [usertype] *
I'm not getting that; I have sparse version: 0.6.0 (Debian: 0.6.0-3)
But I suspect something like the below ought to cure that. But this is
not new from this patch, it's just that the sparse output changed
because some variable changed name.
---
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 364813cea647..1fd714b42a79 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -352,7 +352,7 @@ __setup_frame(int sig, struct ksignal *ksig, sigset_t *set,
* reasons and because gdb uses it as a signature to notice
* signal handler stack frames.
*/
- err |= __put_user(*((u64 *)&retcode), (u64 *)frame->retcode);
+ err |= __put_user(*((u64 __user *)&retcode), (u64 __user *)frame->retcode);
if (err)
return -EFAULT;
prev parent reply other threads:[~2019-04-24 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 12:38 kbuild test robot
2019-04-24 16:00 ` Peter Zijlstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190424160046.GQ12232@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mingo@kernel.org \
--cc=tipbuild@zytor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®