[PATCH v4 07/12] arm64: BTI: Decode BYTPE bits when printing PSTATE

Catalin Marinas catalin.marinas at arm.com
Tue Jan 14 09:34:33 PST 2020


On Wed, Dec 11, 2019 at 03:42:01PM +0000, Mark Brown wrote:
> From: Dave Martin <Dave.Martin at arm.com>
> 
> 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 <Dave.Martin at arm.com>
> Signed-off-by: Mark Brown <broonie at kernel.org>

Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list