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, 5 Jun 2024 09:18:33 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Ian Rogers <irogers@...gle.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Jiri Olsa <jolsa@...nel.org>, Kan Liang <kan.liang@...ux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-perf-users@...r.kernel.org
Subject: Re: Makefile.perf:1149: *** Missing bpftool input for generating
 vmlinux.h. Stop.


* Ingo Molnar <mingo@...nel.org> wrote:

> 
> * Namhyung Kim <namhyung@...nel.org> wrote:
> 
> > Hi Ian and Ingo,
> > 
> > The failure happens when you don't have vmlinux.h or vmlinux with BTF.
> > 
> > ifeq ($(VMLINUX_H),)
> >   ifeq ($(VMLINUX_BTF),)
> >     $(error Missing bpftool input for generating vmlinux.h)
> >   endif
> > endif
> > 
> > VMLINUX_BTF can be empty if you didn't build a kernel or
> > it doesn't have a BTF section and the current kernel also
> > has no BTF.  This is totally ok.
> > 
> > But VMLINUX_H should be set to the minimal version in
> > the source tree (unless you overwrite it manually) when you
> > don't pass GEN_VMLINUX_H=1 (which requires VMLINUX_BTF
> > should not be empty).  The problem is that it's defined in
> > Makefile.config which is not included for `make clean`.
> > 
> > Can you please verify if the below patch fixes it?
> > 
> > Thanks,
> > Namhyung
> > 
> > ---8<---
> > 
> > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> > index 5c35c0d89306..e6d56b555369 100644
> > --- a/tools/perf/Makefile.perf
> > +++ b/tools/perf/Makefile.perf
> > @@ -214,6 +214,7 @@ NON_CONFIG_TARGETS := clean python-clean TAGS tags
> > cscope help
> > 
> >  ifdef MAKECMDGOALS
> >  ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),)
> > +  VMLINUX_H=$(src-perf)/util/bpf_skel/vmlinux/vmlinux.h
> >    config := 0
> >  endif
> >  endif
> 
> Yeah, this appears to be doing the trick here - judging by a couple of 
> tries of interrupted builds:
> 
>    Tested-by: Ingo Molnar <mingo@...nel.org>

Specifically I also tested it on a failed tree, by merging in your fix the 
build now progresses as expected. So this is fixed for good.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ