linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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:47:56 +0100	[thread overview]
Message-ID: <87mtu0n77n.wl-maz@kernel.org> (raw)
In-Reply-To: <202104141253.bL6hQTMm-lkp@intel.com>

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.


  reply	other threads:[~2021-04-14 16:48 UTC|newest]

Thread overview: 4+ 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 16:47 ` Marc Zyngier [this message]
2021-04-14 16:54   ` Marc Zyngier
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=87mtu0n77n.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=ascull@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).