From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: arch/x86/kernel/signal.c:936:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Thu, 18 Nov 2021 03:30:15 +0800 [thread overview]
Message-ID: <202111180306.lFpnfYOl-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5227 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ee1703cda8dc777e937dec172da55beaf1a74919
commit: 3aac3ebea08f2d342364f827c8979ab0e1dd591e x86/signal: Implement sigaltstack size validation
date: 3 weeks ago
config: i386-randconfig-s001-20211109 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3aac3ebea08f2d342364f827c8979ab0e1dd591e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 3aac3ebea08f2d342364f827c8979ab0e1dd591e
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long long [usertype] * @@
arch/x86/kernel/signal.c:358:9: sparse: expected void const volatile [noderef] __user *ptr
arch/x86/kernel/signal.c:358:9: sparse: got unsigned long long [usertype] *
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long long [usertype] * @@
arch/x86/kernel/signal.c:418:9: sparse: expected void const volatile [noderef] __user *ptr
arch/x86/kernel/signal.c:418:9: sparse: got unsigned long long [usertype] *
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
>> arch/x86/kernel/signal.c:936:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct lockdep_map const *lock @@ got struct lockdep_map [noderef] __rcu * @@
arch/x86/kernel/signal.c:936:9: sparse: expected struct lockdep_map const *lock
arch/x86/kernel/signal.c:936:9: sparse: got struct lockdep_map [noderef] __rcu *
vim +936 arch/x86/kernel/signal.c
924
925 /*
926 * MINSIGSTKSZ is 2048 and can't be changed despite the fact that AVX512
927 * exceeds that size already. As such programs might never use the
928 * sigaltstack they just continued to work. While always checking against
929 * the real size would be correct, this might be considered a regression.
930 *
931 * Therefore avoid the sanity check, unless enforced by kernel config or
932 * command line option.
933 */
934 bool sigaltstack_size_valid(size_t ss_size)
935 {
> 936 lockdep_assert_held(¤t->sighand->siglock);
937
938 if (strict_sigaltstack_size)
939 return ss_size > get_sigframe_size();
940
941 return true;
942 }
943 #endif /* CONFIG_DYNAMIC_SIGFRAME */
944
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40986 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Borislav Petkov <bp@suse.de>,
"Chang S. Bae" <chang.seok.bae@intel.com>
Subject: arch/x86/kernel/signal.c:936:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Thu, 18 Nov 2021 03:30:15 +0800 [thread overview]
Message-ID: <202111180306.lFpnfYOl-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5147 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ee1703cda8dc777e937dec172da55beaf1a74919
commit: 3aac3ebea08f2d342364f827c8979ab0e1dd591e x86/signal: Implement sigaltstack size validation
date: 3 weeks ago
config: i386-randconfig-s001-20211109 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3aac3ebea08f2d342364f827c8979ab0e1dd591e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 3aac3ebea08f2d342364f827c8979ab0e1dd591e
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long long [usertype] * @@
arch/x86/kernel/signal.c:358:9: sparse: expected void const volatile [noderef] __user *ptr
arch/x86/kernel/signal.c:358:9: sparse: got unsigned long long [usertype] *
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:358:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long long [usertype] * @@
arch/x86/kernel/signal.c:418:9: sparse: expected void const volatile [noderef] __user *ptr
arch/x86/kernel/signal.c:418:9: sparse: got unsigned long long [usertype] *
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
arch/x86/kernel/signal.c:418:9: sparse: sparse: cast removes address space '__user' of expression
>> arch/x86/kernel/signal.c:936:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct lockdep_map const *lock @@ got struct lockdep_map [noderef] __rcu * @@
arch/x86/kernel/signal.c:936:9: sparse: expected struct lockdep_map const *lock
arch/x86/kernel/signal.c:936:9: sparse: got struct lockdep_map [noderef] __rcu *
vim +936 arch/x86/kernel/signal.c
924
925 /*
926 * MINSIGSTKSZ is 2048 and can't be changed despite the fact that AVX512
927 * exceeds that size already. As such programs might never use the
928 * sigaltstack they just continued to work. While always checking against
929 * the real size would be correct, this might be considered a regression.
930 *
931 * Therefore avoid the sanity check, unless enforced by kernel config or
932 * command line option.
933 */
934 bool sigaltstack_size_valid(size_t ss_size)
935 {
> 936 lockdep_assert_held(¤t->sighand->siglock);
937
938 if (strict_sigaltstack_size)
939 return ss_size > get_sigframe_size();
940
941 return true;
942 }
943 #endif /* CONFIG_DYNAMIC_SIGFRAME */
944
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40986 bytes --]
next reply other threads:[~2021-11-17 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 19:30 kernel test robot [this message]
2021-11-17 19:30 ` arch/x86/kernel/signal.c:936:9: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
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=202111180306.lFpnfYOl-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.