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]
Message-ID: <958c5df5-76aa-9161-9519-07a03ee864a0@loongson.cn>
Date:   Thu, 4 Mar 2021 11:48:09 +0800
From:   Tiezhu Yang <yangtiezhu@...ngson.cn>
To:     Nathan Chancellor <nathan@...nel.org>
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] MIPS: Add comment about CONFIG_MIPS32_O32 in
 loongson3_defconfig when build with Clang

On 03/04/2021 10:02 AM, Nathan Chancellor wrote:
> On Thu, Mar 04, 2021 at 09:15:44AM +0800, Tiezhu Yang wrote:
>> When build kernel with Clang [1]:
>>
>> $ make CC=clang loongson3_defconfig
>> $ make CC=clang

[snip]

> I think this might be a better solution. I know that I personally never
> read defconfig files if a build fails.
>
> If CONFIG_MIPS32_O32 is broken with clang and the MIPS backend
> maintainer has said that it will not be supported due to lack of
> resources, then the config should not even be selectable in my opinion.
>
> Cheers,
> Nathan
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index d89efba3d8a4..ed35318a759d 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -3315,6 +3315,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 $(success,$(CC) $(CLANG_FLAGS) -march=mips64 -o32 -c -x c /dev/null -o /dev/null)
>   	select ARCH_WANT_OLD_COMPAT_IPC
>   	select COMPAT
>   	select MIPS32_COMPAT

Hi Nathan,

Thank you very much for your reply and suggestion, maybe the following
change is simple, clear and better? If yes, I will send v2 later.

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

Thanks,
Tiezhu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ