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-rhel-7.6-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
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
make W=1 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: In function '__jump_label_set_jump_code':
> arch/x86/kernel/jump_label.c:40:27: error:
'JUMP_LABEL_NOP_SIZE' undeclared (first use in this function); did you mean
'JUMP_LABEL_NOP'?
40 | if (memcmp(addr, expect, JUMP_LABEL_NOP_SIZE))
{
| ^~~~~~~~~~~~~~~~~~~
| JUMP_LABEL_NOP
arch/x86/kernel/jump_label.c:40:27: note: each undeclared identifier is reported only
once for each function it appears in
In file included from include/linux/kernel.h:16,
from arch/x86/include/asm/percpu.h:27,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/memory.h:19,
from arch/x86/kernel/jump_label.c:9:
arch/x86/kernel/jump_label.c:47:31: error: 'init' undeclared (first use in this
function); did you mean 'int'?
47 | addr, addr, addr, expect, init, type);
| ^~~~
include/linux/printk.h:333:34: note: in definition of macro 'pr_crit'
333 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
arch/x86/kernel/jump_label.c: In function '__jump_label_transform':
arch/x86/kernel/jump_label.c:76:5: error: 'JUMP_LABEL_NOP_SIZE' undeclared
(first use in this function); did you mean 'JUMP_LABEL_NOP'?
76 | JUMP_LABEL_NOP_SIZE);
| ^~~~~~~~~~~~~~~~~~~
| JUMP_LABEL_NOP
arch/x86/kernel/jump_label.c: In function 'arch_jump_label_transform_queue':
arch/x86/kernel/jump_label.c:114:12: error: 'JUMP_LABEL_NOP_SIZE' undeclared
(first use in this function); did you mean 'JUMP_LABEL_NOP'?
114 | opcode, JUMP_LABEL_NOP_SIZE, NULL);
| ^~~~~~~~~~~~~~~~~~~
| JUMP_LABEL_NOP
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