Message ID | a6287f2b9836ba88132341766d85810096e27b8e.1607537948.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | kasan: a few HW_TAGS fixes | expand |
On Wed, 9 Dec 2020 at 19:24, Andrey Konovalov <andreyknvl@google.com> wrote: > > This reverts "kasan, arm64: don't allow SW_TAGS with ARM64_MTE". > > In earlier versions on the hardware tag-based KASAN patchset in-kernel > MTE used to be always enabled when CONFIG_ARM64_MTE is on. This caused > conflicts with the software tag-based KASAN mode. > > This is no logner the case: in-kernel MTE is never enabled unless the > CONFIG_KASAN_HW_TAGS is enabled, so there are no more conflicts with > CONFIG_KASAN_SW_TAGS. > > Allow CONFIG_KASAN_SW_TAGS to be enabled even when CONFIG_ARM64_MTE is > enabled. > > Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Reviewed-by: Marco Elver <elver@google.com> > --- > arch/arm64/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 6fefab9041d8..62a7668976a2 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -135,7 +135,7 @@ config ARM64 > select HAVE_ARCH_JUMP_LABEL > select HAVE_ARCH_JUMP_LABEL_RELATIVE > select HAVE_ARCH_KASAN if !(ARM64_16K_PAGES && ARM64_VA_BITS_48) > - select HAVE_ARCH_KASAN_SW_TAGS if (HAVE_ARCH_KASAN && !ARM64_MTE) > + select HAVE_ARCH_KASAN_SW_TAGS if HAVE_ARCH_KASAN > select HAVE_ARCH_KASAN_HW_TAGS if (HAVE_ARCH_KASAN && ARM64_MTE) > select HAVE_ARCH_KFENCE > select HAVE_ARCH_KGDB > -- > 2.29.2.576.ga3fc446d84-goog >
On Wed, 9 Dec 2020 19:51:05 +0100 Marco Elver <elver@google.com> wrote: > > This is no logner the case: in-kernel MTE is never enabled unless the > > CONFIG_KASAN_HW_TAGS is enabled, so there are no more conflicts with > > CONFIG_KASAN_SW_TAGS. > > > > Allow CONFIG_KASAN_SW_TAGS to be enabled even when CONFIG_ARM64_MTE is > > enabled. > > > > Signed-off-by: Andrey Konovalov <andreyknvl@google.com> > > Reviewed-by: Marco Elver <elver@google.com> Thanks. I simply dropped kasan-arm64-dont-allow-sw_tags-with-arm64_mte.patch.
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 6fefab9041d8..62a7668976a2 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -135,7 +135,7 @@ config ARM64 select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select HAVE_ARCH_KASAN if !(ARM64_16K_PAGES && ARM64_VA_BITS_48) - select HAVE_ARCH_KASAN_SW_TAGS if (HAVE_ARCH_KASAN && !ARM64_MTE) + select HAVE_ARCH_KASAN_SW_TAGS if HAVE_ARCH_KASAN select HAVE_ARCH_KASAN_HW_TAGS if (HAVE_ARCH_KASAN && ARM64_MTE) select HAVE_ARCH_KFENCE select HAVE_ARCH_KGDB
This reverts "kasan, arm64: don't allow SW_TAGS with ARM64_MTE". In earlier versions on the hardware tag-based KASAN patchset in-kernel MTE used to be always enabled when CONFIG_ARM64_MTE is on. This caused conflicts with the software tag-based KASAN mode. This is no logner the case: in-kernel MTE is never enabled unless the CONFIG_KASAN_HW_TAGS is enabled, so there are no more conflicts with CONFIG_KASAN_SW_TAGS. Allow CONFIG_KASAN_SW_TAGS to be enabled even when CONFIG_ARM64_MTE is enabled. Signed-off-by: Andrey Konovalov <andreyknvl@google.com> --- arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)