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 BD749C433B4 for ; Wed, 14 Apr 2021 16:54:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 52FD961153 for ; Wed, 14 Apr 2021 16:54:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52FD961153 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 D69396B0073; Wed, 14 Apr 2021 12:54:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D1B766B0074; Wed, 14 Apr 2021 12:54:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBB126B0075; Wed, 14 Apr 2021 12:54:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id A069A6B0073 for ; Wed, 14 Apr 2021 12:54:48 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4DA5E181B7E09 for ; Wed, 14 Apr 2021 16:54:48 +0000 (UTC) X-FDA: 78031571856.15.5B2328B Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf08.hostedemail.com (Postfix) with ESMTP id 43D5480192EA for ; Wed, 14 Apr 2021 16:54:34 +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 E55E5601FC; Wed, 14 Apr 2021 16:54:46 +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 1lWimr-007TZc-19; Wed, 14 Apr 2021 17:54:45 +0100 Date: Wed, 14 Apr 2021 17:54:44 +0100 Message-ID: <87lf9kn6wb.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: <87mtu0n77n.wl-maz@kernel.org> References: <202104141253.bL6hQTMm-lkp@intel.com> <87mtu0n77n.wl-maz@kernel.org> 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: 43D5480192EA X-Stat-Signature: yexbt85apgyfpzejb43qnh41q4zn7ui5 Received-SPF: none (kernel.org>: No applicable sender policy available) receiver=imf08; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: none/none X-HE-Tag: 1618419274-824676 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 17:47:56 +0100, Marc Zyngier wrote: >=20 > 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= .git master > > head: dcf1b51d6b2ac5da234ae6883ed0e9422c339588 > > commit: aec0fae62e47050019474936248a311a0ab08705 [7952/12404] KVM: arm6= 4: 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/s= bin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-ne= xt.git/commit/?id=3Daec0fae62e47050019474936248a311a0ab08705 > > 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=3D$HOME/0day COMPILER=3Dgcc-9.3.0 make.cr= oss ARCH=3Darm64=20 > >=20 > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot >=20 > [...] >=20 > > 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,= u64 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 i= ssues > > 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 !=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); >=20 > Andrew, >=20 > 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. =46rom 882ff4062169d5914ad7ed88c9138a90e485c05e 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 | 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 lon= g bug_addr, return BUG_TRAP_TYPE_BUG; } =20 +struct bug_entry; +static inline void bug_get_file_line(struct bug_entry *bug, const char **f= ile, + 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.