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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 3 Mar 2021 23:45:52 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        clang-built-linux@...glegroups.com,
        Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH v2] MIPS: Make MIPS32_O32 depends on !CC_IS_CLANG

On Thu, Mar 04, 2021 at 02:19:38PM +0800, Tiezhu Yang wrote:
> When build kernel with Clang [1]:

Sorry I did not catch this in the first revision but I think this would
sound better as:

When building with Clang [1]:

I think the kernel part is obvious :) couple more comments about the
commit message inline.

> 
> $ make CC=clang loongson3_defconfig
> $ make CC=clang
> 
> there exists the following error:
> 
>   Checking missing-syscalls for O32
>   CALL    scripts/checksyscalls.sh
> error: ABI 'o32' is not supported on CPU 'mips64r2'
> make[1]: *** [Kbuild:48: missing-syscalls] Error 1
> make: *** [arch/mips/Makefile:419: archprepare] Error 2
> 
> This is a known bug [2] with Clang, as Simon Atanasyan said,
> "There is no plan on support O32 for MIPS64 due to lack of
> resources".
> 
> It is not a good idea to remove CONFIG_MIPS32_O32=y directly
> in defconfig due to GCC works well, as Nathan said, the config

in defconfig because GCC works, as...

> should not even be selectable when build kernel with Clang, so

                                     building with Clang

> just make MIPS32_O32 depends on !CC_IS_CLANG.
> 
> [1] https://www.kernel.org/doc/html/latest/kbuild/llvm.html
> [2] https://bugs.llvm.org/show_bug.cgi?id=38063
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>

I don't know if Nick will have any comments but for me:

Acked-by: Nathan Chancellor <nathan@...nel.org>

I have added this patch and the LLVM bug to our issue tracker:

https://github.com/ClangBuiltLinux/linux/issues/884

> ---
>  arch/mips/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 3a38d27..f6ba59f 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -3318,6 +3318,8 @@ config SYSVIPC_COMPAT
>  config MIPS32_O32
>  	bool "Kernel support for o32 binaries"
>  	depends on 64BIT
> +	# https://bugs.llvm.org/show_bug.cgi?id=38063
> +	depends on !CC_IS_CLANG
>  	select ARCH_WANT_OLD_COMPAT_IPC
>  	select COMPAT
>  	select MIPS32_COMPAT
> -- 
> 2.1.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ