Return-Path: Received: from foss.arm.com ([217.140.110.172]:55460 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbgANRej (ORCPT ); Tue, 14 Jan 2020 12:34:39 -0500 Date: Tue, 14 Jan 2020 17:34:33 +0000 From: Catalin Marinas Subject: Re: [PATCH v4 07/12] arm64: BTI: Decode BYTPE bits when printing PSTATE Message-ID: <20200114173433.GK30444@arrakis.emea.arm.com> References: <20191211154206.46260-1-broonie@kernel.org> <20191211154206.46260-8-broonie@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191211154206.46260-8-broonie@kernel.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Mark Brown Cc: Will Deacon , Paul Elliott , Peter Zijlstra , Yu-cheng Yu , Amit Kachhap , Vincenzo Frascino , Marc Zyngier , Eugene Syromiatnikov , Szabolcs Nagy , "H.J. Lu" , Andrew Jones , Kees Cook , Arnd Bergmann , Jann Horn , Richard Henderson , Kristina =?utf-8?Q?Mart=C5=A1enko?= , Thomas Gleixner , Florian Weimer , Sudakshina Das , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Dave Martin Message-ID: <20200114173433.H1m5Nj6q6S4V8Rc32AStT7MGqbcpgfpSwpIuLw56lPQ@z> On Wed, Dec 11, 2019 at 03:42:01PM +0000, Mark Brown wrote: > From: Dave Martin > > The current code to print PSTATE symbolically when generating > backtraces etc., does not include the BYTPE field used by Branch > Target Identification. > > So, decode BYTPE and print it too. > > In the interests of human-readability, print the classes of BTI > matched. The symbolic notation, BYTPE (PSTATE[11:10]) and > permitted classes of subsequent instruction are: > > -- (BTYPE=0b00): any insn > jc (BTYPE=0b01): BTI jc, BTI j, BTI c, PACIxSP > -c (BYTPE=0b10): BTI jc, BTI c, PACIxSP > j- (BTYPE=0b11): BTI jc, BTI j > > Signed-off-by: Dave Martin > Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas