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] [day] [month] [year] [list]
Message-ID: <c046fe18-8b69-4689-9d28-6926dcbba4b5@linuxfoundation.org>
Date: Fri, 3 May 2024 13:28:37 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Christian Brauner <brauner@...nel.org>, John Hubbard <jhubbard@...dia.com>
Cc: Shuah Khan <shuah@...nel.org>, Nathan Chancellor <nathan@...nel.org>,
 Nick Desaulniers <ndesaulniers@...gle.com>, Bill Wendling
 <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Kees Cook <keescook@...omium.org>, Valentin Obst <kernel@...entinobst.de>,
 linux-kselftest@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
 llvm@...ts.linux.dev, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] selftests/binderfs: use the Makefile's rules, not Make's
 implicit rules

On 5/3/24 03:10, Christian Brauner wrote:
> On Thu, May 02, 2024 at 06:58:20PM -0700, John Hubbard wrote:
>> First of all, in order to build with clang at all, one must first apply
>> Valentin Obst's build fix for LLVM [1]. Once that is done, then when
>> building with clang, via:
>>
>>      make LLVM=1 -C tools/testing/selftests
>>
>> ...the following error occurs:
>>
>>     clang: error: cannot specify -o when generating multiple output files
>>
>> This is because clang, unlike gcc, won't accept invocations of this
>> form:
>>
>>      clang file1.c header2.h
>>
>> While trying to fix this, I noticed that:
>>
>> a) selftests/lib.mk already avoids the problem, and
>>
>> b) The binderfs Makefile indavertently bypasses the selftests/lib.mk
>> build system, and quitely uses Make's implicit build rules for .c files
>> instead.
>>
>> The Makefile attempts to set up both a dependency and a source file,
>> neither of which was needed, because lib.mk is able to automatically
>> handle both. This line:
>>
>>      binderfs_test: binderfs_test.c
>>
>> ...causes Make's implicit rules to run, which builds binderfs_test
>> without ever looking at lib.mk.
>>
>> Fix this by simply deleting the "binderfs_test:" Makefile target and
>> letting lib.mk handle it instead.
>>
>> [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/
>>
>> Fixes: 6e29225af902 ("binderfs: port tests to test harness infrastructure")
>> Cc: Christian Brauner <brauner@...nel.org>
>> Signed-off-by: John Hubbard <jhubbard@...dia.com>
>> ---
> 
> Reviewed-by: Christian Brauner <brauner@...nel.org>
> 

Thank you. Applied to linunx-kselftest next for Linux 6.10-rc1

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ