🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18851

[PATCH iproute2-next 0/5] bpf: fix mount point parsing and drop the legacy loader

#18851
From: Stephen Hemminger
Date: Thu, 19 Nov 2026 00:15
64 lines
13212 bytes
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
Technical Details
Message-ID: <20261119001539.2868072-1-stephen@networkplumber.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366565-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366565-linux-kernel-netdev=dewy.ru
From: stephen@networkplumber.org (Stephen Hemminger)
Newsgroups: linux.kernel.netdev
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
Organization: Usenet Network
Message-ID: <20261119001539.2868072-1-stephen@networkplumber.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network; logging-data="2738692"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:BqhHmoeyoqSzPDliaR0G3R+9yVA= sha256:uE3HUTUNnA/bZEk/+I6R8Xl1t/VkgSyAQziKcesfhqw= sha1:SalWv8MDVLrvKJJAPdITWdJWL7k= sha256:pFwETd/XFB1YWM5yQvEGQMq+OwXD5WeWSofi2Daytnc=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 43EBA115453; Thu, 19 Nov 2026 03:16:00 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.95
X-Spam-Status: No, score=-2.95 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t3HIksrSXMyl; Thu, 19 Nov 2026 03:15:56 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366565-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=quarantine dis=none) header.from=networkplumber.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 4F03011543B; Thu, 19 Nov 2026 03:15:48 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 6BFDB229D5F; Thu, 19 Nov 2026 00:15:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795047345; b=LiQXyuR18vrkseYK2q7KoUozmJ+HRBQnwLjElT/PlkNtlLtiGwTtvZdDINZzwFJlVuwG w+8XKR4jqiM7aXzVlpCs+l8RYec+FoIlQOKM9afCW88TPCeVkooyKXJhI1Evyeq7ZkRss Twx7sspacrl0gCflUYv/GDlYje82c/4IQcPBm1r/x3L0JsEzV20rP/6koHP+cNGRoZ5wg vMscoCQp9Ewr7CS1pqNeI2hjDCMRIimHpWgQ3s94Hc/1VIZ/t/G1hFkkhmthXhjGdG6Ek yIOn6huBAThJFfp1e2c7jPEYFhdI94xKCJYtD5gmDPWtS7lYqh2pTVAlP1yD6EMJBZw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795047345; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received: Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List: List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe: List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding; bh=GGLWO5HqV8utX0YEsJUTAdfePdVILSxQ8MS1FL2bJAU=; b=EIu2MlZBDtdh97MIbSotzVo6fAoz3ydkCQb+RC/on2E0dmxSYlrp7+Dg7OhusyhPXucf S6IKE2HCd6Pw5OsMrEN7ZVVWxsHx8ObECUM7jwWoLExZnGymDY+c4b5lB1RcBnXUkAZUp PE7xH8JId9WRwWt6DE00YqyHK7URMf8SCgR1P5b39g4D+p6AK7nEeJuh1ISVIb6EEck4w iKxsLZniW9IDerjHLkabQIsMA7Tjhv7Rm3DZp+rSQe+9W1iSXqM0B0EXlRjFIMZqFReaS BTGhVBesDPuNaqINWaGZS+NeC2ONOpVhBXc0admAPgQNqso/QiC+kW54YqqB+7uNoww==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=qmGvq67a; dmarc=pass header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24721606A325; Thu, 19 Nov 2026 00:15:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=qmGvq67a
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.52
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795047344; b=uGWB8qf6PliDBRuwbpIPF0iujnbcdKha7fDn8qiK8wfNwe8HYpN4JErBA6snypoCOZbF KP3KJKulfdb+Eu/RXsa5mRVph2ZT+EtVUeJU7/8AiGo/faM1rk/stP7kqjnoWeYF0Yg1/ jEsKQTMHZuIHU7JuiySdy+W6j5PIGy7/ZSE1QWuZZFSArUg9appwdn5mVf24MDqVG+cFs WnuvNSzbOKen8VG64MvMJWdi4uwuAtkufTwq9NjfSWo6Qp1Cvo9uGu86qV/Hicv+ZVBHC pbhe627gBkyxDxdxBBR0pEUtGFWmaYKUKMwwr7c0YNRger1JQMopHNgQUO0zMNlLQDQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795047344; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=GGLWO5HqV8utX0YEsJUTAdfePdVILSxQ8MS1FL2bJAU=; b=EuSUAoGiOS1g411rLvSYYF1ebD/5yy08p7eNPYLJ9HaX9RXUL4OIzXmnDOMfVwEEqV5i BIFlBRVDbsPmi8rstHHaxXqj5Vcv7qPKvRsx05qJes/ypFk4ZBPk/LKRXXNEejU+U5BLK wRlJR6sWLypaO/5Z5p/e6gPoNxuaieFjECQwl6jZ6JXR5OlXxdPS2AXZh3v9b7Br00V0I R325hTI6dhxbby1So6HW+5sWNW4XU3fExO+1rIOVplD209TmeGPAzJewViA0m37i7Mh85 Gt+KbzeLqmseewQXwh40Y1nOSnI33jAZ0sNbEma3B4asQiij1d9T4Yl6Z8Z/qmw2LwQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=qmGvq67a; arc=none smtp.remote-ip=209.85.216.52
X-Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6FE9606A31C for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 00:15:43 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B6FE9606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org
X-Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-3b3fb193c03so116538a91.2 for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 16:15:43 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1795047343; x=1795652143; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=GGLWO5HqV8utX0YEsJUTAdfePdVILSxQ8MS1FL2bJAU=; b=qmGvq67alvApBFL43K31TIe7JOiREuJ5mYRw8iXzVD5hYJ9xE5B80W3w/c4WNoO7ut QMXArvr32QuvWnAHJ1DnMqjsUS1rikdrGPSoxx/h3mfL+wfK3/csbaegydkfV/9UCW16 7Db2bcknGM+nG5TtlsdJL1YNbQG1qc/776Dc/mJinqZqjsXuZo+GYzrnd8s9jgrAqoED /IWALtOZvIOPk7/DZyNCv4hn2rVHWaWyXoNd3CZ08LJUwFZQEJ+UkkLlfaJTZPqj481M rAjsNBQdk32T516BOj6tL6xwTg83dCljaHm/RXX7DxT+VoVnEy7DWUu2uTqs9C5yWLGB /ZZg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795047343; x=1795652143; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=GGLWO5HqV8utX0YEsJUTAdfePdVILSxQ8MS1FL2bJAU=; b=cjoEPTkfNPRL95Aj5ez4u/PPgTelzx478xEFn/D+wqWakXFlyo9BBiwG5+2hgVNro/ jW/85VwQOylFpdWSS+aNigxaKERSzxZ329jfxS/fdB5h8UGHLi7xtcRnSe0rBZV9dWwz TmAM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with SMTP id 98e67ed59e1d1-3b3d07b803amr4079501a91.25.1795047343057; Wed, 18 Nov 2026 16:15:43 -0800 (PST)
X-Received: from phoenix.lan (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b3fe0b62e7sm444278a91.11.2026.11.18.16.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2026 16:15:42 -0800 (PST)
X-Cc: dsahern@kernel.org, Stephen Hemminger <stephen@networkplumber.org>
X-Mailer: git-send-email 2.53.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Received-Bytes: 12926