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: Wed, 17 Apr 2024 17:23:47 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Ryan Roberts" <ryan.roberts@....com>,
 "kernel test robot" <yujie.liu@...el.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
 "Andrew Morton" <akpm@...ux-foundation.org>, llvm@...ts.linux.dev,
 "Linux Memory Management List" <linux-mm@...ck.org>
Subject: Re: clang: error: unknown argument '-static-libasan'; did you mean
 '-static-libsan'?

On Wed, Apr 17, 2024, at 17:11, Ryan Roberts wrote:
> On 16/04/2024 15:42, Arnd Bergmann wrote:
>> On Tue, Apr 16, 2024, at 16:33, Ryan Roberts wrote:
>> 
>> I'm not entirely sure how much of the Kbuild infrastructure we
>> can rely on here. If the .config file gets included, this should
>> work:
>
> Thanks for the pointers. Unfortunately neither don't works as we don't have any
> of the Kbuild infrastructure.
>
> I'm not really sure what to do here. The best I've come up with so far is to
> just remove asan from these binaries. They are pretty simple selftests. I'm not
> sure its adding a whole lot of value anyway.
>
> Does anyone have any advice?
>

>> Alternatively, if the cc-option macro is available, you could
>> try this one
>> 
>> CFLAGS += $(call cc-option, -static-libasan) $(call cc-option, -static-libsan) 

I had another look at this and found example code in
tools/thermal/tmon/Makefile that you should be able to adapt.
Apparently the cc-option macro is not provided by default, but
there is a copy you can include:

# We need this for the "cc-option" macro.
include ../../build/Build.include
WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int
override CFLAGS+= $(call cc-option,-O3,-O1) ${WARNFLAGS}
# Add "-fstack-protector" only if toolchain supports it.
override CFLAGS+= $(call cc-option,-fstack-protector-strong)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ