lkml.org 
[lkml]   [2020]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 29/39] arm64: mte: Switch GCR_EL1 in kernel entry and exit
On Fri, Sep 25, 2020 at 12:50:23PM +0100, Vincenzo Frascino wrote:
> On 9/25/20 12:34 PM, Catalin Marinas wrote:
> > On Fri, Sep 25, 2020 at 12:50:36AM +0200, Andrey Konovalov wrote:
> >> + /*
> >> + * Calculate and set the exclude mask preserving
> >> + * the RRND (bit[16]) setting.
> >> + */
> >> + mrs_s \tmp2, SYS_GCR_EL1
> >> + bfi \tmp2, \tmp, #0, #16
> >> + msr_s SYS_GCR_EL1, \tmp2
> >> + isb
> >> +1:
> >> +#endif
> >> + .endm
> >> +
> >> + .macro mte_set_kernel_gcr, tsk, tmp, tmp2
> >
> > What's the point of a 'tsk' argument here?
>
> It is unused. I kept the interface same in between kernel and user.
> I can either add a comment or remove it. Which one do you prefer?

Please remove it. Having the same interface is more confusing since you
have a single kernel gcr_excl but multiple user gcr_excl.

--
Catalin

\
 
 \ /
  Last update: 2020-09-25 14:38    [W:0.061 / U:3.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site