tree:
https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git for-next
head: 14512690a16537527dacf0f5cd3d2263be317f35
commit: 7b9dbbb41e1e6579d21fbec1d85ed04a392f73e9 [24/25] riscv: add VMAP_STACK overflow
detection
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/?i...
git remote add riscv
https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
git fetch --no-tags riscv for-next
git checkout 7b9dbbb41e1e6579d21fbec1d85ed04a392f73e9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> arch/riscv/kernel/traps.c:210:26: warning: no previous prototype
for 'get_overflow_stack' [-Wmissing-prototypes]
210 | asmlinkage
unsigned long get_overflow_stack(void)
| ^~~~~~~~~~~~~~~~~~
> arch/riscv/kernel/traps.c:216:17: warning: no previous prototype
for 'handle_bad_stack' [-Wmissing-prototypes]
216 | asmlinkage void
handle_bad_stack(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~
vim +/get_overflow_stack +210 arch/riscv/kernel/traps.c
201
202 #ifdef CONFIG_VMAP_STACK
203 DEFINE_PER_CPU(unsigned long [OVERFLOW_STACK_SIZE/sizeof(long)], overflow_stack)
204 __aligned(16);
205 /*
206 * shadow stack, handled_ kernel_ stack_ overflow(in kernel/entry.S) is used
207 * to get per-cpu overflow stack(get_overflow_stack).
208 */
209 long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE/sizeof(long)];
210 asmlinkage unsigned long get_overflow_stack(void)
211 {
212 return (unsigned long)this_cpu_ptr(overflow_stack) +
213 OVERFLOW_STACK_SIZE;
214 }
215
216 asmlinkage void handle_bad_stack(struct pt_regs *regs)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org