tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/fpu
head: fb58f76671de512da1ee76a77977eb6edb4d0071
commit: 0972ae347d728f65574452d8e0fa18ed7c68bfe5 [6/9] jump_label, x86: Introduce
jump_entry_size()
config: x86_64-randconfig-a003-20210309 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
cd9a69289c7825d54450cb6829fef2c8e0f1963a)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue x86/fpu
git checkout 0972ae347d728f65574452d8e0fa18ed7c68bfe5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> arch/x86/kernel/jump_label.c:40:27: error: use of undeclared
identifier 'JUMP_LABEL_NOP_SIZE'; did you mean 'JUMP_LABEL_NOP'?
if (memcmp(addr, expect, JUMP_LABEL_NOP_SIZE)) {
^~~~~~~~~~~~~~~~~~~
JUMP_LABEL_NOP
include/linux/jump_label.h:194:2: note: 'JUMP_LABEL_NOP' declared here
JUMP_LABEL_NOP = 0,
^
arch/x86/kernel/jump_label.c:47:31: error: use of undeclared identifier 'init'
addr, addr, addr, expect, init, type);
^
arch/x86/kernel/jump_label.c:76:5: error: use of undeclared identifier
'JUMP_LABEL_NOP_SIZE'; did you mean 'JUMP_LABEL_NOP'?
JUMP_LABEL_NOP_SIZE);
^~~~~~~~~~~~~~~~~~~
JUMP_LABEL_NOP
include/linux/jump_label.h:194:2: note: 'JUMP_LABEL_NOP' declared here
JUMP_LABEL_NOP = 0,
^
arch/x86/kernel/jump_label.c:80:55: error: use of undeclared identifier
'JUMP_LABEL_NOP_SIZE'; did you mean 'JUMP_LABEL_NOP'?
text_poke_bp((void *)jump_entry_code(entry), opcode, JUMP_LABEL_NOP_SIZE,
NULL);
^~~~~~~~~~~~~~~~~~~
JUMP_LABEL_NOP
include/linux/jump_label.h:194:2: note: 'JUMP_LABEL_NOP' declared here
JUMP_LABEL_NOP = 0,
^
arch/x86/kernel/jump_label.c:114:12: error: use of undeclared identifier
'JUMP_LABEL_NOP_SIZE'; did you mean 'JUMP_LABEL_NOP'?
opcode, JUMP_LABEL_NOP_SIZE, NULL);
^~~~~~~~~~~~~~~~~~~
JUMP_LABEL_NOP
include/linux/jump_label.h:194:2: note: 'JUMP_LABEL_NOP' declared here
JUMP_LABEL_NOP = 0,
^
5 errors generated.
vim +40 arch/x86/kernel/jump_label.c
0972ae347d728f Peter Zijlstra 2019-06-28 23
18cbc8bed0c707 Peter Zijlstra 2019-08-26 24 static const void *
86fa366b2e1b57 Peter Zijlstra 2021-03-10 25
__jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type)
d9f5ab7b1c0a52 Jason Baron 2010-09-17 26 {
63f62addb88ec4 Peter Zijlstra 2019-10-03 27 const void *expect, *code;
63f62addb88ec4 Peter Zijlstra 2019-10-03 28 const void *addr, *dest;
9fc0f798ab8a6c Ard Biesheuvel 2018-09-18 29
63f62addb88ec4 Peter Zijlstra 2019-10-03 30 addr = (void
*)jump_entry_code(entry);
63f62addb88ec4 Peter Zijlstra 2019-10-03 31 dest = (void
*)jump_entry_target(entry);
18cbc8bed0c707 Peter Zijlstra 2019-08-26 32
63f62addb88ec4 Peter Zijlstra 2019-10-03 33 code =
text_gen_insn(JMP32_INSN_OPCODE, addr, dest);
d9f5ab7b1c0a52 Jason Baron 2010-09-17 34
8388f5d27cf18a Peter Zijlstra 2019-06-28 35 if (type == JUMP_LABEL_JMP)
8388f5d27cf18a Peter Zijlstra 2019-06-28 36 expect = x86_nops[5];
8388f5d27cf18a Peter Zijlstra 2019-06-28 37 else
8388f5d27cf18a Peter Zijlstra 2019-06-28 38 expect = code;
e71a5be15e47a7 Jeremy Fitzhardinge 2011-09-29 39
8388f5d27cf18a Peter Zijlstra 2019-06-28 @40 if (memcmp(addr, expect,
JUMP_LABEL_NOP_SIZE)) {
8388f5d27cf18a Peter Zijlstra 2019-06-28 41 /*
8388f5d27cf18a Peter Zijlstra 2019-06-28 42 * The location is not an op
that we were expecting.
8388f5d27cf18a Peter Zijlstra 2019-06-28 43 * Something went wrong. Crash
the box, as something could be
8388f5d27cf18a Peter Zijlstra 2019-06-28 44 * corrupting the kernel.
8388f5d27cf18a Peter Zijlstra 2019-06-28 45 */
8388f5d27cf18a Peter Zijlstra 2019-06-28 46 pr_crit("jump_label:
Fatal kernel bug, unexpected op at %pS [%p] (%5ph != %5ph)) init:%d type:%d\n",
8388f5d27cf18a Peter Zijlstra 2019-06-28 47 addr, addr, addr, expect,
init, type);
8388f5d27cf18a Peter Zijlstra 2019-06-28 48 BUG();
8388f5d27cf18a Peter Zijlstra 2019-06-28 49 }
9fc0f798ab8a6c Ard Biesheuvel 2018-09-18 50
4cc6620b5e4c89 Daniel Bristot de Oliveira 2019-06-12 51 if (type == JUMP_LABEL_NOP)
86fa366b2e1b57 Peter Zijlstra 2021-03-10 52 code = x86_nops[5];
18cbc8bed0c707 Peter Zijlstra 2019-08-26 53
63f62addb88ec4 Peter Zijlstra 2019-10-03 54 return code;
4cc6620b5e4c89 Daniel Bristot de Oliveira 2019-06-12 55 }
4cc6620b5e4c89 Daniel Bristot de Oliveira 2019-06-12 56
:::::: The code at line 40 was first introduced by commit
:::::: 8388f5d27cf18ab67cb40c4ff289c5ab3f721369 jump_label, x86: Improve error when we
fail expected text
:::::: TO: Peter Zijlstra <peterz(a)infradead.org>
:::::: CC: Peter Zijlstra <peterz(a)infradead.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org