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: <94253114-dcd1-4f65-9771-7534926c66f2@kylinos.cn>
Date: Tue, 6 May 2025 15:17:16 +0800
From: Bing Huang <huangbing@...inos.cn>
To: Andrea Righi <arighi@...dia.com>
Cc: tj@...nel.org, void@...ifault.com, changwoo@...lia.com,
 joshdon@...gle.com, brho@...gle.com, haoluo@...gle.com,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools/sched_ext: Fix errors when running make mrproper


On 5/5/25 15:22, Andrea Righi wrote:
> Hi Bing,
>
> On Wed, Apr 30, 2025 at 10:48:33AM +0800, Bing Huang wrote:
>> If the system environment used to compile the kernel code does not
>> have the BTF feature enabled, running make mrproper will result in
>> errors similar to the following:
>>
>> Makefile:84: *** Cannot find a vmlinux for VMLINUX_BTF at any of "  ../../vmlinux /sys/kernel/btf/vmlinux /boot/vmlinux-4.4.131-20190505.kylin.server-generic".  Stop.
>> make[2]: *** [Makefile:192: sched_ext_clean] Error 2
>> make[1]: *** [/home/huangbing/klinux/Makefile:1374: sched_ext] Error 2
>> make: *** [Makefile:236: __sub-make] Error 2
>>
>> Signed-off-by: Bing Huang <huangbing@...inos.cn>
>> ---
>>   tools/sched_ext/Makefile | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/tools/sched_ext/Makefile b/tools/sched_ext/Makefile
>> index ca3815e572d8..5329cae284c6 100644
>> --- a/tools/sched_ext/Makefile
>> +++ b/tools/sched_ext/Makefile
>> @@ -79,9 +79,11 @@ VMLINUX_BTF_PATHS ?= $(if $(O),$(O)/vmlinux)					\
>>   		     /sys/kernel/btf/vmlinux					\
>>   		     /boot/vmlinux-$(shell uname -r)
>>   VMLINUX_BTF ?= $(abspath $(firstword $(wildcard $(VMLINUX_BTF_PATHS))))
>> +ifeq ($(findstring $(MAKECMDGOALS),clean),)
> Looks good, just a minor nit, can we do something like this instead?
>
> ifneq ($(sort $(MAKECMDGOALS)),clean)
>
> Since we only support "clean", we can simply check if "clean" is the only
> target specified.
>
> This also handles odd cases like `make clean clean`, where we still skip
> the check as expected. WDYT?
>
> Thanks,
> -Andrea

Thank you very much for your feedback. I have tested the changes you

suggested, and it work perfectly! I will send v2 shortly.

>
>>   ifeq ($(VMLINUX_BTF),)
>>   $(error Cannot find a vmlinux for VMLINUX_BTF at any of "$(VMLINUX_BTF_PATHS)")
>>   endif
>> +endif
>>   
>>   BPFTOOL ?= $(DEFAULT_BPFTOOL)
>>   
>> -- 
>> 2.25.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ