All of lore.kernel.org
 help / color / mirror / Atom feed
* [tglx-devel:x86/fpu 62/77] arch/x86/kernel/fpu/xstate.c:1311:9: sparse: sparse: dereference of noderef expression
@ 2021-10-11  9:18 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-11  9:18 UTC (permalink / raw)
  To: Chang S. Bae; +Cc: kbuild-all, linux-kernel, Thomas Gleixner

[-- Attachment #1: Type: text/plain, Size: 2685 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu
head:   a365ccb2764d58791ee5946b16fa0ffceb17021f
commit: 1220c1c84393869a348163238581fef56cf60a84 [62/77] x86/arch_prctl: Add controls for dynamic XSTATE components
config: x86_64-randconfig-s021-20211011 (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/tglx/devel.git/commit/?id=1220c1c84393869a348163238581fef56cf60a84
        git remote add tglx-devel https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
        git fetch --no-tags tglx-devel x86/fpu
        git checkout 1220c1c84393869a348163238581fef56cf60a84
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/fpu/

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/fpu/xstate.c:1424:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   arch/x86/kernel/fpu/xstate.c:1424:39: sparse:     expected struct spinlock [usertype] *lock
   arch/x86/kernel/fpu/xstate.c:1424:39: sparse:     got struct spinlock [noderef] __rcu *
   arch/x86/kernel/fpu/xstate.c:1427:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   arch/x86/kernel/fpu/xstate.c:1427:41: sparse:     expected struct spinlock [usertype] *lock
   arch/x86/kernel/fpu/xstate.c:1427:41: sparse:     got struct spinlock [noderef] __rcu *
>> arch/x86/kernel/fpu/xstate.c:1311:9: sparse: sparse: dereference of noderef expression

vim +1311 arch/x86/kernel/fpu/xstate.c

  1304	
  1305	#ifdef CONFIG_DYNAMIC_SIGALTSTACK
  1306	static int validate_sigaltstack(unsigned int usize)
  1307	{
  1308		struct task_struct *thread, *leader = current->group_leader;
  1309		unsigned long framesize = get_sigframe_size();
  1310	
> 1311		assert_spin_locked(&current->sighand->siglock);
  1312	
  1313		framesize += usize - fpu_user_cfg.default_size;
  1314		for_each_thread(leader, thread) {
  1315			if (thread->sas_ss_size && thread->sas_ss_size < framesize)
  1316				return -ENOSPC;
  1317		}
  1318		return 0;
  1319	}
  1320	

---
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: 35103 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tglx-devel:x86/fpu 62/77] arch/x86/kernel/fpu/xstate.c:1311:9: sparse: sparse: dereference of noderef expression
@ 2021-10-11  9:18 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-11  9:18 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2736 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu
head:   a365ccb2764d58791ee5946b16fa0ffceb17021f
commit: 1220c1c84393869a348163238581fef56cf60a84 [62/77] x86/arch_prctl: Add controls for dynamic XSTATE components
config: x86_64-randconfig-s021-20211011 (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/tglx/devel.git/commit/?id=1220c1c84393869a348163238581fef56cf60a84
        git remote add tglx-devel https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
        git fetch --no-tags tglx-devel x86/fpu
        git checkout 1220c1c84393869a348163238581fef56cf60a84
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/fpu/

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/fpu/xstate.c:1424:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   arch/x86/kernel/fpu/xstate.c:1424:39: sparse:     expected struct spinlock [usertype] *lock
   arch/x86/kernel/fpu/xstate.c:1424:39: sparse:     got struct spinlock [noderef] __rcu *
   arch/x86/kernel/fpu/xstate.c:1427:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   arch/x86/kernel/fpu/xstate.c:1427:41: sparse:     expected struct spinlock [usertype] *lock
   arch/x86/kernel/fpu/xstate.c:1427:41: sparse:     got struct spinlock [noderef] __rcu *
>> arch/x86/kernel/fpu/xstate.c:1311:9: sparse: sparse: dereference of noderef expression

vim +1311 arch/x86/kernel/fpu/xstate.c

  1304	
  1305	#ifdef CONFIG_DYNAMIC_SIGALTSTACK
  1306	static int validate_sigaltstack(unsigned int usize)
  1307	{
  1308		struct task_struct *thread, *leader = current->group_leader;
  1309		unsigned long framesize = get_sigframe_size();
  1310	
> 1311		assert_spin_locked(&current->sighand->siglock);
  1312	
  1313		framesize += usize - fpu_user_cfg.default_size;
  1314		for_each_thread(leader, thread) {
  1315			if (thread->sas_ss_size && thread->sas_ss_size < framesize)
  1316				return -ENOSPC;
  1317		}
  1318		return 0;
  1319	}
  1320	

---
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: 35103 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-11  9:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11  9:18 [tglx-devel:x86/fpu 62/77] arch/x86/kernel/fpu/xstate.c:1311:9: sparse: sparse: dereference of noderef expression kernel test robot
2021-10-11  9:18 ` kernel test robot

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.