mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* kernel/scs.c:86:21: sparse: sparse: Using plain integer as NULL pointer
@ 2023-11-21  8:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-21  8:45 UTC (permalink / raw)
  To: Sami Tolvanen; +Cc: oe-kbuild-all, linux-kernel, Palmer Dabbelt

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   98b1cc82c4affc16f5598d4fa14b1858671b2263
commit: d1584d791a297aa8ed93503382a682a6ecfc4218 riscv: Implement Shadow Call Stack
date:   3 weeks ago
config: riscv-randconfig-r132-20231121 (https://download.01.org/0day-ci/archive/20231121/202311211604.nMVAanJQ-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311211604.nMVAanJQ-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/202311211604.nMVAanJQ-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   WARNING: invalid argument to '-march': '_zihintpause'
>> kernel/scs.c:86:21: sparse: sparse: Using plain integer as NULL pointer
>> kernel/scs.c:86:21: sparse: sparse: Using plain integer as NULL pointer
>> kernel/scs.c:86:21: sparse: sparse: Using plain integer as NULL pointer
>> kernel/scs.c:86:21: sparse: sparse: Using plain integer as NULL pointer

vim +86 kernel/scs.c

d08b9f0ca6605e Sami Tolvanen    2020-04-27  72  
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  73  void scs_free(void *s)
d08b9f0ca6605e Sami Tolvanen    2020-04-27  74  {
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  75  	int i;
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  76  
bee348fab099b0 Will Deacon      2020-05-15  77  	__scs_account(s, -1);
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  78  
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  79  	/*
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  80  	 * We cannot sleep as this can be called in interrupt context,
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  81  	 * so use this_cpu_cmpxchg to update the cache, and vfree_atomic
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  82  	 * to free the stack.
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  83  	 */
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  84  
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  85  	for (i = 0; i < NR_CACHED_SCS; i++)
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30 @86  		if (this_cpu_cmpxchg(scs_cache[i], 0, s) == NULL)
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  87  			return;
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  88  
f6e39794f4b6da Andrey Konovalov 2022-03-24  89  	kasan_unpoison_vmalloc(s, SCS_SIZE, KASAN_VMALLOC_PROT_NORMAL);
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  90  	vfree_atomic(s);
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  91  }
a2abe7cbd8fe2d Sami Tolvanen    2020-11-30  92  

:::::: The code at line 86 was first introduced by commit
:::::: a2abe7cbd8fe2db5ff386c968e2273d9dc6c468d scs: switch to vmapped shadow stacks

:::::: TO: Sami Tolvanen <samitolvanen@google.com>
:::::: CC: Will Deacon <will@kernel.org>

-- 
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-21  8:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-21  8:45 kernel/scs.c:86:21: sparse: sparse: Using plain integer as NULL pointer 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®