[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7cb0642-8e20-b478-96bf-87807a29fc71@arm.com>
Date: Thu, 17 Sep 2020 19:47:59 +0100
From: Vincenzo Frascino <vincenzo.frascino@....com>
To: Catalin Marinas <catalin.marinas@....com>,
Andrey Konovalov <andreyknvl@...gle.com>
Cc: Dmitry Vyukov <dvyukov@...gle.com>, kasan-dev@...glegroups.com,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Marco Elver <elver@...gle.com>,
Evgenii Stepanov <eugenis@...gle.com>,
Elena Petrova <lenaptr@...gle.com>,
Branislav Rankov <Branislav.Rankov@....com>,
Kevin Brodsky <kevin.brodsky@....com>,
Will Deacon <will.deacon@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-arm-kernel@...ts.infradead.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 27/37] arm64: mte: Switch GCR_EL1 in kernel entry and
exit
On 9/17/20 5:52 PM, Catalin Marinas wrote:
>> +void mte_init_tags(u64 max_tag)
>> +{
>> + u64 incl = GENMASK(max_tag & MTE_TAG_MAX, 0);
>> +
>> + gcr_kernel_excl = ~incl & SYS_GCR_EL1_EXCL_MASK;
>> +}
> Do we need to set the actual GCR_EL1 register here? We may not get an
> exception by the time KASAN starts using it.
It is ok not setting it here because to get exceptions cpuframework mte enable
needs to be executed first. In that context we set even the register.
--
Regards,
Vincenzo
Powered by blists - more mailing lists