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  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:   Tue, 2 Nov 2021 10:51:55 +0100
From:   Miguel Ojeda <>
To:     Dan Li <>
Cc:     Catalin Marinas <>,
        Will Deacon <>,
        Nathan Chancellor <>,
        Nick Desaulniers <>,
        Kees Cook <>,
        Thomas Gleixner <>,
        Andrew Morton <>,
        Peter Zijlstra <>,
        Sami Tolvanen <>,
        Masahiro Yamada <>,
        Mike Rapoport <>,
        Mark Rutland <>,,, Steven Rostedt <>,
        Viresh Kumar <>,,
        Colin King <>,
        Miguel Ojeda <>, Arnd Bergmann <>,
        Luc Van Oostenryck <>,
        Arvind Sankar <>,
        Marco Elver <>,
Subject: Re: [PATCH] [RFC/RFT] AARCH64: Add gcc Shadow Call Stack support

On Tue, Nov 2, 2021 at 8:58 AM Dan Li <> wrote:
> I tried to submit a patch[1] to add compiler's SCS support on gcc-11.1.0.

This would go into GCC 12, right?

> [1]

Nit: you can use the `Link: ` tag for this.

>  # Supported by clang >= 7.0

We should add a comment here saying the minimum version too, e.g. GCC
>= 12 (assuming it will be merged)

> -       def_bool $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18)
> +       def_bool CC_IS_CLANG || $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18)

This is changing the default for Clang (which looks fine due to our
minimum Clang version), but if the test for GCC works the same way,
why not just keep the line as it was since it covers both?

> +#if __has_attribute(__no_sanitize_shadow_call_stack__)
> +#define __noscs __attribute__((no_sanitize_shadow_call_stack))
> +#else
> +#define __noscs
> +#endif

No need for the `else` branch here, it is done in `compiler_types.h`
(to be consistent with Clang).

Also, I hope one day GCC and Clang doing the same for these
sanitize-related bits...


Powered by blists - more mailing lists