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: Fri, 7 Jun 2024 12:12:19 +0100
From: Ryan Roberts <ryan.roberts@....com>
To: John Hubbard <jhubbard@...dia.com>, Nathan Chancellor
 <nathan@...nel.org>, Mark Brown <broonie@...nel.org>
Cc: Shuah Khan <shuah@...nel.org>,
 Muhammad Usama Anjum <usama.anjum@...labora.com>,
 Beau Belgrave <beaub@...ux.microsoft.com>,
 Steven Rostedt <rostedt@...dmis.org>,
 Naresh Kamboju <naresh.kamboju@...aro.org>,
 Nick Desaulniers <ndesaulniers@...gle.com>,
 Justin Stitt <justinstitt@...gle.com>, Bill Wendling <morbo@...gle.com>,
 sunliming <sunliming@...inos.cn>, Masami Hiramatsu <mhiramat@...nel.org>,
 Valentin Obst <kernel@...entinobst.de>, linux-kselftest@...r.kernel.org,
 LKML <linux-kernel@...r.kernel.org>, llvm@...ts.linux.dev
Subject: Re: [PATCH v2 1/2] selftests/lib.mk: handle both LLVM=1 and CC=clang
 builds

On 04/06/2024 05:55, John Hubbard wrote:
> On 6/3/24 3:47 PM, Nathan Chancellor wrote:
>> On Mon, Jun 03, 2024 at 04:32:30PM +0100, Mark Brown wrote:
>>> On Fri, May 31, 2024 at 11:37:50AM -0700, John Hubbard wrote:
>>>> The kselftests may be built in a couple different ways:
>>>>      make LLVM=1
>>>>      make CC=clang
>>>>
>>>> In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest
>>>> of lib.mk, and any Makefiles that include lib.mk, can base decisions
>>>> solely on whether or not LLVM is set.
>>>
>>> ICBW but I believe there are still some architectures with clang but not
>>> lld support where there's a use case for using CC=clang.
>>
>> Does CC=clang even work for the selftests? lib.mk here uses 'CC :=' so
>> won't CC=clang get overridden to CC=$(CROSS_COMPILE)gcc?
>>
> 
> I received a report that someone (I forget who or what) was definitely
> attempting to just set CC=clang. But yes, it definitely doesn't work
> properly for CROSS_COMPILE.

This history as I recall, is that I got a bug report [1] stating that:

# tools/testing/selftests/fchmodat2$ make CC=clang

and

# tools/testing/selftests/openat2$ make CC=clang

were both failing due to the -static-libsan / -static-libasan difference between
gcc and clang. I attempted to fix that with [2], which used cc-option to
determine which variant to use. That never got picked up, and John
coincidentally did a similar fix, but relying on LLVM=1 instead.

If we are concluding that CC=clang is an invalid way to do this, then I guess we
should report that back to [1]?

[1] https://lore.kernel.org/all/202404141807.LgsqXPY5-lkp@intel.com/
[2]
https://lore.kernel.org/linux-kselftest/20240417160740.2019530-1-ryan.roberts@arm.com/

Thanks,
Ryan


> 
> And the more we talk it through, the less I like this direction that
> I went off on. Let's just drop this patch and instead consider moving
> kselftest builds closer to kbuild, instead of making it more different.
> 
> 
> thanks,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ