Message ID | 20210104122126.32478-1-catalin.marinas@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: kasan: Set TCR_EL1.TBID1 when KASAN_HW_TAGS is enabled | expand |
On 1/4/21 12:21 PM, Catalin Marinas wrote: > Commit 49b3cf035edc ("kasan: arm64: set TCR_EL1.TBID1 when enabled") set > the TBID1 bit for the KASAN_SW_TAGS configuration, freeing up 8 bits to > be used by PAC. With in-kernel MTE now in mainline, also set this bit > for the KASAN_HW_TAGS configuration. > > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> > Cc: Peter Collingbourne <pcc@google.com> Was about to send something similar :) Acked-by: Vincenzo Frascino <vincenzo.frascino@arm.com> > --- > arch/arm64/mm/proc.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S > index 37a54b57178a..1f7ee8c8b7b8 100644 > --- a/arch/arm64/mm/proc.S > +++ b/arch/arm64/mm/proc.S > @@ -46,7 +46,7 @@ > #endif > > #ifdef CONFIG_KASAN_HW_TAGS > -#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 > +#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 | TCR_TBID1 > #else > #define TCR_KASAN_HW_FLAGS 0 > #endif >
On Mon, Jan 4, 2021 at 1:24 PM Vincenzo Frascino <vincenzo.frascino@arm.com> wrote: > > On 1/4/21 12:21 PM, Catalin Marinas wrote: > > Commit 49b3cf035edc ("kasan: arm64: set TCR_EL1.TBID1 when enabled") set > > the TBID1 bit for the KASAN_SW_TAGS configuration, freeing up 8 bits to > > be used by PAC. With in-kernel MTE now in mainline, also set this bit > > for the KASAN_HW_TAGS configuration. > > > > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> > > Cc: Peter Collingbourne <pcc@google.com> > > Was about to send something similar :) > > Acked-by: Vincenzo Frascino <vincenzo.frascino@arm.com> > > > --- > > arch/arm64/mm/proc.S | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S > > index 37a54b57178a..1f7ee8c8b7b8 100644 > > --- a/arch/arm64/mm/proc.S > > +++ b/arch/arm64/mm/proc.S > > @@ -46,7 +46,7 @@ > > #endif > > > > #ifdef CONFIG_KASAN_HW_TAGS > > -#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 > > +#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 | TCR_TBID1 > > #else > > #define TCR_KASAN_HW_FLAGS 0 > > #endif > > Acked-by: Andrey Konovalov <andreyknvl@google.com>
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 37a54b57178a..1f7ee8c8b7b8 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -46,7 +46,7 @@ #endif #ifdef CONFIG_KASAN_HW_TAGS -#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 +#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 | TCR_TBID1 #else #define TCR_KASAN_HW_FLAGS 0 #endif
Commit 49b3cf035edc ("kasan: arm64: set TCR_EL1.TBID1 when enabled") set the TBID1 bit for the KASAN_SW_TAGS configuration, freeing up 8 bits to be used by PAC. With in-kernel MTE now in mainline, also set this bit for the KASAN_HW_TAGS configuration. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Peter Collingbourne <pcc@google.com> --- arch/arm64/mm/proc.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)