Re: [PATCH v4 07/12] arm64: BTI: Decode BYTPE bits when printing PSTATE
From: Catalin Marinas
Date: Tue Jan 14 2020 - 12:34:41 EST
On Wed, Dec 11, 2019 at 03:42:01PM +0000, Mark Brown wrote:
> From: Dave Martin <Dave.Martin@xxxxxxx>
>
> 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@xxxxxxx>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>