mirror of
https://github.com/netdata/libbpf.git
synced 2026-11-09 04:10:13 +08:00
libbpf: Allow use of feature cache for non-token cases
Allow bpf object feat_cache assignment in BPF selftests to simulate missing features via inclusion of libbpf_internal.h and use of bpf_object_set_feat_cache() and bpf_object__sanitize_btf() to test BTF sanitization for cases where missing features are simulated. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Link: https://lore.kernel.org/r/20260408165735.843763-2-alan.maguire@oracle.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
1 parent
dd92bef7f6
commit
63cfece8d9
2 files changed
+12
-3
No files matched your search
@@ -414,6 +414,7 @@ struct kern_feature_cache {
|
||||
|
||||
bool feat_supported(struct kern_feature_cache *cache, enum kern_feature_id feat_id);
|
||||
bool kernel_supports(const struct bpf_object *obj, enum kern_feature_id feat_id);
|
||||
void bpf_object_set_feat_cache(struct bpf_object *obj, struct kern_feature_cache *cache);
|
||||
|
||||
int probe_kern_syscall_wrapper(int token_fd);
|
||||
int probe_memcg_account(int token_fd);
|
||||
@@ -427,7 +428,7 @@ int libbpf__load_raw_btf(const char *raw_types, size_t types_len,
|
||||
int libbpf__load_raw_btf_hdr(const struct btf_header *hdr,
|
||||
const char *raw_types, const char *str_sec,
|
||||
const char *layout_sec, int token_fd);
|
||||
|
||||
struct btf *bpf_object__sanitize_btf(struct bpf_object *obj, struct btf *orig_btf);
|
||||
int btf_load_into_kernel(struct btf *btf,
|
||||
char *log_buf, size_t log_sz, __u32 log_level,
|
||||
int token_fd);
|
||||
|
||||
Reference in new issue
Block a user