All of lore.kernel.org
 help / color / mirror / Atom feed
* [peterz-queue:x86/fpu 6/9] arch/x86/kernel/jump_label.c:40:27: error: 'JUMP_LABEL_NOP_SIZE' undeclared; did you mean
@ 2021-03-13  5:37 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-13  5:37 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6372 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/fpu
head:   42088f5f7dcaf5e6d51b71cb32097ca4dad9b225
commit: 86d276af0556e9e6e579c71a48eff194d907be04 [6/9] jump_label, x86: Introduce jump_entry_size()
config: x86_64-rhel-8.3 (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/?id=86d276af0556e9e6e579c71a48eff194d907be04
        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 86d276af0556e9e6e579c71a48eff194d907be04
        # 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@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

86d276af0556e9e Peter Zijlstra             2019-06-28  23  
18cbc8bed0c7079 Peter Zijlstra             2019-08-26  24  static const void *
b9acd3e858cf960 Peter Zijlstra             2021-03-10  25  __jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type)
d9f5ab7b1c0a520 Jason Baron                2010-09-17  26  {
63f62addb88ec4b Peter Zijlstra             2019-10-03  27  	const void *expect, *code;
63f62addb88ec4b Peter Zijlstra             2019-10-03  28  	const void *addr, *dest;
9fc0f798ab8a6c0 Ard Biesheuvel             2018-09-18  29  
63f62addb88ec4b Peter Zijlstra             2019-10-03  30  	addr = (void *)jump_entry_code(entry);
63f62addb88ec4b Peter Zijlstra             2019-10-03  31  	dest = (void *)jump_entry_target(entry);
18cbc8bed0c7079 Peter Zijlstra             2019-08-26  32  
63f62addb88ec4b Peter Zijlstra             2019-10-03  33  	code = text_gen_insn(JMP32_INSN_OPCODE, addr, dest);
d9f5ab7b1c0a520 Jason Baron                2010-09-17  34  
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  35  	if (type == JUMP_LABEL_JMP)
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  36  		expect = x86_nops[5];
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  37  	else
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  38  		expect = code;
e71a5be15e47a73 Jeremy Fitzhardinge        2011-09-29  39  
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28 @40  	if (memcmp(addr, expect, JUMP_LABEL_NOP_SIZE)) {
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  41  		/*
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  42  		 * The location is not an op that we were expecting.
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  43  		 * Something went wrong. Crash the box, as something could be
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  44  		 * corrupting the kernel.
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  45  		 */
ea9a8a73e58ed8b 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",
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  47  				addr, addr, addr, expect, init, type);
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  48  		BUG();
ea9a8a73e58ed8b Peter Zijlstra             2019-06-28  49  	}
9fc0f798ab8a6c0 Ard Biesheuvel             2018-09-18  50  
4cc6620b5e4c895 Daniel Bristot de Oliveira 2019-06-12  51  	if (type == JUMP_LABEL_NOP)
b9acd3e858cf960 Peter Zijlstra             2021-03-10  52  		code = x86_nops[5];
18cbc8bed0c7079 Peter Zijlstra             2019-08-26  53  
63f62addb88ec4b Peter Zijlstra             2019-10-03  54  	return code;
4cc6620b5e4c895 Daniel Bristot de Oliveira 2019-06-12  55  }
4cc6620b5e4c895 Daniel Bristot de Oliveira 2019-06-12  56  

:::::: The code at line 40 was first introduced by commit
:::::: ea9a8a73e58ed8b9a24d6c84c033c7064fe2a05c jump_label, x86: Improve error when we fail expected text

:::::: TO: Peter Zijlstra <peterz@infradead.org>
:::::: CC: Peter Zijlstra <peterz@infradead.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 41159 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [peterz-queue:x86/fpu 6/9] arch/x86/kernel/jump_label.c:40:27: error: 'JUMP_LABEL_NOP_SIZE' undeclared; did you mean
@ 2021-03-11  1:31 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-11  1:31 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6349 bytes --]

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/?id=0972ae347d728f65574452d8e0fa18ed7c68bfe5
        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@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@infradead.org>
:::::: CC: Peter Zijlstra <peterz@infradead.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 50673 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-13  5:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-13  5:37 [peterz-queue:x86/fpu 6/9] arch/x86/kernel/jump_label.c:40:27: error: 'JUMP_LABEL_NOP_SIZE' undeclared; did you mean kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-03-11  1:31 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.