tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/fpu
head: fb58f76671de512da1ee76a77977eb6edb4d0071
commit: 8388f5d27cf18ab67cb40c4ff289c5ab3f721369 [5/9] jump_label, x86: Improve error when
we fail expected text
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 8388f5d27cf18ab67cb40c4ff289c5ab3f721369
# 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 >>):
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: In function '__jump_label_set_jump_code':
> arch/x86/kernel/jump_label.c:42:31: error: 'init'
undeclared (first use in this function); did you mean 'int'?
42 |
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:42:31: note: each undeclared identifier is reported only
once for each function it appears in
42 | 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__)
| ^~~~~~~~~~~
vim +42 arch/x86/kernel/jump_label.c
9 #include <linux/memory.h>
10 #include
<linux/uaccess.h>
11 #include <linux/module.h>
12 #include <linux/list.h>
13 #include <linux/jhash.h>
14 #include <linux/cpu.h>
15 #include <asm/kprobes.h>
16 #include <asm/alternative.h>
17 #include <asm/text-patching.h>
18
19 static const void *
20 __jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type)
21 {
22 const void *expect, *code;
23 const void *addr, *dest;
24
25 addr = (void *)jump_entry_code(entry);
26 dest = (void *)jump_entry_target(entry);
27
28 code = text_gen_insn(JMP32_INSN_OPCODE, addr, dest);
29
30 if (type == JUMP_LABEL_JMP)
31 expect = x86_nops[5];
32 else
33 expect = code;
34
35 if (memcmp(addr, expect, JUMP_LABEL_NOP_SIZE)) {
36 /*
37 * The location is not an op that we were expecting.
38 * Something went wrong. Crash the box, as something could be
39 * corrupting the kernel.
40 */
41 pr_crit("jump_label: Fatal kernel bug, unexpected op at %pS [%p] (%5ph !=
%5ph)) init:%d type:%d\n",
42 addr, addr, addr, expect, init, type);
43 BUG();
44 }
45
46 if (type == JUMP_LABEL_NOP)
47 code = x86_nops[5];
48
49 return code;
50 }
51
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org