looks fine, but I have one question: the kernel requires as a minimum
Clang/LLVM version 10.0.1. Did you verify that with that version compat vDSOs
still builds and works correctly?
Otherwise:
Reviewed-by: Vincenzo Frascino
> ---
> Changes V1 -> V2:
> * Remove
next page in vvar.
> This avoids having to redo the mflr/bcl/mflr/mtlr dance to locate
> the page relative to running code position.
>
> Signed-off-by: Christophe Leroy
Reviewed-by: Vincenzo Frascino # vDSO parts
> ---
> arch/powerpc/Kconfig | 3
an
> Cc: Paul Mackerras
> Cc: linuxppc-...@lists.ozlabs.org
> Cc: sta...@vger.kernel.org # v5.11
> [1]: https://github.com/checkpoint-restore/criu/issues/1417
> Signed-off-by: Dmitry Safonov
> Tested-by: Christophe Leroy
> Signed-off-by: Christophe Leroy
Reviewed-by: Vinc
age to vdso_data, provide
> vdso_data pointer to __arch_get_timens_vdso_data() in order
> to ease the calculation on powerpc in following patches.
>
> Signed-off-by: Christophe Leroy
Reviewed-by: Vincenzo Frascino
> ---
> arch/arm64/include/asm/vdso/compat_gettimeofda
-gettime-monotonic-raw:vdso: 1100 nsec/call
> clock-gettime-monotonic-coarse:vdso: 667 nsec/call
> clock-gettime-monotonic:vdso: 1025 nsec/call
>
> Signed-off-by: Christophe Leroy
Reviewed-by: Vincenzo Frascino
> ---
> lib/vdso/gettimeofday.c | 16
>
: Moving the check in entry-common allows to use set_thread_flag()
which is safe.
Fixes: 637ec831ea4f ("arm64: mte: Handle synchronous and asynchronous tag check
faults")
Cc: Catalin Marinas
Cc: Will Deacon
Cc: sta...@vger.kernel.org
Reported-by: Will Deacon
Signed-off-by: Vincenzo Frascino
: Moving the check in entry-common allows to use set_thread_flag()
which is safe.
Fixes: 637ec831ea4f ("arm64: mte: Handle synchronous and asynchronous tag check
faults")
Cc: Catalin Marinas
Cc: Will Deacon
Cc: sta...@vger.kernel.org
Reported-by: Will Deacon
Signed-off-by: Vincenzo Frascino
On 4/8/21 4:18 PM, Mark Rutland wrote:
> Hi Vincenzo,
>
> On Thu, Apr 08, 2021 at 03:37:23PM +0100, Vincenzo Frascino wrote:
>> The check_mte_async_tcf macro sets the TIF flag non-atomically. This can
>> race with another CPU doing a set_tsk_thread_flag() and th
On 4/8/21 4:06 PM, Mark Rutland wrote:
> On Thu, Apr 08, 2021 at 03:56:04PM +0100, Will Deacon wrote:
>> On Thu, Apr 08, 2021 at 03:37:23PM +0100, Vincenzo Frascino wrote:
>>> The check_mte_async_tcf macro sets the TIF flag non-atomically. This can
>>>
in entry-common allows to use set_thread_flag()
which is safe.
Fixes: 637ec831ea4f ("arm64: mte: Handle synchronous and asynchronous
tag check faults")
Cc: Catalin Marinas
Cc: Will Deacon
Reported-by: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.
d not delete the old function prototypes in mte.h.
Remove the unused prototype from mte.h.
Cc: Catalin Marinas
Cc: Will Deacon
Reported-by: Derrick McKee
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 6 --
1 file changed, 6 deletions(-)
diff --git a/arch/arm64/include/as
On 3/15/21 6:41 PM, Catalin Marinas wrote:
> On Mon, Mar 15, 2021 at 01:20:16PM +0000, Vincenzo Frascino wrote:
>> mte_enable_kernel_*() are not needed if KASAN_HW is disabled.
>>
>> Add ash defines around the functions to conditionally compile the
>> functions.
&g
the test is over,
check for faults as a part of the test handler.
Acked-by: Catalin Marinas
Acked-by: Andrey Konovalov
Tested-by: Andrey Konovalov
Signed-off-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h | 1 +
lib/test_kasan.c| 17
-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 4
arch/arm64/kernel/mte.c | 16
arch/arm64/kernel/suspend.c | 3 +++
3 files changed, 23 insertions(+)
diff --git a/arch/arm64/include/asm/mte.h b/arch/arm64/include/asm/mte.h
index 9a929620ca5d..a38abc15186c
Konovalov
Tested-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 29 +
arch/arm64/kernel/entry-common.c | 6 ++
arch/arm64/kernel/mte.c | 36
3 files changed, 71 insertions(+)
diff
Signed-off-by: Vincenzo Frascino
Signed-off-by: Andrey Konovalov
---
include/linux/kasan.h | 6 ++
mm/kasan/kasan.h | 16
mm/kasan/report.c | 17 -
3 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/include/linux/kasan.h b/include/linux
mte_enable_kernel_*() are not needed if KASAN_HW is disabled.
Add ash defines around the functions to conditionally compile the
functions.
Signed-off-by: Vincenzo Frascino
---
arch/arm64/kernel/mte.c | 4
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/kernel/mte.c b/arch/arm64
-by: Branislav Rankov
Reviewed-by: Catalin Marinas
Acked-by: Andrey Konovalov
Tested-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h| 15 +++
arch/arm64/include/asm/uaccess.h| 22 ++
arch/arm64/include/asm/word
Tested-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
index f6d1ae69ffb3..a07923eb33c5 100644
--- a/arch/arm64/include/asm/memory.h
+++ b/arch
Konovalov
Tested-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
[ Add a new var instead of exposing kasan_arg_mode to be consistent with
flags for other command line arguments. ]
Signed-off-by: Andrey Konovalov
---
Documentation/dev-tools/kasan.rst | 9 +
lib/test_kasan.c
Elver
Cc: Evgenii Stepanov
Cc: Branislav Rankov
Cc: Andrey Konovalov
Cc: Lorenzo Pieralisi
Signed-off-by: Vincenzo Frascino
Andrey Konovalov (1):
kasan, arm64: tests supports for HW_TAGS async mode
Vincenzo Frascino (8):
arm64: mte: Add asynchronous mode support
kasan: Add KASAN mode
Reviewed-by: Andrey Konovalov
Acked-by: Andrey Konovalov
Tested-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h| 4 +++-
arch/arm64/include/asm/mte-kasan.h | 9 +++--
arch/arm64/kernel/mte.c| 16 ++--
3 files changed, 24
On 3/12/21 3:29 PM, Catalin Marinas wrote:
> On Fri, Mar 12, 2021 at 03:23:44PM +0000, Vincenzo Frascino wrote:
>> On 3/12/21 3:13 PM, Catalin Marinas wrote:
>>> On Fri, Mar 12, 2021 at 02:22:07PM +, Vincenzo Frascino wrote:
>>>> diff --git a/arch/arm64/
On 3/12/21 3:13 PM, Catalin Marinas wrote:
> On Fri, Mar 12, 2021 at 02:22:07PM +0000, Vincenzo Frascino wrote:
>> diff --git a/arch/arm64/include/asm/mte.h b/arch/arm64/include/asm/mte.h
>> index 9b557a457f24..8603c6636a7d 100644
>> --- a/arch/arm64/include/asm/mte.h
>&g
On 3/12/21 2:50 PM, Andrey Konovalov wrote:
> On Fri, Mar 12, 2021 at 3:22 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
&g
On 3/12/21 2:49 PM, Andrey Konovalov wrote:
> On Fri, Mar 12, 2021 at 3:22 PM Vincenzo Frascino
> wrote:
>>
>> From: Andrey Konovalov
>>
>> This change adds KASAN-KUnit tests support for the async HW_TAGS mode.
>>
>> In async mode, tag fault aren't b
asynchronous tag faults before suspend and clear the TFSR_EL1
register after resume to prevent this to happen.
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Lorenzo Pieralisi
Reviewed-by: Catalin Marinas
Reviewed-by: Lorenzo Pieralisi
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h
From: Andrey Konovalov
This change adds KASAN-KUnit tests support for the async HW_TAGS mode.
In async mode, tag fault aren't being generated synchronously when a
bad access happens, but are instead explicitly checked for by the kernel.
As each KASAN-KUnit test expect a fault to happen before
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
Signed-off-by: Andrey Konovalov
---
include/linux
-by: Branislav Rankov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h| 15 +++
arch/arm64/include/asm/uaccess.h| 22 ++
arch/arm64/include/asm/word-at-a-time.h | 4
arch/arm64/kernel/mte.c | 22
Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 29 +
arch/arm64/kernel/entry-common.c | 6 ++
arch/arm64/kernel/mte.c | 36
3 files changed, 71 insertions(+)
diff --git a/arch/arm64/include/asm
arch_enable_tagging() was left in memory.h after the introduction of
async mode to not break the bysectability of the KASAN KUNIT tests.
Remove the function now that KASAN has been fully converted.
Cc: Catalin Marinas
Cc: Will Deacon
Acked-by: Catalin Marinas
Signed-off-by: Vincenzo Frascino
.
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
[ Add a new
Reviewed-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h| 4 +++-
arch/arm64/include/asm/mte-kasan.h | 9 +++--
arch/arm64/kernel/mte.c| 16 ++--
3 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/arch/arm64
: Lorenzo Pieralisi
Signed-off-by: Vincenzo Frascino
Andrey Konovalov (1):
kasan, arm64: tests supports for HW_TAGS async mode
Vincenzo Frascino (7):
arm64: mte: Add asynchronous mode support
kasan: Add KASAN mode kernel parameter
arm64: mte: Drop arch_enable_tagging()
kasan: Add report
On 3/11/21 4:28 PM, Catalin Marinas wrote:
> On Thu, Mar 11, 2021 at 03:00:26PM +0000, Vincenzo Frascino wrote:
>> On 3/11/21 1:25 PM, Catalin Marinas wrote:
>>> On Mon, Mar 08, 2021 at 04:14:34PM +, Vincenzo Frascino wrote:
>>>> load_unaligned_zeropad(
On 3/11/21 1:25 PM, Catalin Marinas wrote:
> On Mon, Mar 08, 2021 at 04:14:34PM +0000, Vincenzo Frascino wrote:
>> load_unaligned_zeropad() and __get/put_kernel_nofault() functions can
>> read passed some buffer limits which may include some MTE granule with a
>> differen
On 3/8/21 6:09 PM, Mark Rutland wrote:
>> +DECLARE_STATIC_KEY_FALSE(mte_async_mode);
> Can we please hide this behind something like:
>
> static inline bool system_uses_mte_async_mode(void)
> {
> return IS_ENABLED(CONFIG_KASAN_HW_TAGS) &&
> static_branch_unlikely(_async_mode);
Hi Andrey,
On 3/8/21 9:02 PM, Andrey Konovalov wrote:
> On Mon, Mar 8, 2021 at 5:14 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
&g
-by: Branislav Rankov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/uaccess.h| 24
arch/arm64/include/asm/word-at-a-time.h | 4
arch/arm64/kernel/mte.c | 22 ++
3 files changed, 50 insertions(+)
diff --git a/arch
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
Signed-off-by: Andrey Konovalov
---
include/linux
asynchronous tag faults before suspend and clear the TFSR_EL1
register after resume to prevent this to happen.
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Lorenzo Pieralisi
Reviewed-by: Catalin Marinas
Reviewed-by: Lorenzo Pieralisi
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h
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 | 36
3 files changed, 74 insertions(+)
diff --git a/arch/arm64/include/asm
arch_enable_tagging() was left in memory.h after the introduction of
async mode to not break the bysectability of the KASAN KUNIT tests.
Remove the function now that KASAN has been fully converted.
Cc: Catalin Marinas
Cc: Will Deacon
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include
==
Verify that Tag Check Override (TCO) is enabled in these functions before
the load and disable it afterwards to prevent this to happen.
Note: The issue has been observed only with an MTE enabled userspace.
Cc: Catalin Marinas
Cc: Will Deacon
Reported-by: Branislav Rankov
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
Reviewed-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
[ Add a new
Potapenko
Cc: Marco Elver
Cc: Evgenii Stepanov
Cc: Branislav Rankov
Cc: Andrey Konovalov
Cc: Lorenzo Pieralisi
Signed-off-by: Vincenzo Frascino
Vincenzo Frascino (8):
arm64: mte: Add asynchronous mode support
kasan: Add KASAN mode kernel parameter
arm64: mte: Drop arch_enable_tagging
Reviewed-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/memory.h| 4 +++-
arch/arm64/include/asm/mte-kasan.h | 9 +++--
arch/arm64/kernel/mte.c| 16 ++--
3 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/arch/arm64
On 2/23/21 12:49 PM, Will Deacon wrote:
>>> I totally agree on this point. In the case of runtime switching we might
>>> need
>>> the rethink completely the strategy and depends a lot on what we want to
>>> allow
>>> and what not. For the kernel I imagine we will need to expose something in
>>>
On 2/23/21 12:05 PM, Catalin Marinas wrote:
>> I totally agree on this point. In the case of runtime switching we might need
>> the rethink completely the strategy and depends a lot on what we want to
>> allow
>> and what not. For the kernel I imagine we will need to expose something in
>>
On 2/22/21 5:58 PM, Catalin Marinas wrote:
> That's because cpu_hotplug_lock is not a spinlock but a semaphore which
> implies sleeping. I don't think avoiding taking this semaphore
> altogether (as in the *_cpuslocked functions) is the correct workaround.
>
Thinking at it a second time I
On 2/12/21 5:21 PM, Catalin Marinas wrote:
>> +
>> +/*
>> + * This function is called on each active smp core at boot
>> + * time, hence we do not need to take cpu_hotplug_lock again.
>> + */
>> +static_branch_enable_cpuslocked(_async_mode);
>> }
> Sorry, I missed the
On 2/12/21 9:44 PM, Andrey Konovalov wrote:
>> I think we have time to fix this properly ;), so I'd rather not add this
>> patch at all.
> Yeah, this patch can be dropped.
>
> I have a prototype of async support for tests working. I'll apply it
> on top of the next version Vincenzo posts and
On 2/12/21 9:21 PM, Andrey Konovalov wrote:
> On Thu, Feb 11, 2021 at 4:34 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
>> register which
On 2/12/21 12:30 PM, Lorenzo Pieralisi wrote:
>> However, I have a question. We are relying on context switch to set
>> sctlr_el1_tfc0 right ? If that's the case, till the thread resuming from
>> low power switches context we are running with SCTLR_EL1_TCF0 not
>> reflecting the actual value.
>
On 2/11/21 5:50 PM, Andrey Konovalov wrote:
> Let's default to KASAN_ARG_MODE_DEFAULT like for other args:
>
> if (!arg)
> return -EINVAL;
>
> kasan_init_hw_tags_cpu()/kasan_init_hw_tags() already handle
> KASAN_ARG_MODE_DEFAULT properly.
Ok, no problem, I will take care of it in the next
Hi Andrey,
On 2/11/21 8:13 PM, Andrey Konovalov wrote:
riscv64-linux-ld: report.c:(.text+0x5c4): undefined reference to
`kasan_flag_async'
> Let's do something like this (untested):
>
> https://github.com/xairy/linux/commit/91354d34b30ceedbc1b6417f1ff253de90618a97
Could you reproduce
On 2/11/21 3:33 PM, Vincenzo Frascino wrote:
> The series is based on linux-next/akpm.
>
> To simplify the testing a tree with the new patches on top has been made
> available at [1].
>
> [1] https://git.gitlab.arm.com/linux-arm/linux-vf.git mte/v11.async.akpm
akpm tree seem
asynchronous tag faults before suspend and clear the TFSR_EL1
register after resume to prevent this to happen.
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Lorenzo Pieralisi
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 4
arch/arm64/kernel/mte.c | 20
From: Andrey Konovalov
Asynchronous KASAN mode doesn't guarantee that a tag fault will be
detected immediately and causes tests to fail. Forbid running them
in asynchronous mode.
Signed-off-by: Andrey Konovalov
Signed-off-by: Vincenzo Frascino
---
lib/test_kasan.c | 4
1 file changed, 4
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 | 36
3 files changed, 74 insertions(+)
diff --git a/arch/arm64/include/asm
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
Signed-off-by: Andrey Konovalov
---
include/linux
.
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
[ Add a new
-by: Branislav Rankov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/uaccess.h| 24
arch/arm64/include/asm/word-at-a-time.h | 4
arch/arm64/kernel/mte.c | 16
3 files changed, 44 insertions(+)
diff --git a/arch/arm64
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| 19 ---
3 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/arch/arm64
: Will Deacon
Cc: Dmitry Vyukov
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: Marco Elver
Cc: Evgenii Stepanov
Cc: Branislav Rankov
Cc: Andrey Konovalov
Cc: Lorenzo Pieralisi
Signed-off-by: Vincenzo Frascino
Andrey Konovalov (1):
kasan: don't run tests in async mode
Vincenzo Frascino (6
ot;arm64: kasan: simplify and inline MTE functions")
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Andrey Konovalov
Cc: Andrew Morton
Signed-off-by: Vincenzo Frascino
---
This patch is based on linux-next/akpm
arch/arm64/include/asm/mte-kasan.h | 2 +-
1 file changed, 1 insertion(+), 1 deleti
On 2/11/21 1:35 PM, Ard Biesheuvel wrote:
> On Thu, 11 Feb 2021 at 13:57, Vincenzo Frascino
> wrote:
>>
>> The simplification of mte_get_random_tag() caused the introduction of the
>> warning below:
>>
>> In file included from arch/arm64/include/asm/kasan.h
d it never dereferences the address,
hence 'addr' can be safely initialized to NULL.
Fixes: c8f8de4c0887 ("arm64: kasan: simplify and inline MTE functions")
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Andrey Konovalov
Cc: Andrew Morton
Signed-off-by: Vincenzo Frascino
---
This patch is base
On 2/9/21 5:28 PM, Catalin Marinas wrote:
>> I don't think though you can "check" with IRQs disabled so I suspect
>> that TFSR_EL1 has to be saved/restored (which means that there is a
>> black out period where we run kernel code without being able to detect
>> faults but there is no solution to
Hi Andrey,
On 2/9/21 5:26 PM, Andrey Konovalov wrote:
> On Tue, Feb 9, 2021 at 6:07 PM Catalin Marinas
> wrote:
>>
>> On Tue, Feb 09, 2021 at 04:02:25PM +0100, Andrey Konovalov wrote:
>>> On Tue, Feb 9, 2021 at 1:16 PM Vincenzo Frascino
>>> wrote:
>>&g
On 2/9/21 2:33 PM, Lorenzo Pieralisi wrote:
>> Do we need a similar fix for TFSRE0_EL1? We get away with this if
>> suspend is only entered on the idle (kernel) thread but I recall we
>> could also enter suspend on behalf of a user process (I may be wrong
>> though).
> Yes, when we suspend the
On 2/9/21 12:02 PM, Catalin Marinas wrote:
> On Mon, Feb 08, 2021 at 04:56:17PM +0000, Vincenzo Frascino wrote:
>> From: Andrey Konovalov
>>
>> Asynchronous KASAN mode doesn't guarantee that a tag fault will be
>> detected immediately and causes tests t
On 2/9/21 11:35 AM, Catalin Marinas wrote:
> On Mon, Feb 08, 2021 at 04:56:14PM +0000, Vincenzo Frascino wrote:
>> diff --git a/arch/arm64/include/asm/uaccess.h
>> b/arch/arm64/include/asm/uaccess.h
>> index 0deb88467111..f43d78aee593 100644
>> --- a/arch/arm64/inc
; [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url:
> https://github.com/0day-ci/linux/commits/Vincenzo-Frascino/arm64-ARMv8-5-A-MTE-Add
tch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url:
> https://github.com/0day-ci/linux/commits/Vincenzo-Frascino/arm64-ARMv8-5-A-MTE-Add
Hi Lorenzo,
thank you for your review.
On 2/8/21 6:56 PM, Lorenzo Pieralisi wrote:
>> u64 gcr_kernel_excl __ro_after_init;
>>
>> +static u64 mte_suspend_tfsr_el1;
> IIUC you need this per-CPU (core loses context on suspend-to-RAM but also
> CPUidle, S2R is single threaded but CPUidle runs on
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 | 36
3 files changed, 74 insertions(+)
diff --git a/arch/arm64/include/asm
From: Andrey Konovalov
Asynchronous KASAN mode doesn't guarantee that a tag fault will be
detected immediately and causes tests to fail. Forbid running them
in asynchronous mode.
Signed-off-by: Andrey Konovalov
---
lib/test_kasan.c | 4
1 file changed, 4 insertions(+)
diff --git
.
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
[ Add a new
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
/restore the state of the TFSR_EL1 register during the
suspend/resume operations to prevent this to happen.
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Lorenzo Pieralisi
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/mte.h | 4
arch/arm64/kernel/mte.c | 22
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
Signed-off-by: Andrey Konovalov
---
include/linux
Cc: Marco Elver
Cc: Evgenii Stepanov
Cc: Branislav Rankov
Cc: Andrey Konovalov
Cc: Lorenzo Pieralisi
Signed-off-by: Vincenzo Frascino
Andrey Konovalov (1):
kasan: don't run tests in async mode
Vincenzo Frascino (6):
arm64: mte: Add asynchronous mode support
kasan: Add KASAN mode kernel
Marinas
Cc: Will Deacon
Reported-by: Branislav Rankov
Tested-by: Branislav Rankov
Signed-off-by: Vincenzo Frascino
---
arch/arm64/include/asm/uaccess.h| 19 +++
arch/arm64/include/asm/word-at-a-time.h | 4
arch/arm64/kernel/mte.c | 10 ++
3 files
On 2/5/21 3:49 PM, Andrey Konovalov wrote:
> On Mon, Feb 1, 2021 at 9:04 PM Andrey Konovalov wrote:
>>
>> On Sat, Jan 30, 2021 at 5:52 PM Vincenzo Frascino
>> wrote:
>>>
>>> @@ -45,6 +52,9 @@ static enum kasan_arg_fault kasan_arg_fault
>>&g
On 2/5/21 3:39 PM, Catalin Marinas wrote:
> On Sat, Jan 30, 2021 at 04:52:24PM +0000, Vincenzo Frascino wrote:
>> diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c
>> index 92078e1eb627..7763ac1f2917 100644
>> --- a/arch/arm64/kernel/mte.c
>> ++
On 2/5/21 4:48 PM, Will Deacon wrote:
> On Fri, Feb 05, 2021 at 04:00:07PM +0000, Vincenzo Frascino wrote:
>>
>>
>> On 2/5/21 3:49 PM, Andrey Konovalov wrote:
>>> On Mon, Feb 1, 2021 at 9:04 PM Andrey Konovalov
>>> wrote:
>>>>
>>>>
On 1/30/21 4:52 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
config.h
>> b/tools/testing/selftests/vDSO/vdso_config.h
>> index 6a6fe8d4ff55..6188b16827d1 100644
>> --- a/tools/testing/selftests/vDSO/vdso_config.h
>> +++ b/tools/testing/selftests/vDSO/vdso_config.h
>> @@ -47,10 +47,12 @@
>> #elif defined(__x86_64__)
>> #defin
t;
>> This change also moves these functions into the asm/mte-kasan.h header
>> and implements mte_set_mem_tag_range() via inline assembly to avoid
>> unnecessary functions calls.
>>
>> Co-developed-by: Vincenzo Frascino
>> Signed-off-by: Andrey Konovalov
>
ag_range() via inline assembly to avoid
> unnecessary functions calls.
>
> Co-developed-by: Vincenzo Frascino
Signed-off-by: Vincenzo Frascino
> Signed-off-by: Andrey Konovalov
> ---
> arch/arm64/include/asm/cache.h | 1 -
> arch/arm64/include/asm/kasan.h | 1 +
&
On 1/30/21 4:52 PM, Vincenzo Frascino wrote:
> From: Andrey Konovalov
>
> Asynchronous KASAN mode doesn't guarantee that a tag fault will be
> detected immediately and causes tests to fail. Forbid running them
> in asynchronous mode.
>
> Signed-off-by: Andrey
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
From: Andrey Konovalov
Asynchronous KASAN mode doesn't guarantee that a tag fault will be
detected immediately and causes tests to fail. Forbid running them
in asynchronous mode.
Signed-off-by: Andrey Konovalov
---
lib/test_kasan.c | 4
1 file changed, 4 insertions(+)
diff --git
.
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
[ Add a new
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
Signed-off-by: Andrey Konovalov
---
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
: 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
Andrey Konovalov (1):
kasan: don't run tests in async mode
Vincenzo Frascino (4):
arm64: mte: Add
Hi Andrey,
On 1/29/21 7:21 PM, Andrey Konovalov wrote:
>> The series is based on linux-next/akpm.
>>
>> To simplify the testing a tree with the new patches on top has been made
>> available at [1].
>>
>> [1] https://git.gitlab.arm.com/linux-arm/linux-vf.git mte/v10.async.akpm
>>
>> Changes:
>>
1 - 100 of 578 matches
Mail list logo