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]
Message-ID: <CAEf4BzZnWHr-5QS0zzku=2tspWESAW-mE6yVRjzxbqr3g4_0FA@mail.gmail.com>
Date:   Tue, 13 Aug 2019 21:45:45 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>, Andrey Ignatov <rdna@...com>
Subject: Re: [PATCH bpf-next] libbpf: make libbpf.map source of truth for
 libbpf version

On Tue, Aug 13, 2019 at 5:51 PM Jakub Kicinski
<jakub.kicinski@...ronome.com> wrote:
>
> On Tue, 13 Aug 2019 16:24:08 -0700, Andrii Nakryiko wrote:
> > diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
> > index 9312066a1ae3..d9afc8509725 100644
> > --- a/tools/lib/bpf/Makefile
> > +++ b/tools/lib/bpf/Makefile
> > @@ -1,9 +1,10 @@
> >  # SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
> >  # Most of this file is copied from tools/lib/traceevent/Makefile
> >
> > -BPF_VERSION = 0
> > -BPF_PATCHLEVEL = 0
> > -BPF_EXTRAVERSION = 4
> > +BPF_FULL_VERSION = $(shell \
> > +     grep -E 'LIBBPF_([0-9]+)\.([0-9]+)\.([0-9]+) \{' libbpf.map | \
> > +     tail -n1 | cut -d'_' -f2 | cut -d' ' -f1)
> > +BPF_VERSION = $(firstword $(subst ., ,$(BPF_FULL_VERSION)))
> >
> >  MAKEFLAGS += --no-print-directory
> >
> > @@ -79,15 +80,12 @@ export prefix libdir src obj
> >  libdir_SQ = $(subst ','\'',$(libdir))
> >  libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
> >
> > +LIBBPF_VERSION       = $(BPF_FULL_VERSION)
>
> Perhaps better use immediate set here ':='?
> I'm not sure how many times this gets evaluated, but it shouldn't
> really change either..

Yep, makes sense, will do.

>
> >  VERSION              = $(BPF_VERSION)
> > -PATCHLEVEL   = $(BPF_PATCHLEVEL)
> > -EXTRAVERSION = $(BPF_EXTRAVERSION)
> >
> >  OBJ          = $@
> >  N            =
> >
> > -LIBBPF_VERSION       = $(BPF_VERSION).$(BPF_PATCHLEVEL).$(BPF_EXTRAVERSION)
> > -
> >  LIB_TARGET   = libbpf.a libbpf.so.$(LIBBPF_VERSION)
> >  LIB_FILE     = libbpf.a libbpf.so*
> >  PC_FILE              = libbpf.pc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ