SELinux Archive on lore.kernel.org
 help / color / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Paul Moore <paul@paul-moore.com>, SElinux list <selinux@vger.kernel.org>
Subject: Re: [PATCH] selinux-testsuite: add libelf to builds using libbpf
Date: Thu, 10 Oct 2019 13:42:06 +0200
Message-ID: <CAFqZXNtzutozC=2vCC1w4s-4FPjqELg=f6JB9z4NN4u1cgOBSg@mail.gmail.com> (raw)
In-Reply-To: <d9248c65-d22c-4a4f-5fbd-8db9ed087d45@tycho.nsa.gov>

On Wed, Oct 9, 2019 at 8:27 PM Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On 9/25/19 11:22 AM, Paul Moore wrote:
> > On Wed, Sep 25, 2019 at 5:06 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> >> On Wed, Sep 25, 2019 at 12:58 AM Paul Moore <paul@paul-moore.com> wrote:
> >>> From: Paul Moore <paul@paul-moore.com>
> >>>
> >>> On a modern Rawhide system builds that include libbpf require libelf
> >>> as well to avoid the following linker errors:
> >>>
> >>>   # cc -g -O0 -Wall -D_GNU_SOURCE -DHAVE_BPF \
> >>>      client.c ../bpf/bpf_common.c ../bpf/bpf_common.h  -lbpf -o client
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `gelf_getshdr'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `elf_rawdata'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `elf_getscn'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `elf_begin'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `gelf_getrel'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `elf_memory'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `elf_end'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `elf_strptr'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `elf_nextscn'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `gelf_getehdr'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `elf_version'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `elf_getdata'
> >>>   /usr/bin/ld: ... libbpf.so: undefined reference to `gelf_getsym'
> >>
> >> This is a bug in libbpf. I filed a bug against the Fedora package [1]
> >> and also opened a PR [2] against the upstream repo (which is a
> >> modified mirror of the code in the kernel repo under tools/lib/bpf,
> >> where the bug is not present), which I think should fix this problem
> >> also in the Fedora builds.
> >>
> >> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1755317
> >> [2] https://github.com/libbpf/libbpf/pull/72
> >
> > Thanks for tracking down the root cause and filing a report upstream;
> > I didn't have time to sort out the "why", I just wanted to get the
> > test working again :)
> >
> > It looks like the best course of action is to hold off on this fix in
> > hopes that it gets fixed upstream, or at least in Fedora.  If this
> > issue persists for a week or two we can always go ahead and merge this
> > fix, it shouldn't break anything if/when this gets fixed upstream.
> >
> > Tests that fail to run made me sad :(
>
> FWIW, this is still broken on F30 (don't know about F31).  Any chance we
> can get the updated package pushed to F30/F31 too?

There are updates pending for F3[01], which both have the issue fixed:
https://bodhi.fedoraproject.org/updates/FEDORA-2019-aa28a02f4e
https://bodhi.fedoraproject.org/updates/FEDORA-2019-8519f326c2

Both should get pushed to stable automatically in 2 days if there is
no negative feedback (or earlier if there is enough positive feedback
- feel free to test and add +1 karma).

--
Ondrej Mosnacek <omosnace at redhat dot com>
Software Engineer, Security Technologies
Red Hat, Inc.


      parent reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 22:58 Paul Moore
2019-09-25  9:06 ` Ondrej Mosnacek
2019-09-25 15:22   ` Paul Moore
2019-10-09 18:27     ` Stephen Smalley
2019-10-09 22:44       ` Paul Moore
2019-10-10 11:42       ` Ondrej Mosnacek [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFqZXNtzutozC=2vCC1w4s-4FPjqELg=f6JB9z4NN4u1cgOBSg@mail.gmail.com' \
    --to=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

SELinux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux/0 selinux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux selinux/ https://lore.kernel.org/selinux \
		selinux@vger.kernel.org selinux@archiver.kernel.org
	public-inbox-index selinux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox