Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1093635ybg; Thu, 4 Jun 2020 00:24:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkACQRFnsNfm2UnJfiQ+D+63h5J8E/m78Ut4llDasQLctrhNhzc51IcAbbqTj8EpEzMHaD X-Received: by 2002:aa7:cd6d:: with SMTP id ca13mr2893890edb.280.1591255493271; Thu, 04 Jun 2020 00:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591255493; cv=none; d=google.com; s=arc-20160816; b=Tk3XtJvEaNPOGRdvpti/k/TzWZP92YHHohjj5NfgkfKD0nqPfb6apGvM2Mnu2a0fXQ Zyp4KUGlsvvBFIGbprpCEBHFneevCxapJAptRl9Gy+1LDP70apKT8uhVAaBKUPYycucC 3lY/+ZG6YtYYYtdTSIg9tk0A6mnkakiviPmlyj+da47HZa3qXcS5zcFABb/T0oUQOA5d 2Y09aQM/A0t9jDPYphHwzlh0kmKN5atnQf7VKgJt5Mw92TEzOdnRPBxRRpeUdjOlrJAS 9S4Gt5U2pdRmMDHW5ZHHcgOM6FKWuvJSh9vhn4IQIfzj0MSWEek4BOtZwGFlj2Zpishx mBNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YW2QjHKg8YDlhOHocIb1f1C92jM0EAmy9qjwilTcIOE=; b=vVjxulCA9DPentVPjm61nVFe7SwdJ3uWsszbqSxXOQcBPlWnCDvHA0i1vH/r7qzSAy 6yh4Fx+bEwpS3wF/X5zkl8mmC5wfWlqits+a+va0jL5FiAeod8YtT6X0gKuoWy1O8/lG kwD7r+XLgGdIlBHU+1R6C4SObDsdQAm1x0by0xnBXbzMMTpeso5pDfkGF/bgw/ebVWY6 dpxoDOH9PFaxigYSnvPYT/Oj/TCG4w75c/htvGZfbot6rgsMNcJ+ktY58cEHkgKF/maJ r04nrh9yUZ02WdY1mE1Ecba0QsSkuk5oQqBurmVt3kbBny8i0oBvtaJdNl321z9w8WsO phcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ufXYBTJP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pk14si1150470ejb.368.2020.06.04.00.24.29; Thu, 04 Jun 2020 00:24:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ufXYBTJP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727921AbgFDHTb (ORCPT + 99 others); Thu, 4 Jun 2020 03:19:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:51890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726890AbgFDHTa (ORCPT ); Thu, 4 Jun 2020 03:19:30 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 83AEC206DC; Thu, 4 Jun 2020 07:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591255169; bh=ETl2ZxNOKb1cDLDKRZ2alx6UEVWZ+SN+r8+JbZmbJnE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ufXYBTJPnU5EFSxHKDYwKnUA4G8CcNq1OZhCCHpQMkayuaguK9VP/u8SKUL4R4xbT c8XDu2PQXPgtEwnYiHgQfIFtmjiyCjIH6uNzAqDUWBviaatZM50AFO8/f2x0vFje22 9IgYTM16yaUTXaK+ouUXysDmGRmO6wU6AuaGXQ+U= Date: Thu, 4 Jun 2020 08:19:24 +0100 From: Will Deacon To: Bhupesh Sharma Cc: Kamlakant Patel , "linux-arm-kernel@lists.infradead.org" , "x86@kernel.org" , Mark Rutland , Kazuhito Hagio , Steve Capper , Catalin Marinas , Ard Biesheuvel , "kexec@lists.infradead.org" , "linux-kernel@vger.kernel.org" , James Morse , Dave Anderson , "bhupesh.linux@gmail.com" , Ganapatrao Kulkarni Subject: Re: [PATCH v6 2/2] arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo Message-ID: <20200604071923.GB30155@willie-the-truck> References: <1589395957-24628-1-git-send-email-bhsharma@redhat.com> <1589395957-24628-3-git-send-email-bhsharma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 04, 2020 at 02:04:58AM +0530, Bhupesh Sharma wrote: > On Wed, Jun 3, 2020 at 4:50 PM Kamlakant Patel wrote: > > > diff --git a/arch/arm64/kernel/crash_core.c b/arch/arm64/kernel/crash_core.c > > > index 1f646b07e3e9..314391a156ee 100644 > > > --- a/arch/arm64/kernel/crash_core.c > > > +++ b/arch/arm64/kernel/crash_core.c > > > @@ -7,6 +7,14 @@ > > > #include > > > #include > > > #include > > > +#include > > > + > > > +static inline u64 get_tcr_el1_t1sz(void); > > > + > > > +static inline u64 get_tcr_el1_t1sz(void) { > > > + return (read_sysreg(tcr_el1) & TCR_T1SZ_MASK) >> TCR_T1SZ_OFFSET; } > > > > > > void arch_crash_save_vmcoreinfo(void) > > > { > > > @@ -16,6 +24,8 @@ void arch_crash_save_vmcoreinfo(void) > > > kimage_voffset); > > > vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n", > > > PHYS_OFFSET); > > > + vmcoreinfo_append_str("NUMBER(TCR_EL1_T1SZ)=0x%llx\n", > > > + get_tcr_el1_t1sz()); > > I tested this patch on top of upstream kernel v5.7 and I am getting "crash: cannot determine VA_BITS_ACTUAL" error with crash tool. > > I looked into crash-utility source and it is expecting tcr_el1_t1sz not TCR_EL1_T1SZ. > > Could you please check. > > Indeed. As per James comments on the v5 (see [1]) where he suggested > converting ttcr_el1_t1sz into TCR_EL1_T1SZ, I made the change in v6 > accordingly. > > This time I haven't sent out the v6 userspace changes > (makedumpfile/crash-utility) upstream first, since we are waiting for > kernel changes to be accepted first, as we have seen in the past that > while the userspace patches have been accepted, the kernel patches > required a respin cycle, thus leading to inconsistencies, as you also > pointed out with crash-utility. Yes, and that';s the right way to do it. Userspace can't rely on the stability of a kernel interface if it's no in the upstream kernel! So doing with the ALL CAPS names is the right thing to do. Will