From: kernel test robot <lkp@intel.com>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Palmer Dabbelt <palmer@rivosinc.com>
Subject: kernel/scs.c:86:21: sparse: sparse: Using plain integer as NULL pointer
Date: Tue, 21 Nov 2023 16:45:45 +0800 [thread overview]
Message-ID: <202311211604.nMVAanJQ-lkp@intel.com> (raw)
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
reply other threads:[~2023-11-21 8:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202311211604.nMVAanJQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=palmer@rivosinc.com \
--cc=samitolvanen@google.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®