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:   Sat, 29 Jul 2023 18:48:03 +0100
From:   Conor Dooley <conor@...nel.org>
To:     Mingzheng Xing <xingmingzheng@...as.ac.cn>
Cc:     Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>, Bin Meng <bmeng@...ylab.org>,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, stable@...r.kernel.org,
        Guo Ren <guoren@...nel.org>
Subject: Re: [PATCH v2] riscv: Handle zicsr/zifencei issue between gcc and
 binutils

On Sun, Jul 30, 2023 at 01:36:49AM +0800, Mingzheng Xing wrote:

> I reproduced the error with gcc-12.2.0 and binutils-2.35. I tried a
> different solution, which I think makes the logic easier. Showing
> the new patch code:

It is indeed simpler, neat.

> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 4c07b9189c86..a6fa1eed895c 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -569,25 +569,24 @@ config TOOLCHAIN_HAS_ZIHINTPAUSE
> 
>  config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
>         def_bool y
> -       # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc
> -       depends on AS_IS_GNU && AS_VERSION >= 23800
> +       depends on AS_IS_GNU && AS_VERSION >= 23600
>         help
> -         Newer binutils versions default to ISA spec version 20191213 which
> -         moves some instructions from the I extension to the Zicsr and Zifencei
> -         extensions.
> +         Binutils has supported zicsr and zifencei extensions since version 2.36,
> +         try to adapt to the changes by using explicit zicsr and zifencei via
> +         -march.

This sentence no longer makes sense to me, the motivation for why we are
doing this is lost. Please preserve the link & explanation about the
20191213 version of the spec, adding to it the commentary about how we
can relax the check to 2.36, since that makes our lives easier.

The rest of this looks fine to me, if you resubmit I'll look at it
further on Monday.

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ