From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E35BFC433ED for ; Wed, 14 Apr 2021 16:48:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 75FC861155 for ; Wed, 14 Apr 2021 16:48:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75FC861155 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A14486B0071; Wed, 14 Apr 2021 12:48:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EAEC6B0072; Wed, 14 Apr 2021 12:48:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8DA156B0073; Wed, 14 Apr 2021 12:48:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0079.hostedemail.com [216.40.44.79]) by kanga.kvack.org (Postfix) with ESMTP id 728056B0071 for ; Wed, 14 Apr 2021 12:48:01 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1EBB51801F2D0 for ; Wed, 14 Apr 2021 16:48:01 +0000 (UTC) X-FDA: 78031554762.16.7F09749 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf15.hostedemail.com (Postfix) with ESMTP id E7F3AA0003A3 for ; Wed, 14 Apr 2021 16:47:58 +0000 (UTC) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C2E0B6023C; Wed, 14 Apr 2021 16:47:59 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lWigH-007TX8-MX; Wed, 14 Apr 2021 17:47:57 +0100 Date: Wed, 14 Apr 2021 17:47:56 +0100 Message-ID: <87mtu0n77n.wl-maz@kernel.org> From: Marc Zyngier To: Andrew Scull , kernel test robot Cc: kbuild-all@lists.01.org, Linux Memory Management List Subject: Re: [linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line' In-Reply-To: <202104141253.bL6hQTMm-lkp@intel.com> References: <202104141253.bL6hQTMm-lkp@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: ascull@google.com, lkp@intel.com, kbuild-all@lists.01.org, linux-mm@kvack.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E7F3AA0003A3 X-Stat-Signature: nmafc75euxzmotnyboi5ewb96iginjjs Received-SPF: none (kernel.org>: No applicable sender policy available) receiver=imf15; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: none/none X-HE-Tag: 1618418878-669049 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 14 Apr 2021 05:39:56 +0100, kernel test robot wrote: >=20 > Hi Andrew, >=20 > FYI, the error/warning still remains. >=20 > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.g= it 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=3D1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/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=3Daec0fae62e47050019474936248a311a0ab08705 > git remote add linux-next https://git.kernel.org/pub/scm/linux/ke= rnel/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=3D$HOME/0day COMPILER=3Dgcc-9.3.0 make.cros= s ARCH=3Darm64=20 >=20 > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot [...] > vim +/bug_get_file_line +318 arch/arm64/kvm/handle_exit.c >=20 > 294=09 > 295 void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u= 64 elr, > 296 u64 par, uintptr_t vcpu, > 297 u64 far, u64 hpfar) { > 298 u64 elr_in_kimg =3D __phys_to_kimg(__hyp_pa(elr)); > 299 u64 hyp_offset =3D elr_in_kimg - kaslr_offset() - elr; > 300 u64 mode =3D spsr & PSR_MODE_MASK; > 301=09 > 302 /* > 303 * The nVHE hyp symbols are not included by kallsyms to avoid iss= ues > 304 * with aliasing. That means that the symbols cannot be printed w= ith the > 305 * "%pS" format specifier, so fall back to the vmlinux address if > 306 * there's no better option. > 307 */ > 308 if (mode !=3D PSR_MODE_EL2t && mode !=3D PSR_MODE_EL2h) { > 309 kvm_err("Invalid host exception to nVHE hyp!\n"); > 310 } else if (ESR_ELx_EC(esr) =3D=3D ESR_ELx_EC_BRK64 && > 311 (esr & ESR_ELx_BRK64_ISS_COMMENT_MASK) =3D=3D BUG_BRK_IMM) { > 312 struct bug_entry *bug =3D find_bug(elr_in_kimg); > 313 const char *file =3D NULL; > 314 unsigned int line =3D 0; > 315=09 > 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. =46rom cf083a45b3735d28f17e3b3c2f4f8fc72e5e1448 Mon Sep 17 00:00:00 2001 From: Marc Zyngier 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 Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line") Cc: Andrew Scull Signed-off-by: Marc Zyngier --- 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 lon= g bug_addr, return BUG_TRAP_TYPE_BUG; } =20 +void inline bug_get_file_line(struct bug_entry *bug, const char **file, + unsigned int *line) +{ + *file =3D NULL; +} =20 static inline void generic_bug_clear_once(void) {} =20 --=20 2.30.2 --=20 Without deviation from the norm, progress is not possible.