Re: [PATCH v9 32/44] arm64: mte: Switch GCR_EL1 in kernel entry and exit

2020-11-12 Thread Vincenzo Frascino
On 11/12/20 9:45 AM, Catalin Marinas wrote: > On Thu, Nov 12, 2020 at 09:45:45AM +, Vincenzo Frascino wrote: >> On 11/12/20 9:39 AM, Catalin Marinas wrote: >>> On Tue, Nov 10, 2020 at 11:10:29PM +0100, Andrey Konovalov wrote: diff --git a/arch/arm64/kernel/mte.c

Re: [PATCH v9 32/44] arm64: mte: Switch GCR_EL1 in kernel entry and exit

2020-11-12 Thread Catalin Marinas
On Thu, Nov 12, 2020 at 09:45:45AM +, Vincenzo Frascino wrote: > On 11/12/20 9:39 AM, Catalin Marinas wrote: > > On Tue, Nov 10, 2020 at 11:10:29PM +0100, Andrey Konovalov wrote: > >> diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c > >> index 664c968dc43c..dbda6598c19d 100644 >

Re: [PATCH v9 32/44] arm64: mte: Switch GCR_EL1 in kernel entry and exit

2020-11-12 Thread Vincenzo Frascino
On 11/12/20 9:39 AM, Catalin Marinas wrote: > On Tue, Nov 10, 2020 at 11:10:29PM +0100, Andrey Konovalov wrote: >> diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c >> index 664c968dc43c..dbda6598c19d 100644 >> --- a/arch/arm64/kernel/mte.c >> +++ b/arch/arm64/kernel/mte.c >> @@

Re: [PATCH v9 32/44] arm64: mte: Switch GCR_EL1 in kernel entry and exit

2020-11-12 Thread Catalin Marinas
On Tue, Nov 10, 2020 at 11:10:29PM +0100, Andrey Konovalov wrote: > diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c > index 664c968dc43c..dbda6598c19d 100644 > --- a/arch/arm64/kernel/mte.c > +++ b/arch/arm64/kernel/mte.c > @@ -129,6 +131,26 @@ void *mte_set_mem_tag_range(void

[PATCH v9 32/44] arm64: mte: Switch GCR_EL1 in kernel entry and exit

2020-11-10 Thread Andrey Konovalov
From: Vincenzo Frascino When MTE is present, the GCR_EL1 register contains the tags mask that allows to exclude tags from the random generation via the IRG instruction. With the introduction of the new Tag-Based KASAN API that provides a mechanism to reserve tags for special reasons, the MTE