On 1/20/21 4:04 PM, Catalin Marinas wrote:
> On Tue, Jan 19, 2021 at 08:35:49PM +0000, Vincenzo Frascino wrote:
>> On 1/19/21 6:52 PM, Catalin Marinas wrote:
>>> On Tue, Jan 19, 2021 at 07:27:43PM +0100, Andrey Konovalov wrote:
>>>> On Tue, Jan 19, 2021 at 6:26 PM
On 1/19/21 6:12 PM, Andrey Konovalov wrote:
> On Tue, Jan 19, 2021 at 3:46 PM Mark Rutland wrote:
>>
>> Given there's no information available, I think it's simpler and
>> preferable to handle the logging separately, as is done for
>> kasan_report_invalid_free(). For example, we could do
On 1/19/21 2:34 PM, Catalin Marinas wrote:
> On Mon, Jan 18, 2021 at 06:30:32PM +0000, Vincenzo Frascino wrote:
>> static void update_sctlr_el1_tcf0(u64 tcf0)
>> {
>> /* ISB required for the kernel uaccess routines */
>> @@ -235,6 +273,15 @@ void mte_threa
Hi Catalin,
On 1/19/21 2:45 PM, Catalin Marinas wrote:
> On Mon, Jan 18, 2021 at 06:30:33PM +0000, Vincenzo Frascino wrote:
>> mte_assign_mem_tag_range() is called on production KASAN HW hot
>> paths. It makes sense to inline it in an attempt to reduce the
>> o
Hi Andrey,
On 1/19/21 8:56 PM, Andrey Konovalov wrote:
>> return (is_vmalloc_addr(addr) || virt_addr_valid(addr));
> Do we need is_vmalloc_addr()? As we don't yet have vmalloc support for
> HW_TAGS.
It is not necessary but it does not hurt, since we are going to add vmalloc
anyway at some
Hi Andrey,
On 1/19/21 6:09 PM, Andrey Konovalov wrote:
> Hi Vincenzo,
>
> This change has multiple conflicts with the KASAN testing patches that
> are currently in the mm tree. If Andrew decides to send all of them
> during RC, then this should be good to go through arm64. Otherwise, I
> guess
On 1/21/21 3:12 PM, Mark Rutland wrote:
> [adding Ard]
>
Thanks for this, it is related to his patch and I forgot to Cc: him directly.
> On Thu, Jan 21, 2021 at 01:19:55PM +, Vincenzo Frascino wrote:
>> Currently, the __is_lm_address() check just masks out
: Will Deacon
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (2):
arm64: Fix kernel address detection of __is_lm_address()
kasan: Add explicit preconditions to kasan_report()
arch/arm64/include/asm/memory.h | 2 +-
mm/kasan/kasan.h| 2 +-
mm/kasan/report.c | 7
to a kernel panic.
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Dmitry Vyukov
Cc: Leon Romanovsky
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
mm/kasan/kasan.h | 2 +-
mm/kasan/report.c | 7 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/mm/kasan/kasan.h
a kernel address starting
at PAGE_OFFSET.
Fixes: f4693c2716b35 ("arm64: mm: extend linear region for 52-bit VA
configurations")
Cc: Catalin Marinas
Cc: Will Deacon
Suggested-by: Catalin Marinas
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h | 2 +-
1 file changed, 1
at exception entry to
EL1. On the context switch path the synchronization is guarantied by the
dsb() in __switch_to().
The dsb(nsh) in mte_check_tfsr_exit() is provisional pending
confirmation by the architects.
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64
On 1/21/21 3:49 PM, Mark Rutland wrote:
> On Thu, Jan 21, 2021 at 03:30:51PM +0000, Vincenzo Frascino wrote:
>> On 1/21/21 3:12 PM, Mark Rutland wrote:
>>> On Thu, Jan 21, 2021 at 01:19:55PM +, Vincenzo Frascino wrote:
>>>> Currently, the __is_lm_address() c
:
- Fixed a compilation issue reported by krobot.
- General cleanup.
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Marco Elver
Cc: Evgenii Stepanov
Cc: Branislav Rankov
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
Vincenzo
Hi Andrey,
On 1/19/21 6:10 PM, Andrey Konovalov wrote:
> I'll later add a patch on top that forbids running the tests with the
> async mode.
Sorry, I misread this part, I thought you wanted me to do this. Anyway I added
the check to my last series.
Please have a look.
--
Regards,
Vincenzo
KASAN provides an asynchronous mode of execution.
Add reporting functionality for this mode.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
include/linux/kasan.h | 2 ++
mm/kasan/report.c | 11 +++
2
Reviewed-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h| 3 ++-
arch/arm64/include/asm/mte-kasan.h | 9 +++--
arch/arm64/kernel/mte.c| 16 ++--
3 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/arch/arm64
.
Note: This patch adds the kasan.mode kernel parameter and the
sync/async kernel command line options to enable the described features.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
Documentation/dev-tools/kasan.rst | 7
the corresponding bits
periodically.
Introduce an API that exposes the mode of execution to the kernel.
Note: This API will be used by KASAN KUNIT tests to forbid the execution
when async mode is enable.
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm
: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
lib/test_kasan.c | 5 +
mm/kasan/kasan.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/lib/test_kasan.c b/lib/test_kasan.c
index 7285dcf9fcc1..1306f707b4fe 100644
--- a/lib/test_kasan.c
+++ b/lib/test_kasan.c
@@ -52,6 +52,11
On 1/14/21 2:25 PM, Catalin Marinas wrote:
> On Thu, Jan 14, 2021 at 10:24:25AM +0000, Vincenzo Frascino wrote:
>> On 1/13/21 6:11 PM, Catalin Marinas wrote:
>>> On Thu, Jan 07, 2021 at 05:29:07PM +, Vincenzo Frascino wrote:
>>>> static inline void mte_sy
On 1/13/21 6:11 PM, Catalin Marinas wrote:
> On Thu, Jan 07, 2021 at 05:29:07PM +0000, Vincenzo Frascino wrote:
>> diff --git a/arch/arm64/include/asm/mte.h b/arch/arm64/include/asm/mte.h
>> index d02aff9f493d..a60d3718baae 100644
>> --- a/arch/arm64/include/asm/mte.h
>&g
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 asy
On 1/13/21 5:22 PM, Catalin Marinas wrote:
> On Thu, Jan 07, 2021 at 05:29:06PM +0000, Vincenzo Frascino wrote:
>> MTE provides an asynchronous mode for detecting tag exceptions. In
>> particular instead of triggering a fault the arm64 core updates a
>> register which is
Hi Andrey,
On 1/15/21 6:59 PM, Andrey Konovalov wrote:
> On Fri, Jan 15, 2021 at 1:00 PM Vincenzo Frascino
> wrote:
>>
[...]
>> @@ -60,6 +61,8 @@ static int __init early_kasan_mode(char *arg)
>>
>> if (!strcmp(arg, "off"))
>>
Hi Mark,
On 1/15/21 3:08 PM, Mark Rutland wrote:
> On Fri, Jan 15, 2021 at 12:00:40PM +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 asy
rce.com/id/Ib3694ed90b1e8ccac6cf77dfd301847af4aba7b8
> Signed-off-by: Andrey Konovalov
Since it is a fix could you please add the "Fixes:" tag.
Otherwise:
Reviewed-by: Vincenzo Frascino
> ---
> Documentation/dev-tools/kasan.rst | 27 +++
> mm/kasan/hw_tags.c
On 1/16/21 1:59 PM, Andrey Konovalov wrote:
> On Sat, Jan 16, 2021 at 2:37 PM Vincenzo Frascino
> wrote:
>>
>>> [1] https://lkml.org/lkml/2021/1/15/1242
>>>
>>
>> Thanks for this. I will have a look into it today. In the meantime, could you
&g
On 1/15/21 3:13 PM, Mark Rutland wrote:
> On Fri, Jan 15, 2021 at 12:00:41PM +0000, Vincenzo Frascino wrote:
>> MTE provides an asynchronous mode for detecting tag exceptions. In
>> particular instead of triggering a fault the arm64 core updates a
>> register which is checke
Hi Mark,
On 1/15/21 3:45 PM, Mark Rutland wrote:
> On Fri, Jan 15, 2021 at 12:00:43PM +0000, Vincenzo Frascino wrote:
>> mte_assign_mem_tag_range() is called on production KASAN HW hot
>> paths. It makes sense to optimize it in an attempt to reduce the
>> ove
Hi Mark,
On 1/25/21 1:02 PM, Mark Rutland wrote:
> Hi Vincenzo,
>
> On Fri, Jan 22, 2021 at 03:56:40PM +, Vincenzo Frascino wrote:
>> Currently, the __is_lm_address() check just masks out the top 12 bits
>> of the address, but if they are 0, it still yields a tru
On 1/25/21 2:59 PM, Catalin Marinas wrote:
> On Mon, Jan 25, 2021 at 02:36:34PM +0000, Vincenzo Frascino wrote:
>> On 1/25/21 1:02 PM, Mark Rutland wrote:
>>> On Fri, Jan 22, 2021 at 03:56:40PM +, Vincenzo Frascino wrote:
>>>> Currently, the __is_lm_address() c
le to loadable modules.
>
> Fixes: b9b322c2bba9 ("kasan: add match-all tag tests")
> Signed-off-by: Arnd Bergmann
Thanks I just stumbled on the same issue ;)
Reviewed-by: Vincenzo Frascino
> ---
> mm/kasan/shadow.c | 1 +
> 1 file changed, 1 insertion(+)
&
On 1/21/21 5:38 PM, Andrey Konovalov wrote:
>> + if (unlikely(tfsr_el1 & SYS_TFSR_EL1_TF1)) {
>> + /*
>> +* Note: isb() is not required after this direct write
>> +* because there is no indirect read subsequent to it
>> +* (per
On 1/21/21 5:40 PM, Andrey Konovalov wrote:
>> diff --git a/lib/test_kasan.c b/lib/test_kasan.c
>> index 7285dcf9fcc1..1306f707b4fe 100644
>> --- a/lib/test_kasan.c
>> +++ b/lib/test_kasan.c
>> @@ -52,6 +52,11 @@ static int kasan_test_init(struct kunit *test)
>> return -1;
>>
On 1/21/21 5:34 PM, Andrey Konovalov wrote:
>> +- ``kasan.mode=sync`` or ``=async`` controls whether KASAN is configured in
>> + synchronous or asynchronous mode of execution (default: ``sync``).
>> + ``synchronous mode``: an exception is triggered if a tag check fault
>> occurs.
>
On 1/22/21 10:02 AM, Mark Rutland wrote:
> On Thu, Jan 21, 2021 at 01:43:14PM -0800, Paul E. McKenney wrote:
>> On Thu, Jan 21, 2021 at 09:31:10PM +, Will Deacon wrote:
>>> On Thu, Jan 21, 2021 at 10:55:21AM -0800, Paul E. McKenney wrote:
On Thu, Jan 21, 2021 at 10:37:21PM +0530,
Ryabinin
Cc: Alexander Potapenko
Cc: Marco Elver
Cc: Evgenii Stepanov
Cc: Branislav Rankov
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (4):
arm64: mte: Add asynchronous mode support
kasan: Add KASAN mode kernel parameter
kasan: Add report for async mode
KASAN provides an asynchronous mode of execution.
Add reporting functionality for this mode.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Reviewed-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
include/linux/kasan.h | 2 ++
mm/kasan
Reviewed-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h| 3 ++-
arch/arm64/include/asm/mte-kasan.h | 9 +++--
arch/arm64/kernel/mte.c| 16 ++--
3 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/arch/arm64
at exception entry to
EL1. On the context switch path the synchronization is guarantied by the
dsb() in __switch_to().
The dsb(nsh) in mte_check_tfsr_exit() is provisional pending
confirmation by the architects.
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Catalin Marinas
Signed-off-by: Vincenzo
.
Note: This patch adds the kasan.mode kernel parameter and the
sync/async kernel command line options to enable the described features.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
Documentation/dev-tools/kasan.rst | 9
On 1/22/21 1:19 PM, Catalin Marinas wrote:
> On Thu, Jan 21, 2021 at 04:39:40PM +0000, Vincenzo Frascino wrote:
>> diff --git a/include/linux/kasan.h b/include/linux/kasan.h
>> index bb862d1f0e15..b0a1d9dfa85c 100644
>> --- a/include/linux/kasan.h
>> +++ b/include
On 1/22/21 1:59 PM, Vincenzo Frascino wrote:
> This patchset implements the asynchronous mode support for ARMv8.5-A
> Memory Tagging Extension (MTE), which is a debugging feature that allows
> to detect with the help of the architecture the C and C++ programmatic
> memory errors
to a kernel panic.
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Dmitry Vyukov
Cc: Leon Romanovsky
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
include/linux/kasan.h | 7 +++
mm/kasan/kasan.h | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/include
a kernel address
starting at PAGE_OFFSET.
Cc: Catalin Marinas
Cc: Will Deacon
Suggested-by: Catalin Marinas
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64
On 1/22/21 2:46 PM, Andrey Konovalov wrote:
> On Fri, Jan 22, 2021 at 3:38 PM Vincenzo Frascino
> wrote:
>>
>> With the introduction of KASAN_HW_TAGS, kasan_report() dereferences
>> the address passed as a parameter.
>
> It doesn't dereference the address, it a
KASAN provides an asynchronous mode of execution.
Add reporting functionality for this mode.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Reviewed-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
include/linux/kasan.h | 6 ++
mm/kasan
.
Note: This patch adds the kasan.mode kernel parameter and the
sync/async kernel command line options to enable the described features.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Reviewed-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
reported by krobot.
- General cleanup.
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Marco Elver
Cc: Evgenii Stepanov
Cc: Branislav Rankov
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (4):
arm64: mte
: Will Deacon
Cc: Mark Rutland
Cc: Paul E. McKenney
Cc: Naresh Kamboju
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (2):
arm64: Improve kernel address detection of __is_lm_address()
kasan: Add explicit preconditions to kasan_report()
arch/arm64/include/asm/memory.h | 6 --
include/linux
Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 32 +++
arch/arm64/kernel/entry-common.c | 6 +
arch/arm64/kernel/mte.c | 44
3 files changed, 82 insertions(+)
diff --git a/arch/arm64/include/asm/mte.h
Reviewed-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h| 3 ++-
arch/arm64/include/asm/mte-kasan.h | 9 +++--
arch/arm64/kernel/mte.c| 16 ++--
3 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/arch/arm64
On 1/22/21 2:42 PM, Andrey Konovalov wrote:
> On Fri, Jan 22, 2021 at 3:11 PM Vincenzo Frascino
> wrote:
>>
>> KASAN provides an asynchronous mode of execution.
>>
>> Add reporting functionality for this mode.
>>
>> Cc: Dmitry Vyukov
>> Cc: An
Hi Andrey,
All done. Reposting shortly. Thank you!
On 1/21/21 5:20 PM, Andrey Konovalov wrote:
> And please move this to include/kasan/kasan.h.
I guess you meant include/linux/kasan.h.
--
Regards,
Vincenzo
On 1/22/21 1:27 PM, Vincenzo Frascino wrote:
>> It looks like the original kasan_report() prototype is declared in two
>> places (second one in mm/kasan/kasan.h). I'd remove the latter and try
>> to have a consistent approach for kasan_report() and
>> kasan_re
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
include/linux/kasan.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index fe1ae73ff8b5..0aea9e2a2a01 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -333,6 +333,13
a kernel address
starting at PAGE_OFFSET.
Cc: Catalin Marinas
Cc: Will Deacon
Suggested-by: Catalin Marinas
Reviewed-by: Catalin Marinas
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64
with a future
patch.
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Dmitry Vyukov
Cc: Leon Romanovsky
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
mm/kasan/kasan.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
index
: Will Deacon
Cc: Mark Rutland
Cc: Paul E. McKenney
Cc: Naresh Kamboju
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (3):
arm64: Improve kernel address detection of __is_lm_address()
kasan: Add explicit preconditions to kasan_report()
kasan: Make addr_has_metadata() return true for valid
Hi Andrey,
On 1/19/21 6:10 PM, Andrey Konovalov wrote:
> On Mon, Jan 18, 2021 at 7:30 PM Vincenzo Frascino
> wrote:
>> --- a/Documentation/dev-tools/kasan.rst
>> +++ b/Documentation/dev-tools/kasan.rst
>> @@ -162,6 +162,9 @@ particular KASAN features.
>>
>>
On 1/21/21 4:02 PM, Vincenzo Frascino wrote:
>> I think it'd be worth checking, if we're going to use this in common
>> code.
>>
> Ok, I will run some tests and let you know.
>
I checked on x86_64 and ppc64 (they both have KASAN implementation):
I added the foll
Hi Andrey,
On 1/19/21 6:27 PM, Andrey Konovalov wrote:
> On Tue, Jan 19, 2021 at 6:26 PM Vincenzo Frascino
> wrote:
>>
>> With the introduction of KASAN_HW_TAGS, kasan_report() dereferences
>> the address passed as a parameter.
>>
>> Add a comment
On 1/19/21 6:52 PM, Catalin Marinas wrote:
> On Tue, Jan 19, 2021 at 07:27:43PM +0100, Andrey Konovalov wrote:
>> On Tue, Jan 19, 2021 at 6:26 PM Vincenzo Frascino
>> wrote:
>>>
>>> With the introduction of KASAN_HW_TAGS, kasan_report() dereferences
>
On 1/19/21 7:02 PM, Catalin Marinas wrote:
> On Tue, Jan 19, 2021 at 07:00:57PM +0000, Vincenzo Frascino wrote:
>> On 1/19/21 6:52 PM, Catalin Marinas wrote:
>>> On Tue, Jan 19, 2021 at 07:27:43PM +0100, Andrey Konovalov wrote:
>>>> On Tue, Jan 19, 2021 at 6:26 PM
is enabled, leads to a kernel panic.
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Dmitry Vyukov
Cc: Leon Romanovsky
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
mm/kasan/report.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
Hi Mark,
On 1/18/21 2:14 PM, Mark Rutland wrote:
> On Mon, Jan 18, 2021 at 01:37:35PM +0000, Vincenzo Frascino wrote:
>> On 1/18/21 12:57 PM, Catalin Marinas wrote:
>
>>>> + if (tfsr_el1 & SYS_TFSR_EL1_TF1) {
>>>> + write_sysreg_s(0, SYS_TFS
On 1/18/21 2:48 PM, Vincenzo Frascino wrote:
>> Are you aware of cases where the TFSR_EL1 value is read other than by an
>> MRS? e.g. are there any cases where checks are elided if TF1 is set? If
>> so, we may need the ISB to order the direct write against subsequent
On 1/18/21 1:37 PM, Vincenzo Frascino wrote:
>> If a speculated load is allowed to update this reg, we'd probably need an
>> ISB+DSB (I don't think it does, something to check with the architects).
>>
> I will check this with the architects and let you know.
I sp
On 1/18/21 12:57 PM, Catalin Marinas wrote:
>> +#ifdef CONFIG_KASAN_HW_TAGS
>> +void mte_check_tfsr_el1_no_sync(void)
>> +{
>> +u64 tfsr_el1;
>> +
>> +if (!system_supports_mte())
>> +return;
>> +
>> +tfsr_el1 = read_sysreg_s(SYS_TFSR_EL1);
>> +
>> +/*
>> + * The
On 1/19/21 1:04 PM, Catalin Marinas wrote:
> On Mon, Jan 18, 2021 at 06:30:31PM +0000, Vincenzo Frascino wrote:
>> KASAN provides an asynchronous mode of execution.
>>
>> Add reporting functionality for this mode.
>>
>> Cc: Dmitry Vyukov
>> Cc: Andr
On 1/19/21 6:52 PM, Catalin Marinas wrote:
> On Tue, Jan 19, 2021 at 07:27:43PM +0100, Andrey Konovalov wrote:
>> On Tue, Jan 19, 2021 at 6:26 PM Vincenzo Frascino
>> wrote:
>>>
>>> With the introduction of KASAN_HW_TAGS, kasan_report() dereferences
>
On 1/19/21 2:46 PM, Mark Rutland wrote:
> On Tue, Jan 19, 2021 at 02:23:03PM +0000, Vincenzo Frascino wrote:
>> On 1/19/21 1:04 PM, Catalin Marinas wrote:
>>> On Mon, Jan 18, 2021 at 06:30:31PM +, Vincenzo Frascino wrote:
>
>>>> +bool kasan_report_asyn
at exception entry to
EL1. On the context switch path the synchronization is guarantied by the
dsb() in __switch_to().
The dsb(nsh) in mte_check_tfsr_exit() is provisional pending
confirmation by the architects.
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64
: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Marco Elver
Cc: Evgenii Stepanov
Cc: Branislav Rankov
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (5):
arm64: mte: Add asynchronous mode support
kasan: Add KASAN mode kernel parameter
kasan: Add report for async mode
...@mail.gmail.com/
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 26 +-
arch/arm64/lib/mte.S | 15 ---
2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/arch/arm64/include/asm/mte.h
KASAN provides an asynchronous mode of execution.
Add reporting functionality for this mode.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
include/linux/kasan.h | 3 +++
mm/kasan/report.c | 16
mechanism will be added with a future patch.
Note: KASAN HW activates async mode via kasan.mode kernel parameter.
The default mode is set to synchronous.
The code that verifies the status of TFSR_EL1 will be added with a
future patch.
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
: This patch adds the kasan.mode kernel parameter and the
sync/async kernel command line options to enable the described features.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
Documentation/dev-tools/kasan.rst | 3
introduces the kasan_def.h header to make easier to propagate
the relevant enumerations to the architectural code.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h| 2 +-
arch/arm64/include/asm/m
at exception entry to
EL1. On the context switch path the synchronization is guarantied by the
dsb() in __switch_to().
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 1 +
arch/arm64/kernel/entry-common.c | 6 ++
arch/arm64/kernel
...@mail.gmail.com/
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 26 +-
arch/arm64/lib/mte.S | 15 ---
2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/arch/arm64/include/asm
mechanism will be added with a future patch.
Note: KASAN HW activates async mode via kasan.mode kernel parameter.
The default mode is set to synchronous.
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/kernel/mte.c | 31 +--
1 file
Cc: Branislav Rankov
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (4):
kasan, arm64: Add KASAN light mode
arm64: mte: Add asynchronous mode support
arm64: mte: Enable async tag check fault
arm64: mte: Optimize mte_assign_mem_tag_range()
arch/arm64/include
On 1/6/21 11:55 AM, Vincenzo Frascino wrote:
> This patchset implements the asynchronous mode support for ARMv8.5-A
> Memory Tagging Extension (MTE), which is a debugging feature that allows
> to detect with the help of the architecture the C and C++ programmatic
> memory errors
Hi Andrey,
On 1/7/21 4:29 PM, Andrey Konovalov wrote:
> On Wed, Jan 6, 2021 at 12:56 PM Vincenzo Frascino
> wrote:
>>
>> MTE provides an asynchronous mode for detecting tag exceptions. In
>> particular instead of triggering a fault the arm64 core updates a
>
introduces the kasan_def.h header to make easier to propagate
the relevant enumerations to the architectural code.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h| 2 +-
arch/arm64/include/asm/m
mechanism will be added with a future patch.
Note: KASAN HW activates async mode via kasan.mode kernel parameter.
The default mode is set to synchronous.
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/kernel/mte.c | 31 +--
1 file
at exception entry to
EL1. On the context switch path the synchronization is guarantied by the
dsb() in __switch_to().
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 4
arch/arm64/kernel/entry-common.c | 6 ++
arch/arm64/kernel
...@mail.gmail.com/
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 26 +-
arch/arm64/lib/mte.S | 15 ---
2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/arch/arm64/include/asm
: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Marco Elver
Cc: Evgenii Stepanov
Cc: Branislav Rankov
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (4):
kasan, arm64: Add KASAN light mode
arm64: mte: Add asynchronous mode support
arm64: mte: Enable
at exception entry to
EL1. On the context switch path the synchronization is guarantied by the
dsb() in __switch_to().
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 21 +++
arch/arm64/kernel/entry-common.c | 11
Konovalov
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (4):
kasan, arm64: Add KASAN light mode
arm64: mte: Add asynchronous mode support
arm64: mte: Enable async tag check fault
arm64: mte: Optimize mte_assign_mem_tag_range()
arch/arm64/include/asm/memory.h| 2 +-
arch/arm64/include
mechanism will be added with a future patch.
Note: KASAN HW activates async mode via kasan.mode kernel parameter.
The default mode is set to synchronous.
The code that verifies the status of TFSR_EL1 will be added with a
future patch.
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
...@mail.gmail.com/
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 26 +-
arch/arm64/lib/mte.S | 15 ---
2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/arch/arm64/include/asm
introduces the kasan_def.h header to make easier to propagate
the relevant enumerations to the architectural code.
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h| 2 +-
arch/arm64/inclu
to tag checking being disabled.
>
> With this patch KASAN tests are still failing for the hardware tag-based
> mode; fixes come in the next few patches.
>
A part what Catalin noticed already:
Reviewed-by: Vincenzo Frascino
> Signed-off-by: Andrey Konovalov
> Link:
> http
9ced973866036d8679e8f4ae325de547eb969649
> Fixes: dceec3ff7807 ("arm64: expose FAR_EL1 tag bits in siginfo")
> Fixes: 4291e9ee6189 ("kasan, arm64: print report from tag fault handler")
> Signed-off-by: Andrey Konovalov
Reviewed-by: Vincenzo Frascino
> ---
> arch/a
Hi Mark,
On 1/16/21 2:22 PM, Vincenzo Frascino wrote:
>> Is there any chance that this can be used for the last bytes of the
>> virtual address space? This might need to change to `_addr == _end` if
>> that is possible, otherwise it'll terminate early in that case.
On 1/18/21 10:41 AM, Mark Rutland wrote:
> On Sun, Jan 17, 2021 at 12:27:08PM +0000, Vincenzo Frascino wrote:
>> Hi Mark,
>>
>> On 1/16/21 2:22 PM, Vincenzo Frascino wrote:
>>>> Is there any chance that this can be used for the last bytes of the
>>&g
ngs about duplication, change the kernel-doc
> markups to just comments at math64.h.
>
Reviewed-by: Vincenzo Frascino
> Signed-off-by: Mauro Carvalho Chehab
> ---
> include/linux/math64.h | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/incl
1 - 100 of 578 matches
Mail list logo