Subject: Re: [PATCH v2 08/12] arm64: BTI: Decode BYTPE bits when printing PSTATE

From: Dave Martin <[email-masked]>
Date: Fri, 11 Oct 2019 16:33:46 +0100

On Fri, Oct 11, 2019 at 11:31:02AM -0400, Richard Henderson wrote:
> On 10/10/19 2:44 PM, Dave Martin wrote:
> >  #define PSR_IL_BIT		(1 << 20)
> > -#define PSR_BTYPE_CALL		(2 << PSR_BTYPE_SHIFT)
> > +
> > +/* Convenience names for the values of PSTATE.BTYPE */
> > +#define PSR_BTYPE_NONE		(0b00 << PSR_BTYPE_SHIFT)
> > +#define PSR_BTYPE_JC		(0b01 << PSR_BTYPE_SHIFT)
> > +#define PSR_BTYPE_C		(0b10 << PSR_BTYPE_SHIFT)
> > +#define PSR_BTYPE_J		(0b11 << PSR_BTYPE_SHIFT)
> 
> It'd be nice to sort this patch earlier, so that ...
> 
> > diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c
> > index 4a3bd32..452ac5b 100644
> > --- a/arch/arm64/kernel/signal.c
> > +++ b/arch/arm64/kernel/signal.c
> > @@ -732,7 +732,7 @@ static void setup_return(struct pt_regs *regs, struct k_sigaction *ka,
> >  
> >  	if (system_supports_bti()) {
> >  		regs->pstate &= ~PSR_BTYPE_MASK;
> > -		regs->pstate |= PSR_BTYPE_CALL;
> > +		regs->pstate |= PSR_BTYPE_C;
> >  	}
> >  
> >  	if (ka->sa.sa_flags & SA_RESTORER)
> 
> ... setup_return does not need to be adjusted a second time.
> 
> I don't see any other conflicts vs patch 5.

Ack, looks like I mis-split this during rebase.

Will fix.

Cheers
---Dave

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel