On Tue, Feb 20, 2024 at 01:41:15PM +0000, Marc Zyngier wrote: > On Tue, 20 Feb 2024 13:23:50 +0000, > Joey Gouly <joey.gouly@xxxxxxx> wrote: > > > > On Tue, Feb 20, 2024 at 12:29:30PM +0000, Marc Zyngier wrote: > > > On Tue, 20 Feb 2024 11:31:27 +0000, > > > Joey Gouly <joey.gouly@xxxxxxx> wrote: > > > > > > > > If this part is confusing due to the name, maybe introduce a function in esr.h > > > > esr_is_pac_eret() (name pending bikeshedding)? > > > > > > That's indeed a better option. Now for the bikeshed aspect: > > > > > > - esr_iss_is_eretax(): check for ESR_ELx_ERET_ISS_ERET being set > > > > > > - esr_iss_is_eretab(): check for ESR_ELx_ERET_ISS_ERETA being set > > > > > > Thoughts? > > > > > > > I was trying to avoid the ERETA* confusion by suggesting 'pac_eret', but if I > > were to pick between your options I'd pick esr_iss_is_eretax(). > > It's not an either/or situation. We actually need both: > > - esr_iss_is_eretax() being true tells you that you need to > authenticate the ERET > > - esr_iss_is_eretab() tells you that you need to use the A or B key Oh right, yes that makes sense (please add a brief comment like ^ above the functions) Thanks, Joey