From: Marc Zyngier <maz@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
Date: Wed, 14 Apr 2021 17:54:44 +0100 [thread overview]
Message-ID: <87lf9kn6wb.wl-maz@kernel.org> (raw)
In-Reply-To: <87mtu0n77n.wl-maz@kernel.org>
[-- 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.
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Andrew Scull <ascull@google.com>, kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
Date: Wed, 14 Apr 2021 17:54:44 +0100 [thread overview]
Message-ID: <87lf9kn6wb.wl-maz@kernel.org> (raw)
In-Reply-To: <87mtu0n77n.wl-maz@kernel.org>
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.
next prev parent reply other threads:[~2021-04-14 16:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2021-04-14 16:54 ` Marc Zyngier
2021-04-15 8:19 ` Andrew Scull
2021-04-15 8:19 ` Andrew Scull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lf9kn6wb.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.