From: Vincenzo Frascino <vincenzo.frascino@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
Will Deacon <will@kernel.org>, Dmitry Vyukov <dvyukov@google.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Alexander Potapenko <glider@google.com>,
Marco Elver <elver@google.com>,
Evgenii Stepanov <eugenis@google.com>,
Branislav Rankov <Branislav.Rankov@arm.com>,
Andrey Konovalov <andreyknvl@google.com>
Subject: Re: [PATCH v2 1/4] kasan, arm64: Add KASAN light mode
Date: Thu, 14 Jan 2021 09:40:57 +0000 [thread overview]
Message-ID: <7125af39-2572-1b08-d223-51f4ea6e686b@arm.com> (raw)
In-Reply-To: <20210113171602.GD27045@gaia>
On 1/13/21 5:16 PM, Catalin Marinas wrote:
> On Thu, Jan 07, 2021 at 05:29:05PM +0000, Vincenzo Frascino wrote:
>> Architectures supported by KASAN HW can provide a light mode of
>> execution. On an MTE enabled arm64 hw for example this can be identified
>> with the asynch mode of execution. If an async exception occurs, the
>> arm64 core updates a register which is asynchronously detected the next
>> time in which the kernel is accessed.
>
> What do you mean by "the kernel is accessed"? Also, there is no
> "exception" as such, only a bit in a register updated asynchronously. So
> the last sentence could be something like:
>
> In this mode, if a tag check fault occurs, the TFSR_EL1 register is
> updated asynchronously. The kernel checks the corresponding bits
> periodically.
>
> (or you can be more precise on when the kernel checks for such faults)
>
Yes, I agree, I will change it accordingly. What I wrote has a similar meaning
but your exposition is more clear.
>> KASAN requires a specific mode of execution to make use of this hw feature.
>>
>> Add KASAN HW light execution mode.
>
> Shall we call it "fast"? ;)
>
>> --- /dev/null
>> +++ b/include/linux/kasan_def.h
>> @@ -0,0 +1,25 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#ifndef _LINUX_KASAN_DEF_H
>> +#define _LINUX_KASAN_DEF_H
>> +
>> +enum kasan_arg_mode {
>> + KASAN_ARG_MODE_DEFAULT,
>> + KASAN_ARG_MODE_OFF,
>> + KASAN_ARG_MODE_LIGHT,
>> + KASAN_ARG_MODE_PROD,
>> + KASAN_ARG_MODE_FULL,
>> +};
>> +
>> +enum kasan_arg_stacktrace {
>> + KASAN_ARG_STACKTRACE_DEFAULT,
>> + KASAN_ARG_STACKTRACE_OFF,
>> + KASAN_ARG_STACKTRACE_ON,
>> +};
>> +
>> +enum kasan_arg_fault {
>> + KASAN_ARG_FAULT_DEFAULT,
>> + KASAN_ARG_FAULT_REPORT,
>> + KASAN_ARG_FAULT_PANIC,
>> +};
>> +
>> +#endif /* _LINUX_KASAN_DEF_H */
>
> I thought we agreed not to expose the KASAN internal but come up with
> another abstraction. Maybe this was after you posted these patches.
>
Yes, indeed we agreed and I am going to change it in v3. The agreement
temporally came after I posted v2 hence it is not reflected here.
--
Regards,
Vincenzo
next prev parent reply other threads:[~2021-01-14 9:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 17:29 [PATCH v2 0/4] arm64: ARMv8.5-A: MTE: Add async mode support Vincenzo Frascino
2021-01-07 17:29 ` [PATCH v2 1/4] kasan, arm64: Add KASAN light mode Vincenzo Frascino
2021-01-13 17:16 ` Catalin Marinas
2021-01-14 9:40 ` Vincenzo Frascino [this message]
2021-01-07 17:29 ` [PATCH v2 2/4] arm64: mte: Add asynchronous mode support Vincenzo Frascino
2021-01-13 17:22 ` Catalin Marinas
2021-01-14 9:43 ` Vincenzo Frascino
2021-01-07 17:29 ` [PATCH v2 3/4] arm64: mte: Enable async tag check fault Vincenzo Frascino
2021-01-13 18:11 ` Catalin Marinas
2021-01-14 10:24 ` Vincenzo Frascino
2021-01-14 14:25 ` Catalin Marinas
2021-01-14 14:57 ` Vincenzo Frascino
2021-01-07 17:29 ` [PATCH v2 4/4] arm64: mte: Optimize mte_assign_mem_tag_range() Vincenzo Frascino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7125af39-2572-1b08-d223-51f4ea6e686b@arm.com \
--to=vincenzo.frascino@arm.com \
--cc=Branislav.Rankov@arm.com \
--cc=andreyknvl@google.com \
--cc=aryabinin@virtuozzo.com \
--cc=catalin.marinas@arm.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=eugenis@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®