All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: kasan: Set TCR_EL1.TBID1 when KASAN_HW_TAGS is enabled
@ 2021-01-04 12:21 Catalin Marinas
  2021-01-04 12:28 ` Vincenzo Frascino
  0 siblings, 1 reply; 3+ messages in thread
From: Catalin Marinas @ 2021-01-04 12:21 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Peter Collingbourne, andreyknvl, Vincenzo Frascino, Will Deacon

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(-)

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: kasan: Set TCR_EL1.TBID1 when KASAN_HW_TAGS is enabled
  2021-01-04 12:21 [PATCH] arm64: kasan: Set TCR_EL1.TBID1 when KASAN_HW_TAGS is enabled Catalin Marinas
@ 2021-01-04 12:28 ` Vincenzo Frascino
  2021-01-05 17:09   ` Andrey Konovalov
  0 siblings, 1 reply; 3+ messages in thread
From: Vincenzo Frascino @ 2021-01-04 12:28 UTC (permalink / raw)
  To: Catalin Marinas, linux-arm-kernel
  Cc: Peter Collingbourne, andreyknvl, Will Deacon

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
> 

-- 
Regards,
Vincenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: kasan: Set TCR_EL1.TBID1 when KASAN_HW_TAGS is enabled
  2021-01-04 12:28 ` Vincenzo Frascino
@ 2021-01-05 17:09   ` Andrey Konovalov
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Konovalov @ 2021-01-05 17:09 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: Peter Collingbourne, Catalin Marinas, Will Deacon, Linux ARM

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>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-05 17:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 12:21 [PATCH] arm64: kasan: Set TCR_EL1.TBID1 when KASAN_HW_TAGS is enabled Catalin Marinas
2021-01-04 12:28 ` Vincenzo Frascino
2021-01-05 17:09   ` Andrey Konovalov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.