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]
Date: Fri, 16 Feb 2024 14:48:48 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>,
	Ian Rogers <irogers@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] perf augmented_raw_syscalls.bpf: Move 'struct
 timespec64' to vmlinux.h

On Mon, Feb 05, 2024 at 03:16:25PM -0800, Namhyung Kim wrote:
> On Fri, Feb 2, 2024 at 6:01 PM Namhyung Kim <namhyung@...nel.org> wrote:
> > On Fri, Feb 2, 2024 at 11:35 AM Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> > > If we instead decide to generate vmlinux.h from BTF info, it will be
> > > there:

> > >   $ pahole timespec64
> > >   struct timespec64 {
> > >         time64_t                   tv_sec;               /*     0     8 */
> > >         long int                   tv_nsec;              /*     8     8 */
> > >   };

> > Acked-by: Namhyung Kim <namhyung@...nel.org>
 
> Hmm.. but it makes it fail to build with GEN_VMLINUX_H=1.
 
>   CLANG   linux/tools/perf/util/bpf_skel/.tmp/augmented_raw_syscalls.bpf.o
> In file included from util/bpf_skel/augmented_raw_syscalls.bpf.c:10:
> linux/tools/include/uapi/linux/bpf.h:55:2: error: redefinition of
> enumerator 'BPF_REG_0'
>         BPF_REG_0 = 0,
>         ^
> linux/tools/perf/util/bpf_skel/.tmp/../vmlinux.h:46833:2: note:
> previous definition is here
>         BPF_REG_0 = 0,
>         ^

Right, the following oneliner fixes it (the minimalistic pre-built
vmlinux.h we carry when not using GEN_VMLINUX_H=1 already has it), I'll
squash it, do some container test builds and resend.

- Arnaldo

diff --git a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c b/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
index d3b672593c540259..0acbd74e8c760956 100644
--- a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
+++ b/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
@@ -7,7 +7,6 @@
  */
 
 #include "vmlinux.h"
-#include <linux/bpf.h>
 #include <bpf/bpf_helpers.h>
 #include <linux/limits.h>
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ