[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250815025227.6204-1-chenyuan_fl@163.com>
Date: Fri, 15 Aug 2025 03:52:25 +0100
From: chenyuan_fl@....com
To: yonghong.song@...ux.dev,
olsajiri@...il.com
Cc: aef2617b-ce03-4830-96a7-39df0c93aaad@...nel.org,
andrii@...nel.org,
ast@...nel.org,
bpf@...r.kernel.org,
chenyuan@...inos.cn,
daniel@...earbox.net,
linux-kernel@...r.kernel.org,
qmo@...nel.org
Subject: [PATCH 0/2] bpftool: Refactor config parsing and add CET symbol matching
From: Yuan CHen <chenyuan@...inos.cn>
1. **Refactor kernel config parsing**
- Moves duplicate config file handling from feature.c to common.c
- Keeps all existing functionality while enabling code reuse
2. **Add CET-aware symbol matching**
- Adjusts kprobe hook detection for x86_64 CET (endbr32/64 prefixes)
- Matches symbols at both original and CET-adjusted addresses
Changed in PATCH v4:
* Refactor repeated code into a function.
* Add detection for the x86 architecture.
Changed int PATH v5:
* Remove detection for the x86 architecture.
Changed in PATCH v6:
* Add new helper patch (1/2) to refactor kernel config reading
* Use the new read_kernel_config() in CET symbol matching (2/2) to check CONFIG_X86_KERNEL_IBT
Yuan Chen (2):
bpftool: Refactor kernel config reading into common helper
bpftool: Add CET-aware symbol matching for x86_64 architectures
tools/bpf/bpftool/common.c | 93 +++++++++++++++++++++++++++++++++++++
tools/bpf/bpftool/feature.c | 86 ++--------------------------------
tools/bpf/bpftool/link.c | 38 ++++++++++++++-
tools/bpf/bpftool/main.h | 9 ++++
4 files changed, 142 insertions(+), 84 deletions(-)
--
2.39.5
Powered by blists - more mailing lists