On Wed, 14 Apr 2021 17:47:56 +0100, Marc Zyngier <maz@xxxxxxxxxx> wrote: > > On Wed, 14 Apr 2021 05:39:56 +0100, > kernel test robot <lkp@xxxxxxxxx> 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@xxxxxxxxx> > > [...] > > > 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@xxxxxxxxxx> 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@xxxxxxxxx> Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line") Cc: Andrew Scull <ascull@xxxxxxxxxx> Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx> --- 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.