mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip:x86/percpu 21/22] arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
@ 2023-11-30 14:14 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-30 14:14 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: oe-kbuild-all, linux-kernel, x86, Ingo Molnar, Nadav Amit

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/percpu
head:   0548eb067ed664b93043e033295ca71e3e706245
commit: ed2f752e0e0a21d941ca0ee539ef3d4cd576bc5e [21/22] x86/percpu: Introduce const-qualified const_pcpu_hot to micro-optimize code generation
config: i386-randconfig-062-20231025 (https://download.01.org/0day-ci/archive/20231130/202311302257.tSFtZnly-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231130/202311302257.tSFtZnly-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311302257.tSFtZnly-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   arch/x86/kernel/fpu/init.c: note: in included file (through arch/x86/include/asm/preempt.h, include/linux/preempt.h, include/linux/bottom_half.h, ...):
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
--
   arch/x86/kernel/fpu/regset.c: note: in included file (through include/linux/sched.h, include/linux/sched/task_stack.h):
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
--
   arch/x86/kernel/fpu/signal.c: note: in included file (through arch/x86/include/asm/nospec-branch.h, arch/x86/include/asm/paravirt_types.h, arch/x86/include/asm/ptrace.h, ...):
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
--
   arch/x86/kernel/fpu/core.c: note: in included file (through arch/x86/include/asm/preempt.h, include/linux/preempt.h, include/linux/bottom_half.h, ...):
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
   arch/x86/kernel/fpu/core.c:547: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/core.c:547:39: sparse:     expected struct spinlock [usertype] *lock
   arch/x86/kernel/fpu/core.c:547:39: sparse:     got struct spinlock [noderef] __rcu *
   arch/x86/kernel/fpu/core.c:551: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/core.c:551:41: sparse:     expected struct spinlock [usertype] *lock
   arch/x86/kernel/fpu/core.c:551:41: sparse:     got struct spinlock [noderef] __rcu *
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
--
   arch/x86/kernel/fpu/xstate.c: note: in included file (through arch/x86/include/asm/nospec-branch.h, arch/x86/include/asm/paravirt_types.h, arch/x86/include/asm/ptrace.h, ...):
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
   arch/x86/kernel/fpu/xstate.c: note: in included file (through arch/x86/include/asm/fpu/regset.h):
   include/linux/regset.h:28:28: sparse: sparse: self-comparison always evaluates to false
   arch/x86/kernel/fpu/xstate.c: note: in included file (through arch/x86/include/asm/nospec-branch.h, arch/x86/include/asm/paravirt_types.h, arch/x86/include/asm/ptrace.h, ...):
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression
>> arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression

vim +46 arch/x86/include/asm/current.h

    38	
    39	/* const-qualified alias to pcpu_hot, aliased by linker. */
    40	DECLARE_PER_CPU_ALIGNED(const struct pcpu_hot __percpu_seg_override,
    41				const_pcpu_hot);
    42	
    43	static __always_inline struct task_struct *get_current(void)
    44	{
    45		if (IS_ENABLED(CONFIG_USE_X86_SEG_SUPPORT))
  > 46			return const_pcpu_hot.current_task;
    47	
    48		return this_cpu_read_stable(pcpu_hot.current_task);
    49	}
    50	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-30 14:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30 14:14 [tip:x86/percpu 21/22] arch/x86/include/asm/current.h:46:24: sparse: sparse: dereference of noderef expression kernel test robot

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®