From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: dsahern@kernel.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH iproute2-next 0/5] bpf: fix mount point parsing and drop the legacy loader
Date: Wed, 18 Nov 2026 16:15:04 -0800 [thread overview]
Message-ID: <20261119001539.2868072-1-stephen@networkplumber.org> (raw)
While looking at OSS Scanner reports noticed a pattern of issues
around the BPF loader. The first set related to parsing of
mount points with fscanf("%s").
The next part were issues from the legacy BPF loader which
is no longer needed. This series rips the band-aid off
and related parts no longer needed.
There were also some bugs in error handling found
while changing all this.
Stephen Hemminger (5):
lib/bpf: parse /proc/mounts with getmntent and check fs magic
lib/fs: parse /proc/mounts with getmntent and check fs magic
tc: remove eBPF map export and exec bpf import
lib/bpf: require libbpf and remove legacy ELF loader
lib/bpf: check for missing bpf fs mount point
bash-completion/tc | 18 +-
configure | 107 +-
etc/iproute2/bpf_pinning | 6 -
examples/bpf/README | 18 +-
examples/bpf/bpf_map_in_map.c | 4 +-
examples/bpf/bpf_shared.c | 14 +-
examples/bpf/legacy/bpf_cyclic.c | 35 -
examples/bpf/legacy/bpf_graft.c | 66 -
examples/bpf/legacy/bpf_map_in_map.c | 56 -
examples/bpf/legacy/bpf_shared.c | 53 -
examples/bpf/legacy/bpf_tailcall.c | 117 -
include/bpf_api.h | 7 +-
include/bpf_elf.h | 35 +-
include/bpf_scm.h | 77 -
include/bpf_util.h | 41 +-
include/sha1.h | 18 -
ip/iplink.c | 4 -
lib/Makefile | 10 +-
lib/bpf_glue.c | 15 +-
lib/bpf_legacy.c | 3306 --------------------------
lib/bpf_libbpf.c | 259 +-
lib/bpf_util.c | 1100 +++++++++
lib/fs.c | 33 +-
lib/sha1.c | 108 -
man/man8/ip-link.8.in | 5 +-
man/man8/tc-bpf.8 | 173 +-
misc/ss.c | 30 -
tc/e_bpf.c | 157 +-
tc/f_bpf.c | 15 +-
tc/m_bpf.c | 16 +-
30 files changed, 1246 insertions(+), 4657 deletions(-)
delete mode 100644 etc/iproute2/bpf_pinning
delete mode 100644 examples/bpf/legacy/bpf_cyclic.c
delete mode 100644 examples/bpf/legacy/bpf_graft.c
delete mode 100644 examples/bpf/legacy/bpf_map_in_map.c
delete mode 100644 examples/bpf/legacy/bpf_shared.c
delete mode 100644 examples/bpf/legacy/bpf_tailcall.c
delete mode 100644 include/bpf_scm.h
delete mode 100644 include/sha1.h
delete mode 100644 lib/bpf_legacy.c
create mode 100644 lib/bpf_util.c
delete mode 100644 lib/sha1.c
--
2.53.0
next reply other threads:[~2026-11-19 0:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 0:15 Stephen Hemminger [this message]
2026-11-19 0:15 ` [PATCH iproute2-next 1/5] lib/bpf: parse /proc/mounts with getmntent and check fs magic Stephen Hemminger
2026-11-19 0:15 ` [PATCH iproute2-next 2/5] lib/fs: " Stephen Hemminger
2026-11-19 0:15 ` [PATCH iproute2-next 3/5] tc: remove eBPF map export and exec bpf import Stephen Hemminger
2026-11-19 0:15 ` [PATCH iproute2-next 4/5] lib/bpf: require libbpf and remove legacy ELF loader Stephen Hemminger
2026-11-19 0:15 ` [PATCH iproute2-next 5/5] lib/bpf: check for missing bpf fs mount point Stephen Hemminger
Reply instructions:
You may reply publicly 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=20261119001539.2868072-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dsahern@kernel.org \
--cc=netdev@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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox