All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
@ 2021-04-14  4:39 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-04-14  4:39 UTC (permalink / raw)
  To: Andrew Scull; +Cc: kbuild-all, Linux Memory Management List, Marc Zyngier

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

Hi Andrew,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   dcf1b51d6b2ac5da234ae6883ed0e9422c339588
commit: aec0fae62e47050019474936248a311a0ab08705 [7952/12404] KVM: arm64: Log source when panicking from nVHE hyp
config: arm64-randconfig-r004-20210413 (attached as .config)
compiler: aarch64-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/next/linux-next.git/commit/?id=aec0fae62e47050019474936248a311a0ab08705
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout aec0fae62e47050019474936248a311a0ab08705
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

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/arm64/kvm/handle_exit.c:177:21: warning: initialized field overwritten [-Woverride-init]
     177 |  [ESR_ELx_EC_WFx] = kvm_handle_wfx,
         |                     ^~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:177:21: note: (near initialization for 'arm_exit_handlers[1]')
   arch/arm64/kvm/handle_exit.c:178:25: warning: initialized field overwritten [-Woverride-init]
     178 |  [ESR_ELx_EC_CP15_32] = kvm_handle_cp15_32,
         |                         ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:178:25: note: (near initialization for 'arm_exit_handlers[3]')
   arch/arm64/kvm/handle_exit.c:179:25: warning: initialized field overwritten [-Woverride-init]
     179 |  [ESR_ELx_EC_CP15_64] = kvm_handle_cp15_64,
         |                         ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:179:25: note: (near initialization for 'arm_exit_handlers[4]')
   arch/arm64/kvm/handle_exit.c:180:25: warning: initialized field overwritten [-Woverride-init]
     180 |  [ESR_ELx_EC_CP14_MR] = kvm_handle_cp14_32,
         |                         ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:180:25: note: (near initialization for 'arm_exit_handlers[5]')
   arch/arm64/kvm/handle_exit.c:181:25: warning: initialized field overwritten [-Woverride-init]
     181 |  [ESR_ELx_EC_CP14_LS] = kvm_handle_cp14_load_store,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:181:25: note: (near initialization for 'arm_exit_handlers[6]')
   arch/arm64/kvm/handle_exit.c:182:25: warning: initialized field overwritten [-Woverride-init]
     182 |  [ESR_ELx_EC_CP14_64] = kvm_handle_cp14_64,
         |                         ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:182:25: note: (near initialization for 'arm_exit_handlers[12]')
   arch/arm64/kvm/handle_exit.c:183:23: warning: initialized field overwritten [-Woverride-init]
     183 |  [ESR_ELx_EC_HVC32] = handle_hvc,
         |                       ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:183:23: note: (near initialization for 'arm_exit_handlers[18]')
   arch/arm64/kvm/handle_exit.c:184:23: warning: initialized field overwritten [-Woverride-init]
     184 |  [ESR_ELx_EC_SMC32] = handle_smc,
         |                       ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:184:23: note: (near initialization for 'arm_exit_handlers[19]')
   arch/arm64/kvm/handle_exit.c:185:23: warning: initialized field overwritten [-Woverride-init]
     185 |  [ESR_ELx_EC_HVC64] = handle_hvc,
         |                       ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:185:23: note: (near initialization for 'arm_exit_handlers[22]')
   arch/arm64/kvm/handle_exit.c:186:23: warning: initialized field overwritten [-Woverride-init]
     186 |  [ESR_ELx_EC_SMC64] = handle_smc,
         |                       ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:186:23: note: (near initialization for 'arm_exit_handlers[23]')
   arch/arm64/kvm/handle_exit.c:187:23: warning: initialized field overwritten [-Woverride-init]
     187 |  [ESR_ELx_EC_SYS64] = kvm_handle_sys_reg,
         |                       ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:187:23: note: (near initialization for 'arm_exit_handlers[24]')
   arch/arm64/kvm/handle_exit.c:188:21: warning: initialized field overwritten [-Woverride-init]
     188 |  [ESR_ELx_EC_SVE] = handle_sve,
         |                     ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:188:21: note: (near initialization for 'arm_exit_handlers[25]')
   arch/arm64/kvm/handle_exit.c:189:26: warning: initialized field overwritten [-Woverride-init]
     189 |  [ESR_ELx_EC_IABT_LOW] = kvm_handle_guest_abort,
         |                          ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:189:26: note: (near initialization for 'arm_exit_handlers[32]')
   arch/arm64/kvm/handle_exit.c:190:26: warning: initialized field overwritten [-Woverride-init]
     190 |  [ESR_ELx_EC_DABT_LOW] = kvm_handle_guest_abort,
         |                          ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:190:26: note: (near initialization for 'arm_exit_handlers[36]')
   arch/arm64/kvm/handle_exit.c:191:28: warning: initialized field overwritten [-Woverride-init]
     191 |  [ESR_ELx_EC_SOFTSTP_LOW]= kvm_handle_guest_debug,
         |                            ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:191:28: note: (near initialization for 'arm_exit_handlers[50]')
   arch/arm64/kvm/handle_exit.c:192:28: warning: initialized field overwritten [-Woverride-init]
     192 |  [ESR_ELx_EC_WATCHPT_LOW]= kvm_handle_guest_debug,
         |                            ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:192:28: note: (near initialization for 'arm_exit_handlers[52]')
   arch/arm64/kvm/handle_exit.c:193:28: warning: initialized field overwritten [-Woverride-init]
     193 |  [ESR_ELx_EC_BREAKPT_LOW]= kvm_handle_guest_debug,
         |                            ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:193:28: note: (near initialization for 'arm_exit_handlers[48]')
   arch/arm64/kvm/handle_exit.c:194:24: warning: initialized field overwritten [-Woverride-init]
     194 |  [ESR_ELx_EC_BKPT32] = kvm_handle_guest_debug,
         |                        ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:194:24: note: (near initialization for 'arm_exit_handlers[56]')
   arch/arm64/kvm/handle_exit.c:195:23: warning: initialized field overwritten [-Woverride-init]
     195 |  [ESR_ELx_EC_BRK64] = kvm_handle_guest_debug,
         |                       ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:195:23: note: (near initialization for 'arm_exit_handlers[60]')
   arch/arm64/kvm/handle_exit.c:196:26: warning: initialized field overwritten [-Woverride-init]
     196 |  [ESR_ELx_EC_FP_ASIMD] = handle_no_fpsimd,
         |                          ^~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:196:26: note: (near initialization for 'arm_exit_handlers[7]')
   arch/arm64/kvm/handle_exit.c:197:21: warning: initialized field overwritten [-Woverride-init]
     197 |  [ESR_ELx_EC_PAC] = kvm_handle_ptrauth,
         |                     ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:197:21: note: (near initialization for 'arm_exit_handlers[9]')
   arch/arm64/kvm/handle_exit.c:295:24: warning: no previous prototype for 'nvhe_hyp_panic_handler' [-Wmissing-prototypes]
     295 | void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
         |                        ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c: In function 'nvhe_hyp_panic_handler':
>> arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line' [-Werror=implicit-function-declaration]
     318 |    bug_get_file_line(bug, &file, &line);
         |    ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/bug_get_file_line +318 arch/arm64/kvm/handle_exit.c

   294	
   295	void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
   296						      u64 par, uintptr_t vcpu,
   297						      u64 far, u64 hpfar) {
   298		u64 elr_in_kimg = __phys_to_kimg(__hyp_pa(elr));
   299		u64 hyp_offset = elr_in_kimg - kaslr_offset() - elr;
   300		u64 mode = spsr & PSR_MODE_MASK;
   301	
   302		/*
   303		 * The nVHE hyp symbols are not included by kallsyms to avoid issues
   304		 * with aliasing. That means that the symbols cannot be printed with the
   305		 * "%pS" format specifier, so fall back to the vmlinux address if
   306		 * there's no better option.
   307		 */
   308		if (mode != PSR_MODE_EL2t && mode != PSR_MODE_EL2h) {
   309			kvm_err("Invalid host exception to nVHE hyp!\n");
   310		} else if (ESR_ELx_EC(esr) == ESR_ELx_EC_BRK64 &&
   311			   (esr & ESR_ELx_BRK64_ISS_COMMENT_MASK) == BUG_BRK_IMM) {
   312			struct bug_entry *bug = find_bug(elr_in_kimg);
   313			const char *file = NULL;
   314			unsigned int line = 0;
   315	
   316			/* All hyp bugs, including warnings, are treated as fatal. */
   317			if (bug)
 > 318				bug_get_file_line(bug, &file, &line);

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

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

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

* [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
@ 2021-04-14  4:39 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-04-14  4:39 UTC (permalink / raw)
  To: kbuild-all

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

Hi Andrew,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   dcf1b51d6b2ac5da234ae6883ed0e9422c339588
commit: aec0fae62e47050019474936248a311a0ab08705 [7952/12404] KVM: arm64: Log source when panicking from nVHE hyp
config: arm64-randconfig-r004-20210413 (attached as .config)
compiler: aarch64-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/next/linux-next.git/commit/?id=aec0fae62e47050019474936248a311a0ab08705
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout aec0fae62e47050019474936248a311a0ab08705
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

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/arm64/kvm/handle_exit.c:177:21: warning: initialized field overwritten [-Woverride-init]
     177 |  [ESR_ELx_EC_WFx] = kvm_handle_wfx,
         |                     ^~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:177:21: note: (near initialization for 'arm_exit_handlers[1]')
   arch/arm64/kvm/handle_exit.c:178:25: warning: initialized field overwritten [-Woverride-init]
     178 |  [ESR_ELx_EC_CP15_32] = kvm_handle_cp15_32,
         |                         ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:178:25: note: (near initialization for 'arm_exit_handlers[3]')
   arch/arm64/kvm/handle_exit.c:179:25: warning: initialized field overwritten [-Woverride-init]
     179 |  [ESR_ELx_EC_CP15_64] = kvm_handle_cp15_64,
         |                         ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:179:25: note: (near initialization for 'arm_exit_handlers[4]')
   arch/arm64/kvm/handle_exit.c:180:25: warning: initialized field overwritten [-Woverride-init]
     180 |  [ESR_ELx_EC_CP14_MR] = kvm_handle_cp14_32,
         |                         ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:180:25: note: (near initialization for 'arm_exit_handlers[5]')
   arch/arm64/kvm/handle_exit.c:181:25: warning: initialized field overwritten [-Woverride-init]
     181 |  [ESR_ELx_EC_CP14_LS] = kvm_handle_cp14_load_store,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:181:25: note: (near initialization for 'arm_exit_handlers[6]')
   arch/arm64/kvm/handle_exit.c:182:25: warning: initialized field overwritten [-Woverride-init]
     182 |  [ESR_ELx_EC_CP14_64] = kvm_handle_cp14_64,
         |                         ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:182:25: note: (near initialization for 'arm_exit_handlers[12]')
   arch/arm64/kvm/handle_exit.c:183:23: warning: initialized field overwritten [-Woverride-init]
     183 |  [ESR_ELx_EC_HVC32] = handle_hvc,
         |                       ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:183:23: note: (near initialization for 'arm_exit_handlers[18]')
   arch/arm64/kvm/handle_exit.c:184:23: warning: initialized field overwritten [-Woverride-init]
     184 |  [ESR_ELx_EC_SMC32] = handle_smc,
         |                       ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:184:23: note: (near initialization for 'arm_exit_handlers[19]')
   arch/arm64/kvm/handle_exit.c:185:23: warning: initialized field overwritten [-Woverride-init]
     185 |  [ESR_ELx_EC_HVC64] = handle_hvc,
         |                       ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:185:23: note: (near initialization for 'arm_exit_handlers[22]')
   arch/arm64/kvm/handle_exit.c:186:23: warning: initialized field overwritten [-Woverride-init]
     186 |  [ESR_ELx_EC_SMC64] = handle_smc,
         |                       ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:186:23: note: (near initialization for 'arm_exit_handlers[23]')
   arch/arm64/kvm/handle_exit.c:187:23: warning: initialized field overwritten [-Woverride-init]
     187 |  [ESR_ELx_EC_SYS64] = kvm_handle_sys_reg,
         |                       ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:187:23: note: (near initialization for 'arm_exit_handlers[24]')
   arch/arm64/kvm/handle_exit.c:188:21: warning: initialized field overwritten [-Woverride-init]
     188 |  [ESR_ELx_EC_SVE] = handle_sve,
         |                     ^~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:188:21: note: (near initialization for 'arm_exit_handlers[25]')
   arch/arm64/kvm/handle_exit.c:189:26: warning: initialized field overwritten [-Woverride-init]
     189 |  [ESR_ELx_EC_IABT_LOW] = kvm_handle_guest_abort,
         |                          ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:189:26: note: (near initialization for 'arm_exit_handlers[32]')
   arch/arm64/kvm/handle_exit.c:190:26: warning: initialized field overwritten [-Woverride-init]
     190 |  [ESR_ELx_EC_DABT_LOW] = kvm_handle_guest_abort,
         |                          ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:190:26: note: (near initialization for 'arm_exit_handlers[36]')
   arch/arm64/kvm/handle_exit.c:191:28: warning: initialized field overwritten [-Woverride-init]
     191 |  [ESR_ELx_EC_SOFTSTP_LOW]= kvm_handle_guest_debug,
         |                            ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:191:28: note: (near initialization for 'arm_exit_handlers[50]')
   arch/arm64/kvm/handle_exit.c:192:28: warning: initialized field overwritten [-Woverride-init]
     192 |  [ESR_ELx_EC_WATCHPT_LOW]= kvm_handle_guest_debug,
         |                            ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:192:28: note: (near initialization for 'arm_exit_handlers[52]')
   arch/arm64/kvm/handle_exit.c:193:28: warning: initialized field overwritten [-Woverride-init]
     193 |  [ESR_ELx_EC_BREAKPT_LOW]= kvm_handle_guest_debug,
         |                            ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:193:28: note: (near initialization for 'arm_exit_handlers[48]')
   arch/arm64/kvm/handle_exit.c:194:24: warning: initialized field overwritten [-Woverride-init]
     194 |  [ESR_ELx_EC_BKPT32] = kvm_handle_guest_debug,
         |                        ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:194:24: note: (near initialization for 'arm_exit_handlers[56]')
   arch/arm64/kvm/handle_exit.c:195:23: warning: initialized field overwritten [-Woverride-init]
     195 |  [ESR_ELx_EC_BRK64] = kvm_handle_guest_debug,
         |                       ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:195:23: note: (near initialization for 'arm_exit_handlers[60]')
   arch/arm64/kvm/handle_exit.c:196:26: warning: initialized field overwritten [-Woverride-init]
     196 |  [ESR_ELx_EC_FP_ASIMD] = handle_no_fpsimd,
         |                          ^~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:196:26: note: (near initialization for 'arm_exit_handlers[7]')
   arch/arm64/kvm/handle_exit.c:197:21: warning: initialized field overwritten [-Woverride-init]
     197 |  [ESR_ELx_EC_PAC] = kvm_handle_ptrauth,
         |                     ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c:197:21: note: (near initialization for 'arm_exit_handlers[9]')
   arch/arm64/kvm/handle_exit.c:295:24: warning: no previous prototype for 'nvhe_hyp_panic_handler' [-Wmissing-prototypes]
     295 | void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
         |                        ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/handle_exit.c: In function 'nvhe_hyp_panic_handler':
>> arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line' [-Werror=implicit-function-declaration]
     318 |    bug_get_file_line(bug, &file, &line);
         |    ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/bug_get_file_line +318 arch/arm64/kvm/handle_exit.c

   294	
   295	void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
   296						      u64 par, uintptr_t vcpu,
   297						      u64 far, u64 hpfar) {
   298		u64 elr_in_kimg = __phys_to_kimg(__hyp_pa(elr));
   299		u64 hyp_offset = elr_in_kimg - kaslr_offset() - elr;
   300		u64 mode = spsr & PSR_MODE_MASK;
   301	
   302		/*
   303		 * The nVHE hyp symbols are not included by kallsyms to avoid issues
   304		 * with aliasing. That means that the symbols cannot be printed with the
   305		 * "%pS" format specifier, so fall back to the vmlinux address if
   306		 * there's no better option.
   307		 */
   308		if (mode != PSR_MODE_EL2t && mode != PSR_MODE_EL2h) {
   309			kvm_err("Invalid host exception to nVHE hyp!\n");
   310		} else if (ESR_ELx_EC(esr) == ESR_ELx_EC_BRK64 &&
   311			   (esr & ESR_ELx_BRK64_ISS_COMMENT_MASK) == BUG_BRK_IMM) {
   312			struct bug_entry *bug = find_bug(elr_in_kimg);
   313			const char *file = NULL;
   314			unsigned int line = 0;
   315	
   316			/* All hyp bugs, including warnings, are treated as fatal. */
   317			if (bug)
 > 318				bug_get_file_line(bug, &file, &line);

---
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: 37760 bytes --]

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

* Re: [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
  2021-04-14  4:39 ` kernel test robot
@ 2021-04-14 16:47   ` Marc Zyngier
  -1 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-04-14 16:47 UTC (permalink / raw)
  To: Andrew Scull, kernel test robot; +Cc: kbuild-all, Linux Memory Management List

On Wed, 14 Apr 2021 05:39:56 +0100,
kernel test robot <lkp@intel.com> wrote:
> 
> Hi Andrew,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   dcf1b51d6b2ac5da234ae6883ed0e9422c339588
> commit: aec0fae62e47050019474936248a311a0ab08705 [7952/12404] KVM: arm64: Log source when panicking from nVHE hyp
> config: arm64-randconfig-r004-20210413 (attached as .config)
> compiler: aarch64-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/next/linux-next.git/commit/?id=aec0fae62e47050019474936248a311a0ab08705
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout aec0fae62e47050019474936248a311a0ab08705
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>

[...]

> vim +/bug_get_file_line +318 arch/arm64/kvm/handle_exit.c
> 
>    294	
>    295	void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
>    296						      u64 par, uintptr_t vcpu,
>    297						      u64 far, u64 hpfar) {
>    298		u64 elr_in_kimg = __phys_to_kimg(__hyp_pa(elr));
>    299		u64 hyp_offset = elr_in_kimg - kaslr_offset() - elr;
>    300		u64 mode = spsr & PSR_MODE_MASK;
>    301	
>    302		/*
>    303		 * The nVHE hyp symbols are not included by kallsyms to avoid issues
>    304		 * with aliasing. That means that the symbols cannot be printed with the
>    305		 * "%pS" format specifier, so fall back to the vmlinux address if
>    306		 * there's no better option.
>    307		 */
>    308		if (mode != PSR_MODE_EL2t && mode != PSR_MODE_EL2h) {
>    309			kvm_err("Invalid host exception to nVHE hyp!\n");
>    310		} else if (ESR_ELx_EC(esr) == ESR_ELx_EC_BRK64 &&
>    311			   (esr & ESR_ELx_BRK64_ISS_COMMENT_MASK) == BUG_BRK_IMM) {
>    312			struct bug_entry *bug = find_bug(elr_in_kimg);
>    313			const char *file = NULL;
>    314			unsigned int line = 0;
>    315	
>    316			/* All hyp bugs, including warnings, are treated as fatal. */
>    317			if (bug)
>  > 318				bug_get_file_line(bug, &file, &line);

Andrew,

This is what I plan to stick on top of your series. Let me know if
you're OK with it.

	M.

From cf083a45b3735d28f17e3b3c2f4f8fc72e5e1448 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <maz@kernel.org>
Date: Wed, 14 Apr 2021 17:41:14 +0100
Subject: [PATCH] bug: Provide dummy version of bug_get_file_line() when
 !GENERIC_BUG

Provide the missing dummy bug_get_file_line() implementation when
GENENERIC_BUG isn't selected.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line")
Cc: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/bug.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/bug.h b/include/linux/bug.h
index e3841bee4c8d..beb85f169283 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -61,6 +61,11 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr,
 	return BUG_TRAP_TYPE_BUG;
 }
 
+void inline bug_get_file_line(struct bug_entry *bug, const char **file,
+			      unsigned int *line)
+{
+	*file = NULL;
+}
 
 static inline void generic_bug_clear_once(void) {}
 
-- 
2.30.2


-- 
Without deviation from the norm, progress is not possible.


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

* Re: [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
@ 2021-04-14 16:47   ` Marc Zyngier
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-04-14 16:47 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, 14 Apr 2021 05:39:56 +0100,
kernel test robot <lkp@intel.com> wrote:
> 
> Hi Andrew,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   dcf1b51d6b2ac5da234ae6883ed0e9422c339588
> commit: aec0fae62e47050019474936248a311a0ab08705 [7952/12404] KVM: arm64: Log source when panicking from nVHE hyp
> config: arm64-randconfig-r004-20210413 (attached as .config)
> compiler: aarch64-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/next/linux-next.git/commit/?id=aec0fae62e47050019474936248a311a0ab08705
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout aec0fae62e47050019474936248a311a0ab08705
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>

[...]

> vim +/bug_get_file_line +318 arch/arm64/kvm/handle_exit.c
> 
>    294	
>    295	void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
>    296						      u64 par, uintptr_t vcpu,
>    297						      u64 far, u64 hpfar) {
>    298		u64 elr_in_kimg = __phys_to_kimg(__hyp_pa(elr));
>    299		u64 hyp_offset = elr_in_kimg - kaslr_offset() - elr;
>    300		u64 mode = spsr & PSR_MODE_MASK;
>    301	
>    302		/*
>    303		 * The nVHE hyp symbols are not included by kallsyms to avoid issues
>    304		 * with aliasing. That means that the symbols cannot be printed with the
>    305		 * "%pS" format specifier, so fall back to the vmlinux address if
>    306		 * there's no better option.
>    307		 */
>    308		if (mode != PSR_MODE_EL2t && mode != PSR_MODE_EL2h) {
>    309			kvm_err("Invalid host exception to nVHE hyp!\n");
>    310		} else if (ESR_ELx_EC(esr) == ESR_ELx_EC_BRK64 &&
>    311			   (esr & ESR_ELx_BRK64_ISS_COMMENT_MASK) == BUG_BRK_IMM) {
>    312			struct bug_entry *bug = find_bug(elr_in_kimg);
>    313			const char *file = NULL;
>    314			unsigned int line = 0;
>    315	
>    316			/* All hyp bugs, including warnings, are treated as fatal. */
>    317			if (bug)
>  > 318				bug_get_file_line(bug, &file, &line);

Andrew,

This is what I plan to stick on top of your series. Let me know if
you're OK with it.

	M.

>From cf083a45b3735d28f17e3b3c2f4f8fc72e5e1448 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <maz@kernel.org>
Date: Wed, 14 Apr 2021 17:41:14 +0100
Subject: [PATCH] bug: Provide dummy version of bug_get_file_line() when
 !GENERIC_BUG

Provide the missing dummy bug_get_file_line() implementation when
GENENERIC_BUG isn't selected.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line")
Cc: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/bug.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/bug.h b/include/linux/bug.h
index e3841bee4c8d..beb85f169283 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -61,6 +61,11 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr,
 	return BUG_TRAP_TYPE_BUG;
 }
 
+void inline bug_get_file_line(struct bug_entry *bug, const char **file,
+			      unsigned int *line)
+{
+	*file = NULL;
+}
 
 static inline void generic_bug_clear_once(void) {}
 
-- 
2.30.2


-- 
Without deviation from the norm, progress is not possible.

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

* Re: [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
  2021-04-14 16:47   ` Marc Zyngier
@ 2021-04-14 16:54     ` Marc Zyngier
  -1 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-04-14 16:54 UTC (permalink / raw)
  To: Andrew Scull, kernel test robot; +Cc: kbuild-all, Linux Memory Management List

On Wed, 14 Apr 2021 17:47:56 +0100,
Marc Zyngier <maz@kernel.org> wrote:
> 
> On Wed, 14 Apr 2021 05:39:56 +0100,
> kernel test robot <lkp@intel.com> wrote:
> > 
> > Hi Andrew,
> > 
> > FYI, the error/warning still remains.
> > 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   dcf1b51d6b2ac5da234ae6883ed0e9422c339588
> > commit: aec0fae62e47050019474936248a311a0ab08705 [7952/12404] KVM: arm64: Log source when panicking from nVHE hyp
> > config: arm64-randconfig-r004-20210413 (attached as .config)
> > compiler: aarch64-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/next/linux-next.git/commit/?id=aec0fae62e47050019474936248a311a0ab08705
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout aec0fae62e47050019474936248a311a0ab08705
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> 
> [...]
> 
> > vim +/bug_get_file_line +318 arch/arm64/kvm/handle_exit.c
> > 
> >    294	
> >    295	void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
> >    296						      u64 par, uintptr_t vcpu,
> >    297						      u64 far, u64 hpfar) {
> >    298		u64 elr_in_kimg = __phys_to_kimg(__hyp_pa(elr));
> >    299		u64 hyp_offset = elr_in_kimg - kaslr_offset() - elr;
> >    300		u64 mode = spsr & PSR_MODE_MASK;
> >    301	
> >    302		/*
> >    303		 * The nVHE hyp symbols are not included by kallsyms to avoid issues
> >    304		 * with aliasing. That means that the symbols cannot be printed with the
> >    305		 * "%pS" format specifier, so fall back to the vmlinux address if
> >    306		 * there's no better option.
> >    307		 */
> >    308		if (mode != PSR_MODE_EL2t && mode != PSR_MODE_EL2h) {
> >    309			kvm_err("Invalid host exception to nVHE hyp!\n");
> >    310		} else if (ESR_ELx_EC(esr) == ESR_ELx_EC_BRK64 &&
> >    311			   (esr & ESR_ELx_BRK64_ISS_COMMENT_MASK) == BUG_BRK_IMM) {
> >    312			struct bug_entry *bug = find_bug(elr_in_kimg);
> >    313			const char *file = NULL;
> >    314			unsigned int line = 0;
> >    315	
> >    316			/* All hyp bugs, including warnings, are treated as fatal. */
> >    317			if (bug)
> >  > 318				bug_get_file_line(bug, &file, &line);
> 
> Andrew,
> 
> This is what I plan to stick on top of your series. Let me know if
> you're OK with it.

Duh. And now for the real patch and not the dummy thing that was in my
sandbox...

	M.

From 882ff4062169d5914ad7ed88c9138a90e485c05e Mon Sep 17 00:00:00 2001
From: Marc Zyngier <maz@kernel.org>
Date: Wed, 14 Apr 2021 17:41:14 +0100
Subject: [PATCH] bug: Provide dummy version of bug_get_file_line() when
 !GENERIC_BUG

Provide the missing dummy bug_get_file_line() implementation when
GENENERIC_BUG isn't selected.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line")
Cc: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/bug.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/bug.h b/include/linux/bug.h
index e3841bee4c8d..d889ee043118 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -61,6 +61,12 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr,
 	return BUG_TRAP_TYPE_BUG;
 }
 
+struct bug_entry;
+static inline void bug_get_file_line(struct bug_entry *bug, const char **file,
+				     unsigned int *line)
+{
+	*file = NULL;
+}
 
 static inline void generic_bug_clear_once(void) {}
 
-- 
2.30.2


-- 
Without deviation from the norm, progress is not possible.


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

* Re: [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
@ 2021-04-14 16:54     ` Marc Zyngier
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-04-14 16:54 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, 14 Apr 2021 17:47:56 +0100,
Marc Zyngier <maz@kernel.org> wrote:
> 
> On Wed, 14 Apr 2021 05:39:56 +0100,
> kernel test robot <lkp@intel.com> wrote:
> > 
> > Hi Andrew,
> > 
> > FYI, the error/warning still remains.
> > 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   dcf1b51d6b2ac5da234ae6883ed0e9422c339588
> > commit: aec0fae62e47050019474936248a311a0ab08705 [7952/12404] KVM: arm64: Log source when panicking from nVHE hyp
> > config: arm64-randconfig-r004-20210413 (attached as .config)
> > compiler: aarch64-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/next/linux-next.git/commit/?id=aec0fae62e47050019474936248a311a0ab08705
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout aec0fae62e47050019474936248a311a0ab08705
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> 
> [...]
> 
> > vim +/bug_get_file_line +318 arch/arm64/kvm/handle_exit.c
> > 
> >    294	
> >    295	void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
> >    296						      u64 par, uintptr_t vcpu,
> >    297						      u64 far, u64 hpfar) {
> >    298		u64 elr_in_kimg = __phys_to_kimg(__hyp_pa(elr));
> >    299		u64 hyp_offset = elr_in_kimg - kaslr_offset() - elr;
> >    300		u64 mode = spsr & PSR_MODE_MASK;
> >    301	
> >    302		/*
> >    303		 * The nVHE hyp symbols are not included by kallsyms to avoid issues
> >    304		 * with aliasing. That means that the symbols cannot be printed with the
> >    305		 * "%pS" format specifier, so fall back to the vmlinux address if
> >    306		 * there's no better option.
> >    307		 */
> >    308		if (mode != PSR_MODE_EL2t && mode != PSR_MODE_EL2h) {
> >    309			kvm_err("Invalid host exception to nVHE hyp!\n");
> >    310		} else if (ESR_ELx_EC(esr) == ESR_ELx_EC_BRK64 &&
> >    311			   (esr & ESR_ELx_BRK64_ISS_COMMENT_MASK) == BUG_BRK_IMM) {
> >    312			struct bug_entry *bug = find_bug(elr_in_kimg);
> >    313			const char *file = NULL;
> >    314			unsigned int line = 0;
> >    315	
> >    316			/* All hyp bugs, including warnings, are treated as fatal. */
> >    317			if (bug)
> >  > 318				bug_get_file_line(bug, &file, &line);
> 
> Andrew,
> 
> This is what I plan to stick on top of your series. Let me know if
> you're OK with it.

Duh. And now for the real patch and not the dummy thing that was in my
sandbox...

	M.

>From 882ff4062169d5914ad7ed88c9138a90e485c05e Mon Sep 17 00:00:00 2001
From: Marc Zyngier <maz@kernel.org>
Date: Wed, 14 Apr 2021 17:41:14 +0100
Subject: [PATCH] bug: Provide dummy version of bug_get_file_line() when
 !GENERIC_BUG

Provide the missing dummy bug_get_file_line() implementation when
GENENERIC_BUG isn't selected.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line")
Cc: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/bug.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/bug.h b/include/linux/bug.h
index e3841bee4c8d..d889ee043118 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -61,6 +61,12 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr,
 	return BUG_TRAP_TYPE_BUG;
 }
 
+struct bug_entry;
+static inline void bug_get_file_line(struct bug_entry *bug, const char **file,
+				     unsigned int *line)
+{
+	*file = NULL;
+}
 
 static inline void generic_bug_clear_once(void) {}
 
-- 
2.30.2


-- 
Without deviation from the norm, progress is not possible.

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

* Re: [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
  2021-04-14 16:54     ` Marc Zyngier
@ 2021-04-15  8:19       ` Andrew Scull
  -1 siblings, 0 replies; 8+ messages in thread
From: Andrew Scull @ 2021-04-15  8:19 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: kernel test robot, kbuild-all, Linux Memory Management List

> > Andrew,
> >
> > This is what I plan to stick on top of your series. Let me know if
> > you're OK with it.
>
> Duh. And now for the real patch and not the dummy thing that was in my
> sandbox...
>
>         M.
>
> From 882ff4062169d5914ad7ed88c9138a90e485c05e Mon Sep 17 00:00:00 2001
> From: Marc Zyngier <maz@kernel.org>
> Date: Wed, 14 Apr 2021 17:41:14 +0100
> Subject: [PATCH] bug: Provide dummy version of bug_get_file_line() when
>  !GENERIC_BUG
>
> Provide the missing dummy bug_get_file_line() implementation when
> GENENERIC_BUG isn't selected.

Oh, conditional in the Makefile...

>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line")
> Cc: Andrew Scull <ascull@google.com>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  include/linux/bug.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/include/linux/bug.h b/include/linux/bug.h
> index e3841bee4c8d..d889ee043118 100644
> --- a/include/linux/bug.h
> +++ b/include/linux/bug.h
> @@ -61,6 +61,12 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr,
>         return BUG_TRAP_TYPE_BUG;
>  }
>
> +struct bug_entry;
> +static inline void bug_get_file_line(struct bug_entry *bug, const char **file,
> +                                    unsigned int *line)
> +{
> +       *file = NULL;

`line` is also an output argument so it might be worth zeroing even
though it shouldn't really be used if `file` is NULL. Otherwise,
thanks for catching!

> +}
>
>  static inline void generic_bug_clear_once(void) {}
>
> --
> 2.30.2


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

* Re: [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
@ 2021-04-15  8:19       ` Andrew Scull
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Scull @ 2021-04-15  8:19 UTC (permalink / raw)
  To: kbuild-all

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

> > Andrew,
> >
> > This is what I plan to stick on top of your series. Let me know if
> > you're OK with it.
>
> Duh. And now for the real patch and not the dummy thing that was in my
> sandbox...
>
>         M.
>
> From 882ff4062169d5914ad7ed88c9138a90e485c05e Mon Sep 17 00:00:00 2001
> From: Marc Zyngier <maz@kernel.org>
> Date: Wed, 14 Apr 2021 17:41:14 +0100
> Subject: [PATCH] bug: Provide dummy version of bug_get_file_line() when
>  !GENERIC_BUG
>
> Provide the missing dummy bug_get_file_line() implementation when
> GENENERIC_BUG isn't selected.

Oh, conditional in the Makefile...

>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line")
> Cc: Andrew Scull <ascull@google.com>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  include/linux/bug.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/include/linux/bug.h b/include/linux/bug.h
> index e3841bee4c8d..d889ee043118 100644
> --- a/include/linux/bug.h
> +++ b/include/linux/bug.h
> @@ -61,6 +61,12 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr,
>         return BUG_TRAP_TYPE_BUG;
>  }
>
> +struct bug_entry;
> +static inline void bug_get_file_line(struct bug_entry *bug, const char **file,
> +                                    unsigned int *line)
> +{
> +       *file = NULL;

`line` is also an output argument so it might be worth zeroing even
though it shouldn't really be used if `file` is NULL. Otherwise,
thanks for catching!

> +}
>
>  static inline void generic_bug_clear_once(void) {}
>
> --
> 2.30.2

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

end of thread, other threads:[~2021-04-15  8:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14  4:39 [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line' kernel test robot
2021-04-14  4:39 ` kernel test robot
2021-04-14 16:47 ` Marc Zyngier
2021-04-14 16:47   ` Marc Zyngier
2021-04-14 16:54   ` Marc Zyngier
2021-04-14 16:54     ` Marc Zyngier
2021-04-15  8:19     ` Andrew Scull
2021-04-15  8:19       ` Andrew Scull

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.