From: Andrii Nakryiko Date: Thu, 2 Apr 2026 20:23:19 +0000 (-0700) Subject: Merge branch 'libbpf-clarify-raw-address-single-kprobe-attach-behavior' X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8aec1058ca598fe2013ef3489ae729a8070801b;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'libbpf-clarify-raw-address-single-kprobe-attach-behavior' Hoyeon Lee says: ==================== libbpf: clarify raw-address single kprobe attach behavior Today libbpf documents single-kprobe attach through func_name, with an optional offset. For the PMU-based path, func_name = NULL with an absolute address in offset already works as well, but that is not described in the API. This patchset clarifies this behavior. First commit fixes kprobe and uprobe attach error handling to use direct error codes. Next adds kprobe API comments for the raw-address form and rejects it explicitly for legacy tracefs/debugfs kprobes. Last adds PERF and LINK selftests for the raw-address form, and checks that LEGACY rejects it. --- Changes in v7: - Change selftest line wrapping and assertions Changes in v6: - Split the kprobe/uprobe direct error-code fix into a separate patch Changes in v5: - Add kprobe API docs, use -EOPNOTSUPP, and switch selftests to LIBBPF_OPTS Changes in v4: - Inline raw-address error formatting and remove the probe_target buffer Changes in v3: - Drop bpf_kprobe_opts.addr and reuse offset when func_name is NULL - Make legacy tracefs/debugfs kprobes reject the raw-address form - Update selftests to cover PERF/LINK raw-address attach and LEGACY reject Changes in v2: - Fix line wrapping and indentation ==================== Link: https://patch.msgid.link/20260401143116.185049-1-hoyeon.lee@suse.com Signed-off-by: Andrii Nakryiko --- e8aec1058ca598fe2013ef3489ae729a8070801b