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] [day] [month] [year] [list]
Date:   Sun, 9 Sep 2018 17:16:48 +0200
From:   Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Kees Cook <keescook@...omium.org>,
        Ingo Molnar <mingo@...nel.org>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Arnd Bergmann <arnd@...db.de>, Joe Perches <joe@...ches.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Paul Burton <paul.burton@...s.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Will Deacon <will.deacon@....com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] include/linux/compiler*.h: add version detection to asm_volatile_goto

Hi Nick,

On Sat, Sep 8, 2018 at 12:21 AM, Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
> The comment above asm_volatile_goto mentions working around a GCC bug,
> and links to a bug report that claims this has been fixed in newer
> versions of GCC.  Testing shows that this was resolved in GCC 4.8.2.
> asm_volatile_goto should also be defined for other compilers that
> support asm goto.
>
> Signed-off-by: Nick Desaulniers <ndesaulniers@...gle.com>
> ---
>  include/linux/compiler-gcc.h   | 7 ++++++-
>  include/linux/compiler_types.h | 4 ++++
>  2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
> index 763bbad1e258..149f411b4366 100644
> --- a/include/linux/compiler-gcc.h
> +++ b/include/linux/compiler-gcc.h
> @@ -171,7 +171,7 @@
>  #endif
>
>  /*
> - * GCC 'asm goto' miscompiles certain code sequences:
> + * GCC < 4.8.2 'asm goto' miscompiles certain code sequences:
>   *

Nice catch. Indeed, it seems broken since 4.5.3 and fixed in every
version after 4.8.1 (at least the ones in godbolt).

Reviewed-by: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>

By the way, arch/arm64/include/asm/jump_label.h is the only place in
the kernel using "asm goto" directly (e.g. the arm64 one isn't). Even
if old gcc doesn't trigger the bug in that case, we should use the
same everywhere for consistency, unless there is a special reason not
to (not documented). I will send a patch.

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ