lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Nov 2020 16:48:14 +0100
From:   Alexander Potapenko <glider@...gle.com>
To:     Andrey Konovalov <andreyknvl@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Marco Elver <elver@...gle.com>,
        Evgenii Stepanov <eugenis@...gle.com>,
        Branislav Rankov <Branislav.Rankov@....com>,
        Kevin Brodsky <kevin.brodsky@....com>,
        kasan-dev <kasan-dev@...glegroups.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH mm v10 24/42] arm64: Enable armv8.5-a asm-arch option

On Fri, Nov 13, 2020 at 11:17 PM Andrey Konovalov <andreyknvl@...gle.com> wrote:
>
> From: Vincenzo Frascino <vincenzo.frascino@....com>
>
> Hardware tag-based KASAN relies on Memory Tagging Extension (MTE) which
> is an armv8.5-a architecture extension.
>
> Enable the correct asm option when the compiler supports it in order to
> allow the usage of ALTERNATIVE()s with MTE instructions.
>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
> Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
> Reviewed-by: Catalin Marinas <catalin.marinas@....com>
Reviewed-by: Alexander Potapenko <glider@...gle.com>
> ---
> Change-Id: I172e15e4c189f073e4c14a10276b276092e76536
> ---
>  arch/arm64/Kconfig  | 4 ++++
>  arch/arm64/Makefile | 5 +++++
>  2 files changed, 9 insertions(+)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index c999da4f2bdd..b7d1f1a5705d 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -1591,6 +1591,9 @@ endmenu
>
>  menu "ARMv8.5 architectural features"
>
> +config AS_HAS_ARMV8_5
> +       def_bool $(cc-option,-Wa$(comma)-march=armv8.5-a)
> +
>  config ARM64_BTI
>         bool "Branch Target Identification support"
>         default y
> @@ -1665,6 +1668,7 @@ config ARM64_MTE
>         bool "Memory Tagging Extension support"
>         default y
>         depends on ARM64_AS_HAS_MTE && ARM64_TAGGED_ADDR_ABI
> +       depends on AS_HAS_ARMV8_5
>         select ARCH_USES_HIGH_VMA_FLAGS
>         help
>           Memory Tagging (part of the ARMv8.5 Extensions) provides
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 5789c2d18d43..50ad9cbccb51 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -100,6 +100,11 @@ ifeq ($(CONFIG_AS_HAS_ARMV8_4), y)
>  asm-arch := armv8.4-a
>  endif
>
> +ifeq ($(CONFIG_AS_HAS_ARMV8_5), y)
> +# make sure to pass the newest target architecture to -march.
> +asm-arch := armv8.5-a
> +endif
> +
>  ifdef asm-arch
>  KBUILD_CFLAGS  += -Wa,-march=$(asm-arch) \
>                    -DARM64_ASM_ARCH='"$(asm-arch)"'
> --
> 2.29.2.299.gdc1121823c-goog
>


-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ