* [PATCH RFC 0/3] bpf: show attached name for progs without btf name
@ 2022-02-18 9:56 Yafang Shao
2022-02-18 9:56 ` [PATCH RFC 1/3] bpf: rename attach_func_name to attach_name Yafang Shao
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Yafang Shao @ 2022-02-18 9:56 UTC (permalink / raw)
To: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
kpsingh
Cc: netdev, bpf, Yafang Shao
With progs.debug we can get the attached name of the bpf prog which is
attached to a kernel function. But we can't get bpf progs which are
attached to others, like a cgroup, sockmap and etc. This patchset means
to extend the attached name to other types.
The member attach_func_name in struct bpf_prog_aux is renamed to
attach_name in patch #1, to avoid possible confusion. Then in patch #2
and #3 I extend the attached name to bpf progs which are attached to a
cgroup or a sockmap. If this solution is acceptable, I will extend it to
other attach types in the next step.
Yafang Shao (3):
bpf: rename attach_func_name to attach_name
bpf: set attached cgroup name in attach_name
bpf: set attached sockmap id in attach_name
include/linux/bpf.h | 3 +-
kernel/bpf/bpf_iter.c | 2 +-
kernel/bpf/bpf_lsm.c | 2 +-
kernel/bpf/btf.c | 2 +-
kernel/bpf/cgroup.c | 8 +
kernel/bpf/preload/iterators/iterators.bpf.c | 4 +-
kernel/bpf/preload/iterators/iterators.skel.h | 488 +++++++++---------
kernel/bpf/syscall.c | 2 +-
kernel/bpf/verifier.c | 4 +-
net/core/sock_map.c | 8 +-
10 files changed, 276 insertions(+), 247 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH RFC 1/3] bpf: rename attach_func_name to attach_name
2022-02-18 9:56 [PATCH RFC 0/3] bpf: show attached name for progs without btf name Yafang Shao
@ 2022-02-18 9:56 ` Yafang Shao
2022-02-18 9:56 ` [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name Yafang Shao
2022-02-18 9:56 ` [PATCH RFC 3/3] bpf: set attached sockmap id " Yafang Shao
2 siblings, 0 replies; 11+ messages in thread
From: Yafang Shao @ 2022-02-18 9:56 UTC (permalink / raw)
To: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
kpsingh
Cc: netdev, bpf, Yafang Shao
The member attach_func_name in struct bpf_prog_aux is renamed to
attach_name, in order to show a non-function name.
This is a preparation of the followup patches.
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
include/linux/bpf.h | 3 +-
kernel/bpf/bpf_iter.c | 2 +-
kernel/bpf/bpf_lsm.c | 2 +-
kernel/bpf/btf.c | 2 +-
kernel/bpf/preload/iterators/iterators.bpf.c | 4 +-
kernel/bpf/preload/iterators/iterators.skel.h | 488 +++++++++---------
kernel/bpf/syscall.c | 2 +-
kernel/bpf/verifier.c | 4 +-
8 files changed, 261 insertions(+), 246 deletions(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index e7a163a3146b..f4da69f9f634 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -878,8 +878,7 @@ struct bpf_prog_aux {
struct hlist_node tramp_hlist;
/* BTF_KIND_FUNC_PROTO for valid attach_btf_id */
const struct btf_type *attach_func_proto;
- /* function name for valid attach_btf_id */
- const char *attach_func_name;
+ const char *attach_name;
struct bpf_prog **func;
void *jit_data; /* JIT specific data. arch dependent */
struct bpf_jit_poke_descriptor *poke_tab;
diff --git a/kernel/bpf/bpf_iter.c b/kernel/bpf/bpf_iter.c
index b2ee45064e06..40bda43bbbcf 100644
--- a/kernel/bpf/bpf_iter.c
+++ b/kernel/bpf/bpf_iter.c
@@ -328,7 +328,7 @@ static void cache_btf_id(struct bpf_iter_target_info *tinfo,
bool bpf_iter_prog_supported(struct bpf_prog *prog)
{
- const char *attach_fname = prog->aux->attach_func_name;
+ const char *attach_fname = prog->aux->attach_name;
u32 prog_btf_id = prog->aux->attach_btf_id;
const char *prefix = BPF_ITER_FUNC_PREFIX;
struct bpf_iter_target_info *tinfo;
diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c
index 06062370c3b8..a7316c1327fb 100644
--- a/kernel/bpf/bpf_lsm.c
+++ b/kernel/bpf/bpf_lsm.c
@@ -46,7 +46,7 @@ int bpf_lsm_verify_prog(struct bpf_verifier_log *vlog,
if (!btf_id_set_contains(&bpf_lsm_hooks, prog->aux->attach_btf_id)) {
bpf_log(vlog, "attach_btf_id %u points to wrong type name %s\n",
- prog->aux->attach_btf_id, prog->aux->attach_func_name);
+ prog->aux->attach_btf_id, prog->aux->attach_name);
return -EINVAL;
}
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index dbc3ad07e21b..9896cffe32cb 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -4834,7 +4834,7 @@ bool btf_ctx_access(int off, int size, enum bpf_access_type type,
const struct btf_type *t = prog->aux->attach_func_proto;
struct bpf_prog *tgt_prog = prog->aux->dst_prog;
struct btf *btf = bpf_prog_get_target_btf(prog);
- const char *tname = prog->aux->attach_func_name;
+ const char *tname = prog->aux->attach_name;
struct bpf_verifier_log *log = info->log;
const struct btf_param *args;
u32 nr_args, arg;
diff --git a/kernel/bpf/preload/iterators/iterators.bpf.c b/kernel/bpf/preload/iterators/iterators.bpf.c
index 03af863314ea..a5aa53e8c038 100644
--- a/kernel/bpf/preload/iterators/iterators.bpf.c
+++ b/kernel/bpf/preload/iterators/iterators.bpf.c
@@ -40,7 +40,7 @@ struct btf {
struct bpf_prog_aux {
__u32 id;
char name[16];
- const char *attach_func_name;
+ const char *attach_name;
struct bpf_prog *dst_prog;
struct bpf_func_info *func_info;
struct btf *btf;
@@ -107,7 +107,7 @@ int dump_bpf_prog(struct bpf_iter__bpf_prog *ctx)
BPF_SEQ_PRINTF(seq, "%4u %-16s %s %s\n", aux->id,
get_name(aux->btf, aux->func_info[0].type_id, aux->name),
- aux->attach_func_name, aux->dst_prog->aux->name);
+ aux->attach_name, aux->dst_prog->aux->name);
return 0;
}
char LICENSE[] SEC("license") = "GPL";
diff --git a/kernel/bpf/preload/iterators/iterators.skel.h b/kernel/bpf/preload/iterators/iterators.skel.h
index cf9a6a94b3a4..dfc825051161 100644
--- a/kernel/bpf/preload/iterators/iterators.skel.h
+++ b/kernel/bpf/preload/iterators/iterators.skel.h
@@ -4,6 +4,7 @@
#ifndef __ITERATORS_BPF_SKEL_H__
#define __ITERATORS_BPF_SKEL_H__
+#include <errno.h>
#include <stdlib.h>
#include <bpf/libbpf.h>
@@ -22,10 +23,6 @@ struct iterators_bpf {
struct bpf_link *dump_bpf_prog;
} links;
struct iterators_bpf__rodata {
- char dump_bpf_map____fmt[35];
- char dump_bpf_map____fmt_1[14];
- char dump_bpf_prog____fmt[32];
- char dump_bpf_prog____fmt_2[17];
} *rodata;
};
@@ -46,18 +43,26 @@ static inline struct iterators_bpf *
iterators_bpf__open_opts(const struct bpf_object_open_opts *opts)
{
struct iterators_bpf *obj;
+ int err;
obj = (struct iterators_bpf *)calloc(1, sizeof(*obj));
- if (!obj)
+ if (!obj) {
+ errno = ENOMEM;
return NULL;
- if (iterators_bpf__create_skeleton(obj))
- goto err;
- if (bpf_object__open_skeleton(obj->skeleton, opts))
- goto err;
+ }
+
+ err = iterators_bpf__create_skeleton(obj);
+ if (err)
+ goto err_out;
+
+ err = bpf_object__open_skeleton(obj->skeleton, opts);
+ if (err)
+ goto err_out;
return obj;
-err:
+err_out:
iterators_bpf__destroy(obj);
+ errno = -err;
return NULL;
}
@@ -77,12 +82,15 @@ static inline struct iterators_bpf *
iterators_bpf__open_and_load(void)
{
struct iterators_bpf *obj;
+ int err;
obj = iterators_bpf__open();
if (!obj)
return NULL;
- if (iterators_bpf__load(obj)) {
+ err = iterators_bpf__load(obj);
+ if (err) {
iterators_bpf__destroy(obj);
+ errno = -err;
return NULL;
}
return obj;
@@ -100,6 +108,8 @@ iterators_bpf__detach(struct iterators_bpf *obj)
return bpf_object__detach_skeleton(obj->skeleton);
}
+static inline const void *iterators_bpf__elf_bytes(size_t *sz);
+
static inline int
iterators_bpf__create_skeleton(struct iterators_bpf *obj)
{
@@ -107,7 +117,7 @@ iterators_bpf__create_skeleton(struct iterators_bpf *obj)
s = (struct bpf_object_skeleton *)calloc(1, sizeof(*s));
if (!s)
- return -1;
+ goto err;
obj->skeleton = s;
s->sz = sizeof(*s);
@@ -140,10 +150,20 @@ iterators_bpf__create_skeleton(struct iterators_bpf *obj)
s->progs[1].prog = &obj->progs.dump_bpf_prog;
s->progs[1].link = &obj->links.dump_bpf_prog;
- s->data_sz = 7176;
- s->data = (void *)"\
+ s->data = (void *)iterators_bpf__elf_bytes(&s->data_sz);
+
+ return 0;
+err:
+ bpf_object__destroy_skeleton(s);
+ return -ENOMEM;
+}
+
+static inline const void *iterators_bpf__elf_bytes(size_t *sz)
+{
+ *sz = 7184;
+ return (const void *)"\
\x7f\x45\x4c\x46\x02\x01\x01\0\0\0\0\0\0\0\0\0\x01\0\xf7\0\x01\0\0\0\0\0\0\0\0\
-\0\0\0\0\0\0\0\0\0\0\0\x48\x18\0\0\0\0\0\0\0\0\0\0\x40\0\0\0\0\0\x40\0\x0f\0\
+\0\0\0\0\0\0\0\0\0\0\0\x50\x18\0\0\0\0\0\0\0\0\0\0\x40\0\0\0\0\0\x40\0\x0f\0\
\x0e\0\x79\x12\0\0\0\0\0\0\x79\x26\0\0\0\0\0\0\x79\x17\x08\0\0\0\0\0\x15\x07\
\x1a\0\0\0\0\0\x79\x21\x10\0\0\0\0\0\x55\x01\x08\0\0\0\0\0\xbf\xa4\0\0\0\0\0\0\
\x07\x04\0\0\xe8\xff\xff\xff\xbf\x61\0\0\0\0\0\0\x18\x02\0\0\0\0\0\0\0\0\0\0\0\
@@ -176,237 +196,233 @@ iterators_bpf__create_skeleton(struct iterators_bpf *obj)
\x73\x25\x36\x64\x0a\0\x20\x20\x69\x64\x20\x6e\x61\x6d\x65\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x61\x74\x74\x61\x63\x68\x65\x64\x0a\0\x25\x34\
\x75\x20\x25\x2d\x31\x36\x73\x20\x25\x73\x20\x25\x73\x0a\0\x47\x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x2f\x62\x70\x66\x2f\
-\x70\x72\x65\x6c\x6f\x61\x64\x2f\x69\x74\x65\x72\x61\x74\x6f\x72\x73\x2f\x69\
-\x74\x65\x72\x61\x74\x6f\x72\x73\x2e\x62\x70\x66\x2e\x63\0\x09\x73\x74\x72\x75\
-\x63\x74\x20\x73\x65\x71\x5f\x66\x69\x6c\x65\x20\x2a\x73\x65\x71\x20\x3d\x20\
-\x63\x74\x78\x2d\x3e\x6d\x65\x74\x61\x2d\x3e\x73\x65\x71\x3b\0\x62\x70\x66\x5f\
-\x69\x74\x65\x72\x5f\x6d\x65\x74\x61\0\x73\x65\x71\0\x73\x65\x73\x73\x69\x6f\
-\x6e\x5f\x69\x64\0\x73\x65\x71\x5f\x6e\x75\x6d\0\x73\x65\x71\x5f\x66\x69\x6c\
-\x65\0\x5f\x5f\x75\x36\x34\0\x6c\x6f\x6e\x67\x20\x6c\x6f\x6e\x67\x20\x75\x6e\
-\x73\x69\x67\x6e\x65\x64\x20\x69\x6e\x74\0\x30\x3a\x31\0\x09\x73\x74\x72\x75\
-\x63\x74\x20\x62\x70\x66\x5f\x6d\x61\x70\x20\x2a\x6d\x61\x70\x20\x3d\x20\x63\
-\x74\x78\x2d\x3e\x6d\x61\x70\x3b\0\x09\x69\x66\x20\x28\x21\x6d\x61\x70\x29\0\
-\x30\x3a\x32\0\x09\x5f\x5f\x75\x36\x34\x20\x73\x65\x71\x5f\x6e\x75\x6d\x20\x3d\
-\x20\x63\x74\x78\x2d\x3e\x6d\x65\x74\x61\x2d\x3e\x73\x65\x71\x5f\x6e\x75\x6d\
-\x3b\0\x09\x69\x66\x20\x28\x73\x65\x71\x5f\x6e\x75\x6d\x20\x3d\x3d\x20\x30\x29\
-\0\x09\x09\x42\x50\x46\x5f\x53\x45\x51\x5f\x50\x52\x49\x4e\x54\x46\x28\x73\x65\
-\x71\x2c\x20\x22\x20\x20\x69\x64\x20\x6e\x61\x6d\x65\x20\x20\x20\x20\x20\x20\
-\x20\x20\x20\x20\x20\x20\x20\x6d\x61\x78\x5f\x65\x6e\x74\x72\x69\x65\x73\x5c\
-\x6e\x22\x29\x3b\0\x62\x70\x66\x5f\x6d\x61\x70\0\x69\x64\0\x6e\x61\x6d\x65\0\
-\x6d\x61\x78\x5f\x65\x6e\x74\x72\x69\x65\x73\0\x5f\x5f\x75\x33\x32\0\x75\x6e\
-\x73\x69\x67\x6e\x65\x64\x20\x69\x6e\x74\0\x63\x68\x61\x72\0\x5f\x5f\x41\x52\
-\x52\x41\x59\x5f\x53\x49\x5a\x45\x5f\x54\x59\x50\x45\x5f\x5f\0\x09\x42\x50\x46\
-\x5f\x53\x45\x51\x5f\x50\x52\x49\x4e\x54\x46\x28\x73\x65\x71\x2c\x20\x22\x25\
-\x34\x75\x20\x25\x2d\x31\x36\x73\x25\x36\x64\x5c\x6e\x22\x2c\x20\x6d\x61\x70\
-\x2d\x3e\x69\x64\x2c\x20\x6d\x61\x70\x2d\x3e\x6e\x61\x6d\x65\x2c\x20\x6d\x61\
-\x70\x2d\x3e\x6d\x61\x78\x5f\x65\x6e\x74\x72\x69\x65\x73\x29\x3b\0\x7d\0\x62\
-\x70\x66\x5f\x69\x74\x65\x72\x5f\x5f\x62\x70\x66\x5f\x70\x72\x6f\x67\0\x70\x72\
-\x6f\x67\0\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x70\x72\x6f\x67\0\x69\x74\x65\
-\x72\x2f\x62\x70\x66\x5f\x70\x72\x6f\x67\0\x09\x73\x74\x72\x75\x63\x74\x20\x62\
-\x70\x66\x5f\x70\x72\x6f\x67\x20\x2a\x70\x72\x6f\x67\x20\x3d\x20\x63\x74\x78\
-\x2d\x3e\x70\x72\x6f\x67\x3b\0\x09\x69\x66\x20\x28\x21\x70\x72\x6f\x67\x29\0\
-\x62\x70\x66\x5f\x70\x72\x6f\x67\0\x61\x75\x78\0\x09\x61\x75\x78\x20\x3d\x20\
-\x70\x72\x6f\x67\x2d\x3e\x61\x75\x78\x3b\0\x09\x09\x42\x50\x46\x5f\x53\x45\x51\
-\x5f\x50\x52\x49\x4e\x54\x46\x28\x73\x65\x71\x2c\x20\x22\x20\x20\x69\x64\x20\
-\x6e\x61\x6d\x65\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x74\
-\x74\x61\x63\x68\x65\x64\x5c\x6e\x22\x29\x3b\0\x62\x70\x66\x5f\x70\x72\x6f\x67\
-\x5f\x61\x75\x78\0\x61\x74\x74\x61\x63\x68\x5f\x66\x75\x6e\x63\x5f\x6e\x61\x6d\
-\x65\0\x64\x73\x74\x5f\x70\x72\x6f\x67\0\x66\x75\x6e\x63\x5f\x69\x6e\x66\x6f\0\
-\x62\x74\x66\0\x09\x42\x50\x46\x5f\x53\x45\x51\x5f\x50\x52\x49\x4e\x54\x46\x28\
-\x73\x65\x71\x2c\x20\x22\x25\x34\x75\x20\x25\x2d\x31\x36\x73\x20\x25\x73\x20\
-\x25\x73\x5c\x6e\x22\x2c\x20\x61\x75\x78\x2d\x3e\x69\x64\x2c\0\x30\x3a\x34\0\
-\x30\x3a\x35\0\x09\x69\x66\x20\x28\x21\x62\x74\x66\x29\0\x62\x70\x66\x5f\x66\
-\x75\x6e\x63\x5f\x69\x6e\x66\x6f\0\x69\x6e\x73\x6e\x5f\x6f\x66\x66\0\x74\x79\
-\x70\x65\x5f\x69\x64\0\x30\0\x73\x74\x72\x69\x6e\x67\x73\0\x74\x79\x70\x65\x73\
-\0\x68\x64\x72\0\x62\x74\x66\x5f\x68\x65\x61\x64\x65\x72\0\x73\x74\x72\x5f\x6c\
-\x65\x6e\0\x09\x74\x79\x70\x65\x73\x20\x3d\x20\x62\x74\x66\x2d\x3e\x74\x79\x70\
-\x65\x73\x3b\0\x09\x62\x70\x66\x5f\x70\x72\x6f\x62\x65\x5f\x72\x65\x61\x64\x5f\
-\x6b\x65\x72\x6e\x65\x6c\x28\x26\x74\x2c\x20\x73\x69\x7a\x65\x6f\x66\x28\x74\
-\x29\x2c\x20\x74\x79\x70\x65\x73\x20\x2b\x20\x62\x74\x66\x5f\x69\x64\x29\x3b\0\
-\x09\x73\x74\x72\x20\x3d\x20\x62\x74\x66\x2d\x3e\x73\x74\x72\x69\x6e\x67\x73\
-\x3b\0\x62\x74\x66\x5f\x74\x79\x70\x65\0\x6e\x61\x6d\x65\x5f\x6f\x66\x66\0\x09\
-\x6e\x61\x6d\x65\x5f\x6f\x66\x66\x20\x3d\x20\x42\x50\x46\x5f\x43\x4f\x52\x45\
-\x5f\x52\x45\x41\x44\x28\x74\x2c\x20\x6e\x61\x6d\x65\x5f\x6f\x66\x66\x29\x3b\0\
-\x30\x3a\x32\x3a\x30\0\x09\x69\x66\x20\x28\x6e\x61\x6d\x65\x5f\x6f\x66\x66\x20\
-\x3e\x3d\x20\x62\x74\x66\x2d\x3e\x68\x64\x72\x2e\x73\x74\x72\x5f\x6c\x65\x6e\
-\x29\0\x09\x72\x65\x74\x75\x72\x6e\x20\x73\x74\x72\x20\x2b\x20\x6e\x61\x6d\x65\
-\x5f\x6f\x66\x66\x3b\0\x30\x3a\x33\0\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x6d\
-\x61\x70\x2e\x5f\x5f\x5f\x66\x6d\x74\0\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x6d\
-\x61\x70\x2e\x5f\x5f\x5f\x66\x6d\x74\x2e\x31\0\x64\x75\x6d\x70\x5f\x62\x70\x66\
-\x5f\x70\x72\x6f\x67\x2e\x5f\x5f\x5f\x66\x6d\x74\0\x64\x75\x6d\x70\x5f\x62\x70\
-\x66\x5f\x70\x72\x6f\x67\x2e\x5f\x5f\x5f\x66\x6d\x74\x2e\x32\0\x4c\x49\x43\x45\
-\x4e\x53\x45\0\x2e\x72\x6f\x64\x61\x74\x61\0\x6c\x69\x63\x65\x6e\x73\x65\0\x9f\
-\xeb\x01\0\x20\0\0\0\0\0\0\0\x24\0\0\0\x24\0\0\0\x44\x02\0\0\x68\x02\0\0\xa4\
-\x01\0\0\x08\0\0\0\x31\0\0\0\x01\0\0\0\0\0\0\0\x07\0\0\0\x62\x02\0\0\x01\0\0\0\
-\0\0\0\0\x17\0\0\0\x10\0\0\0\x31\0\0\0\x09\0\0\0\0\0\0\0\x42\0\0\0\x87\0\0\0\
-\x1e\x40\x01\0\x08\0\0\0\x42\0\0\0\x87\0\0\0\x24\x40\x01\0\x10\0\0\0\x42\0\0\0\
-\xfe\0\0\0\x1d\x48\x01\0\x18\0\0\0\x42\0\0\0\x1f\x01\0\0\x06\x50\x01\0\x20\0\0\
-\0\x42\0\0\0\x2e\x01\0\0\x1d\x44\x01\0\x28\0\0\0\x42\0\0\0\x53\x01\0\0\x06\x5c\
-\x01\0\x38\0\0\0\x42\0\0\0\x66\x01\0\0\x03\x60\x01\0\x70\0\0\0\x42\0\0\0\xec\
-\x01\0\0\x02\x68\x01\0\xf0\0\0\0\x42\0\0\0\x3a\x02\0\0\x01\x70\x01\0\x62\x02\0\
-\0\x1a\0\0\0\0\0\0\0\x42\0\0\0\x87\0\0\0\x1e\x84\x01\0\x08\0\0\0\x42\0\0\0\x87\
-\0\0\0\x24\x84\x01\0\x10\0\0\0\x42\0\0\0\x70\x02\0\0\x1f\x8c\x01\0\x18\0\0\0\
-\x42\0\0\0\x94\x02\0\0\x06\x98\x01\0\x20\0\0\0\x42\0\0\0\xad\x02\0\0\x0e\xa4\
-\x01\0\x28\0\0\0\x42\0\0\0\x2e\x01\0\0\x1d\x88\x01\0\x30\0\0\0\x42\0\0\0\x53\
-\x01\0\0\x06\xa8\x01\0\x40\0\0\0\x42\0\0\0\xbf\x02\0\0\x03\xac\x01\0\x80\0\0\0\
-\x42\0\0\0\x2f\x03\0\0\x02\xb4\x01\0\xb8\0\0\0\x42\0\0\0\x6a\x03\0\0\x06\x08\
-\x01\0\xd0\0\0\0\x42\0\0\0\0\0\0\0\0\0\0\0\xd8\0\0\0\x42\0\0\0\xbb\x03\0\0\x0f\
-\x14\x01\0\xe0\0\0\0\x42\0\0\0\xd0\x03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\0\x0c\x04\0\0\0\0\0\0\0\0\0\0\
-\x0c\0\0\0\x1c\x04\0\0\0\0\0\0\0\0\0\0\x0c\0\0\0\x4d\x4e\x40\x41\x42\x43\x4c\0\
-\x2e\x74\x65\x78\x74\0\x2e\x72\x65\x6c\x2e\x42\x54\x46\x2e\x65\x78\x74\0\x64\
-\x75\x6d\x70\x5f\x62\x70\x66\x5f\x6d\x61\x70\x2e\x5f\x5f\x5f\x66\x6d\x74\0\x64\
-\x75\x6d\x70\x5f\x62\x70\x66\x5f\x70\x72\x6f\x67\x2e\x5f\x5f\x5f\x66\x6d\x74\0\
-\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x6d\x61\x70\0\x2e\x72\x65\x6c\x69\x74\x65\
-\x72\x2f\x62\x70\x66\x5f\x6d\x61\x70\0\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x70\
-\x72\x6f\x67\0\x2e\x72\x65\x6c\x69\x74\x65\x72\x2f\x62\x70\x66\x5f\x70\x72\x6f\
-\x67\0\x2e\x6c\x6c\x76\x6d\x5f\x61\x64\x64\x72\x73\x69\x67\0\x6c\x69\x63\x65\
-\x6e\x73\x65\0\x69\x74\x65\x72\x61\x74\x6f\x72\x73\x2e\x62\x70\x66\x2e\x63\0\
-\x2e\x73\x74\x72\x74\x61\x62\0\x2e\x73\x79\x6d\x74\x61\x62\0\x2e\x72\x6f\x64\
-\x61\x74\x61\0\x2e\x72\x65\x6c\x2e\x42\x54\x46\0\x4c\x49\x43\x45\x4e\x53\x45\0\
-\x4c\x42\x42\x31\x5f\x37\0\x4c\x42\x42\x31\x5f\x36\0\x4c\x42\x42\x30\x5f\x34\0\
-\x4c\x42\x42\x31\x5f\x33\0\x4c\x42\x42\x30\x5f\x33\0\x64\x75\x6d\x70\x5f\x62\
-\x70\x66\x5f\x70\x72\x6f\x67\x2e\x5f\x5f\x5f\x66\x6d\x74\x2e\x32\0\x64\x75\x6d\
-\x70\x5f\x62\x70\x66\x5f\x6d\x61\x70\x2e\x5f\x5f\x5f\x66\x6d\x74\x2e\x31\0\0\0\
+\x30\x3a\x30\0\x2f\x64\x61\x74\x61\x30\x2f\x77\x61\x6b\x65\x6e\x2f\x76\x65\x72\
+\x69\x66\x79\x2f\x6c\x69\x6e\x75\x78\x2d\x35\x2e\x39\x2e\x79\x2f\x6b\x65\x72\
+\x6e\x65\x6c\x2f\x62\x70\x66\x2f\x70\x72\x65\x6c\x6f\x61\x64\x2f\x69\x74\x65\
+\x72\x61\x74\x6f\x72\x73\x2f\x69\x74\x65\x72\x61\x74\x6f\x72\x73\x2e\x62\x70\
+\x66\x2e\x63\0\x09\x73\x74\x72\x75\x63\x74\x20\x73\x65\x71\x5f\x66\x69\x6c\x65\
+\x20\x2a\x73\x65\x71\x20\x3d\x20\x63\x74\x78\x2d\x3e\x6d\x65\x74\x61\x2d\x3e\
+\x73\x65\x71\x3b\0\x62\x70\x66\x5f\x69\x74\x65\x72\x5f\x6d\x65\x74\x61\0\x73\
+\x65\x71\0\x73\x65\x73\x73\x69\x6f\x6e\x5f\x69\x64\0\x73\x65\x71\x5f\x6e\x75\
+\x6d\0\x73\x65\x71\x5f\x66\x69\x6c\x65\0\x5f\x5f\x75\x36\x34\0\x6c\x6f\x6e\x67\
+\x20\x6c\x6f\x6e\x67\x20\x75\x6e\x73\x69\x67\x6e\x65\x64\x20\x69\x6e\x74\0\x30\
+\x3a\x31\0\x09\x73\x74\x72\x75\x63\x74\x20\x62\x70\x66\x5f\x6d\x61\x70\x20\x2a\
+\x6d\x61\x70\x20\x3d\x20\x63\x74\x78\x2d\x3e\x6d\x61\x70\x3b\0\x09\x69\x66\x20\
+\x28\x21\x6d\x61\x70\x29\0\x30\x3a\x32\0\x09\x5f\x5f\x75\x36\x34\x20\x73\x65\
+\x71\x5f\x6e\x75\x6d\x20\x3d\x20\x63\x74\x78\x2d\x3e\x6d\x65\x74\x61\x2d\x3e\
+\x73\x65\x71\x5f\x6e\x75\x6d\x3b\0\x09\x69\x66\x20\x28\x73\x65\x71\x5f\x6e\x75\
+\x6d\x20\x3d\x3d\x20\x30\x29\0\x09\x09\x42\x50\x46\x5f\x53\x45\x51\x5f\x50\x52\
+\x49\x4e\x54\x46\x28\x73\x65\x71\x2c\x20\x22\x20\x20\x69\x64\x20\x6e\x61\x6d\
+\x65\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x61\x78\x5f\x65\
+\x6e\x74\x72\x69\x65\x73\x5c\x6e\x22\x29\x3b\0\x62\x70\x66\x5f\x6d\x61\x70\0\
+\x69\x64\0\x6e\x61\x6d\x65\0\x6d\x61\x78\x5f\x65\x6e\x74\x72\x69\x65\x73\0\x5f\
+\x5f\x75\x33\x32\0\x75\x6e\x73\x69\x67\x6e\x65\x64\x20\x69\x6e\x74\0\x63\x68\
+\x61\x72\0\x5f\x5f\x41\x52\x52\x41\x59\x5f\x53\x49\x5a\x45\x5f\x54\x59\x50\x45\
+\x5f\x5f\0\x09\x42\x50\x46\x5f\x53\x45\x51\x5f\x50\x52\x49\x4e\x54\x46\x28\x73\
+\x65\x71\x2c\x20\x22\x25\x34\x75\x20\x25\x2d\x31\x36\x73\x25\x36\x64\x5c\x6e\
+\x22\x2c\x20\x6d\x61\x70\x2d\x3e\x69\x64\x2c\x20\x6d\x61\x70\x2d\x3e\x6e\x61\
+\x6d\x65\x2c\x20\x6d\x61\x70\x2d\x3e\x6d\x61\x78\x5f\x65\x6e\x74\x72\x69\x65\
+\x73\x29\x3b\0\x7d\0\x62\x70\x66\x5f\x69\x74\x65\x72\x5f\x5f\x62\x70\x66\x5f\
+\x70\x72\x6f\x67\0\x70\x72\x6f\x67\0\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x70\
+\x72\x6f\x67\0\x69\x74\x65\x72\x2f\x62\x70\x66\x5f\x70\x72\x6f\x67\0\x09\x73\
+\x74\x72\x75\x63\x74\x20\x62\x70\x66\x5f\x70\x72\x6f\x67\x20\x2a\x70\x72\x6f\
+\x67\x20\x3d\x20\x63\x74\x78\x2d\x3e\x70\x72\x6f\x67\x3b\0\x09\x69\x66\x20\x28\
+\x21\x70\x72\x6f\x67\x29\0\x62\x70\x66\x5f\x70\x72\x6f\x67\0\x61\x75\x78\0\x09\
+\x61\x75\x78\x20\x3d\x20\x70\x72\x6f\x67\x2d\x3e\x61\x75\x78\x3b\0\x09\x09\x42\
+\x50\x46\x5f\x53\x45\x51\x5f\x50\x52\x49\x4e\x54\x46\x28\x73\x65\x71\x2c\x20\
+\x22\x20\x20\x69\x64\x20\x6e\x61\x6d\x65\x20\x20\x20\x20\x20\x20\x20\x20\x20\
+\x20\x20\x20\x20\x61\x74\x74\x61\x63\x68\x65\x64\x5c\x6e\x22\x29\x3b\0\x62\x70\
+\x66\x5f\x70\x72\x6f\x67\x5f\x61\x75\x78\0\x61\x74\x74\x61\x63\x68\x5f\x6e\x61\
+\x6d\x65\0\x64\x73\x74\x5f\x70\x72\x6f\x67\0\x66\x75\x6e\x63\x5f\x69\x6e\x66\
+\x6f\0\x62\x74\x66\0\x09\x42\x50\x46\x5f\x53\x45\x51\x5f\x50\x52\x49\x4e\x54\
+\x46\x28\x73\x65\x71\x2c\x20\x22\x25\x34\x75\x20\x25\x2d\x31\x36\x73\x20\x25\
+\x73\x20\x25\x73\x5c\x6e\x22\x2c\x20\x61\x75\x78\x2d\x3e\x69\x64\x2c\0\x30\x3a\
+\x34\0\x30\x3a\x35\0\x09\x69\x66\x20\x28\x21\x62\x74\x66\x29\0\x62\x70\x66\x5f\
+\x66\x75\x6e\x63\x5f\x69\x6e\x66\x6f\0\x69\x6e\x73\x6e\x5f\x6f\x66\x66\0\x74\
+\x79\x70\x65\x5f\x69\x64\0\x30\0\x73\x74\x72\x69\x6e\x67\x73\0\x74\x79\x70\x65\
+\x73\0\x68\x64\x72\0\x62\x74\x66\x5f\x68\x65\x61\x64\x65\x72\0\x73\x74\x72\x5f\
+\x6c\x65\x6e\0\x09\x74\x79\x70\x65\x73\x20\x3d\x20\x62\x74\x66\x2d\x3e\x74\x79\
+\x70\x65\x73\x3b\0\x09\x62\x70\x66\x5f\x70\x72\x6f\x62\x65\x5f\x72\x65\x61\x64\
+\x5f\x6b\x65\x72\x6e\x65\x6c\x28\x26\x74\x2c\x20\x73\x69\x7a\x65\x6f\x66\x28\
+\x74\x29\x2c\x20\x74\x79\x70\x65\x73\x20\x2b\x20\x62\x74\x66\x5f\x69\x64\x29\
+\x3b\0\x09\x73\x74\x72\x20\x3d\x20\x62\x74\x66\x2d\x3e\x73\x74\x72\x69\x6e\x67\
+\x73\x3b\0\x62\x74\x66\x5f\x74\x79\x70\x65\0\x6e\x61\x6d\x65\x5f\x6f\x66\x66\0\
+\x09\x6e\x61\x6d\x65\x5f\x6f\x66\x66\x20\x3d\x20\x42\x50\x46\x5f\x43\x4f\x52\
+\x45\x5f\x52\x45\x41\x44\x28\x74\x2c\x20\x6e\x61\x6d\x65\x5f\x6f\x66\x66\x29\
+\x3b\0\x30\x3a\x32\x3a\x30\0\x09\x69\x66\x20\x28\x6e\x61\x6d\x65\x5f\x6f\x66\
+\x66\x20\x3e\x3d\x20\x62\x74\x66\x2d\x3e\x68\x64\x72\x2e\x73\x74\x72\x5f\x6c\
+\x65\x6e\x29\0\x09\x72\x65\x74\x75\x72\x6e\x20\x73\x74\x72\x20\x2b\x20\x6e\x61\
+\x6d\x65\x5f\x6f\x66\x66\x3b\0\x30\x3a\x33\0\x64\x75\x6d\x70\x5f\x62\x70\x66\
+\x5f\x6d\x61\x70\x2e\x5f\x5f\x5f\x66\x6d\x74\0\x64\x75\x6d\x70\x5f\x62\x70\x66\
+\x5f\x6d\x61\x70\x2e\x5f\x5f\x5f\x66\x6d\x74\x2e\x31\0\x64\x75\x6d\x70\x5f\x62\
+\x70\x66\x5f\x70\x72\x6f\x67\x2e\x5f\x5f\x5f\x66\x6d\x74\0\x64\x75\x6d\x70\x5f\
+\x62\x70\x66\x5f\x70\x72\x6f\x67\x2e\x5f\x5f\x5f\x66\x6d\x74\x2e\x32\0\x4c\x49\
+\x43\x45\x4e\x53\x45\0\x2e\x72\x6f\x64\x61\x74\x61\0\x6c\x69\x63\x65\x6e\x73\
+\x65\0\x9f\xeb\x01\0\x20\0\0\0\0\0\0\0\x24\0\0\0\x24\0\0\0\x44\x02\0\0\x68\x02\
+\0\0\xa4\x01\0\0\x08\0\0\0\x31\0\0\0\x01\0\0\0\0\0\0\0\x07\0\0\0\x6a\x02\0\0\
+\x01\0\0\0\0\0\0\0\x17\0\0\0\x10\0\0\0\x31\0\0\0\x09\0\0\0\0\0\0\0\x42\0\0\0\
+\x8f\0\0\0\x1e\x3c\x01\0\x08\0\0\0\x42\0\0\0\x8f\0\0\0\x24\x3c\x01\0\x10\0\0\0\
+\x42\0\0\0\x06\x01\0\0\x1d\x44\x01\0\x18\0\0\0\x42\0\0\0\x27\x01\0\0\x06\x4c\
+\x01\0\x20\0\0\0\x42\0\0\0\x36\x01\0\0\x1d\x40\x01\0\x28\0\0\0\x42\0\0\0\x5b\
+\x01\0\0\x06\x58\x01\0\x38\0\0\0\x42\0\0\0\x6e\x01\0\0\x03\x5c\x01\0\x70\0\0\0\
+\x42\0\0\0\xf4\x01\0\0\x02\x64\x01\0\xf0\0\0\0\x42\0\0\0\x42\x02\0\0\x01\x6c\
+\x01\0\x6a\x02\0\0\x1a\0\0\0\0\0\0\0\x42\0\0\0\x8f\0\0\0\x1e\x80\x01\0\x08\0\0\
+\0\x42\0\0\0\x8f\0\0\0\x24\x80\x01\0\x10\0\0\0\x42\0\0\0\x78\x02\0\0\x1f\x88\
+\x01\0\x18\0\0\0\x42\0\0\0\x9c\x02\0\0\x06\x94\x01\0\x20\0\0\0\x42\0\0\0\xb5\
+\x02\0\0\x0e\xa0\x01\0\x28\0\0\0\x42\0\0\0\x36\x01\0\0\x1d\x84\x01\0\x30\0\0\0\
+\x42\0\0\0\x5b\x01\0\0\x06\xa4\x01\0\x40\0\0\0\x42\0\0\0\xc7\x02\0\0\x03\xa8\
+\x01\0\x80\0\0\0\x42\0\0\0\x32\x03\0\0\x02\xb0\x01\0\xb8\0\0\0\x42\0\0\0\x6d\
+\x03\0\0\x06\x04\x01\0\xd0\0\0\0\x42\0\0\0\0\0\0\0\0\0\0\0\xd8\0\0\0\x42\0\0\0\
+\xbe\x03\0\0\x0f\x10\x01\0\xe0\0\0\0\x42\0\0\0\xd3\x03\0\0\x2d\x14\x01\0\xf0\0\
+\0\0\x42\0\0\0\x0a\x04\0\0\x0d\x0c\x01\0\0\x01\0\0\x42\0\0\0\0\0\0\0\0\0\0\0\
+\x08\x01\0\0\x42\0\0\0\xd3\x03\0\0\x02\x14\x01\0\x20\x01\0\0\x42\0\0\0\x31\x04\
+\0\0\x0d\x18\x01\0\x38\x01\0\0\x42\0\0\0\0\0\0\0\0\0\0\0\x40\x01\0\0\x42\0\0\0\
+\x31\x04\0\0\x0d\x18\x01\0\x58\x01\0\0\x42\0\0\0\x31\x04\0\0\x0d\x18\x01\0\x60\
+\x01\0\0\x42\0\0\0\x5f\x04\0\0\x1b\x1c\x01\0\x68\x01\0\0\x42\0\0\0\x5f\x04\0\0\
+\x06\x1c\x01\0\x70\x01\0\0\x42\0\0\0\x82\x04\0\0\x0d\x24\x01\0\x78\x01\0\0\x42\
+\0\0\0\0\0\0\0\0\0\0\0\x80\x01\0\0\x42\0\0\0\x32\x03\0\0\x02\xb0\x01\0\xf8\x01\
+\0\0\x42\0\0\0\x42\x02\0\0\x01\xc0\x01\0\x10\0\0\0\x31\0\0\0\x07\0\0\0\0\0\0\0\
+\x02\0\0\0\x3e\0\0\0\0\0\0\0\x08\0\0\0\x08\0\0\0\x3e\0\0\0\0\0\0\0\x10\0\0\0\
+\x02\0\0\0\x02\x01\0\0\0\0\0\0\x20\0\0\0\x08\0\0\0\x32\x01\0\0\0\0\0\0\x70\0\0\
+\0\x0d\0\0\0\x3e\0\0\0\0\0\0\0\x80\0\0\0\x0d\0\0\0\x02\x01\0\0\0\0\0\0\xa0\0\0\
+\0\x0d\0\0\0\x32\x01\0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x03\0\0\0\0\0\0\0\0\0\0\
+\x0c\0\0\0\xcc\x03\0\0\0\0\0\0\0\0\0\0\x0c\0\0\0\xdc\x03\0\0\0\0\0\0\0\0\0\0\
+\x0c\0\0\0\xec\x03\0\0\0\0\0\0\0\0\0\0\x0c\0\0\0\xfc\x03\0\0\0\0\0\0\0\0\0\0\
+\x0c\0\0\0\x0c\x04\0\0\0\0\0\0\0\0\0\0\x0c\0\0\0\x1c\x04\0\0\0\0\0\0\0\0\0\0\
+\x0c\0\0\0\x4c\x4d\x3f\x40\x41\x42\x4b\0\x2e\x74\x65\x78\x74\0\x2e\x72\x65\x6c\
+\x2e\x42\x54\x46\x2e\x65\x78\x74\0\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x6d\x61\
+\x70\x2e\x5f\x5f\x5f\x66\x6d\x74\0\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x70\x72\
+\x6f\x67\x2e\x5f\x5f\x5f\x66\x6d\x74\0\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x6d\
+\x61\x70\0\x2e\x72\x65\x6c\x69\x74\x65\x72\x2f\x62\x70\x66\x5f\x6d\x61\x70\0\
+\x64\x75\x6d\x70\x5f\x62\x70\x66\x5f\x70\x72\x6f\x67\0\x2e\x72\x65\x6c\x69\x74\
+\x65\x72\x2f\x62\x70\x66\x5f\x70\x72\x6f\x67\0\x2e\x6c\x6c\x76\x6d\x5f\x61\x64\
+\x64\x72\x73\x69\x67\0\x6c\x69\x63\x65\x6e\x73\x65\0\x69\x74\x65\x72\x61\x74\
+\x6f\x72\x73\x2e\x62\x70\x66\x2e\x63\0\x2e\x73\x74\x72\x74\x61\x62\0\x2e\x73\
+\x79\x6d\x74\x61\x62\0\x2e\x72\x6f\x64\x61\x74\x61\0\x2e\x72\x65\x6c\x2e\x42\
+\x54\x46\0\x4c\x49\x43\x45\x4e\x53\x45\0\x4c\x42\x42\x31\x5f\x37\0\x4c\x42\x42\
+\x31\x5f\x36\0\x4c\x42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48\x13\0\0\0\0\0\0\xe0\x03\0\0\0\0\0\0\x08\0\0\0\x07\0\0\0\
+\x08\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x7b\0\0\0\x03\x4c\xff\x6f\0\0\0\x80\0\0\0\
+\0\0\0\0\0\0\0\0\0\x28\x17\0\0\0\0\0\0\x07\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\
+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xa1\0\0\0\x03\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
+\0\x2f\x17\0\0\0\0\0\0\x1a\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\
+\0\0\0\0\0\0\0";
}
#endif /* __ITERATORS_BPF_SKEL_H__ */
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 1033ee8c0caf..24d863d9d9b5 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -3047,7 +3047,7 @@ static int bpf_raw_tracepoint_open(const union bpf_attr *attr)
}
if (prog->type == BPF_PROG_TYPE_TRACING &&
prog->expected_attach_type == BPF_TRACE_RAW_TP) {
- tp_name = prog->aux->attach_func_name;
+ tp_name = prog->aux->attach_name;
break;
}
err = bpf_tracing_prog_attach(prog, 0, 0);
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 50efda51515b..129e9f8e28f8 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -13524,7 +13524,7 @@ static int check_struct_ops_btf_id(struct bpf_verifier_env *env)
}
prog->aux->attach_func_proto = func_proto;
- prog->aux->attach_func_name = mname;
+ prog->aux->attach_name = mname;
env->ops = st_ops->verifier_ops;
return 0;
@@ -13849,7 +13849,7 @@ static int check_attach_btf_id(struct bpf_verifier_env *env)
/* store info about the attachment target that will be used later */
prog->aux->attach_func_proto = tgt_info.tgt_type;
- prog->aux->attach_func_name = tgt_info.tgt_name;
+ prog->aux->attach_name = tgt_info.tgt_name;
if (tgt_prog) {
prog->aux->saved_dst_prog_type = tgt_prog->type;
--
2.17.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name
2022-02-18 9:56 [PATCH RFC 0/3] bpf: show attached name for progs without btf name Yafang Shao
2022-02-18 9:56 ` [PATCH RFC 1/3] bpf: rename attach_func_name to attach_name Yafang Shao
@ 2022-02-18 9:56 ` Yafang Shao
2022-02-19 18:27 ` Alexei Starovoitov
2022-02-18 9:56 ` [PATCH RFC 3/3] bpf: set attached sockmap id " Yafang Shao
2 siblings, 1 reply; 11+ messages in thread
From: Yafang Shao @ 2022-02-18 9:56 UTC (permalink / raw)
To: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
kpsingh
Cc: netdev, bpf, Yafang Shao
Set the cgroup path when a bpf prog is attached to a cgroup, and unset
it when the bpf prog is detached.
Below is the result after this change,
$ cat progs.debug
id name attached
5 dump_bpf_map bpf_iter_bpf_map
7 dump_bpf_prog bpf_iter_bpf_prog
17 bpf_sockmap cgroup:/
19 bpf_redir_proxy
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
kernel/bpf/cgroup.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
index 43eb3501721b..ebd87e54f2d0 100644
--- a/kernel/bpf/cgroup.c
+++ b/kernel/bpf/cgroup.c
@@ -440,6 +440,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
struct bpf_cgroup_storage *new_storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
enum cgroup_bpf_attach_type atype;
+ char cgrp_path[64] = "cgroup:";
struct bpf_prog_list *pl;
struct list_head *progs;
int err;
@@ -508,6 +509,11 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
else
static_branch_inc(&cgroup_bpf_enabled_key[atype]);
bpf_cgroup_storages_link(new_storage, cgrp, type);
+
+ cgroup_name(cgrp, cgrp_path + strlen("cgroup:"), 64);
+ cgrp_path[63] = '\0';
+ prog->aux->attach_name = kstrdup(cgrp_path, GFP_KERNEL);
+
return 0;
cleanup:
@@ -735,6 +741,8 @@ static int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
if (old_prog)
bpf_prog_put(old_prog);
static_branch_dec(&cgroup_bpf_enabled_key[atype]);
+ kfree(prog->aux->attach_name);
+
return 0;
cleanup:
--
2.17.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH RFC 3/3] bpf: set attached sockmap id in attach_name
2022-02-18 9:56 [PATCH RFC 0/3] bpf: show attached name for progs without btf name Yafang Shao
2022-02-18 9:56 ` [PATCH RFC 1/3] bpf: rename attach_func_name to attach_name Yafang Shao
2022-02-18 9:56 ` [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name Yafang Shao
@ 2022-02-18 9:56 ` Yafang Shao
2 siblings, 0 replies; 11+ messages in thread
From: Yafang Shao @ 2022-02-18 9:56 UTC (permalink / raw)
To: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
kpsingh
Cc: netdev, bpf, Yafang Shao
Set the attached name when a bpf prog is attached to a sockmap, and
unset it when the bpf prog is detached.
Below is the result after this change,
$ cat progs.debug
id name attached
5 dump_bpf_map bpf_iter_bpf_map
7 dump_bpf_prog bpf_iter_bpf_prog
17 bpf_sockmap cgroup:/
19 bpf_redir_proxy sockmap:9
$ cat maps.debug
id name max_entries
3 iterator.rodata 1
9 ltcp_map 65535
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
net/core/sock_map.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/core/sock_map.c b/net/core/sock_map.c
index f39ef79ced67..ce8d0bbba6cc 100644
--- a/net/core/sock_map.c
+++ b/net/core/sock_map.c
@@ -1411,6 +1411,7 @@ static int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog,
{
struct sk_psock_progs *progs = sock_map_progs(map);
struct bpf_prog **pprog;
+ char sockmap_info[16];
if (!progs)
return -EOPNOTSUPP;
@@ -1438,8 +1439,13 @@ static int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog,
return -EOPNOTSUPP;
}
- if (old)
+ if (old) {
+ kfree(prog->aux->attach_name);
return psock_replace_prog(pprog, prog, old);
+ }
+
+ snprintf(sockmap_info, 16, "sockmap:%d", map->id);
+ prog->aux->attach_name = kstrdup(sockmap_info, GFP_KERNEL);
psock_set_prog(pprog, prog);
return 0;
--
2.17.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name
2022-02-18 9:56 ` [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name Yafang Shao
@ 2022-02-19 18:27 ` Alexei Starovoitov
2022-02-20 14:17 ` Yafang Shao
0 siblings, 1 reply; 11+ messages in thread
From: Alexei Starovoitov @ 2022-02-19 18:27 UTC (permalink / raw)
To: Yafang Shao
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Network Development, bpf
On Fri, Feb 18, 2022 at 1:56 AM Yafang Shao <laoar.shao@gmail.com> wrote:
>
> Set the cgroup path when a bpf prog is attached to a cgroup, and unset
> it when the bpf prog is detached.
>
> Below is the result after this change,
> $ cat progs.debug
> id name attached
> 5 dump_bpf_map bpf_iter_bpf_map
> 7 dump_bpf_prog bpf_iter_bpf_prog
> 17 bpf_sockmap cgroup:/
> 19 bpf_redir_proxy
>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> ---
> kernel/bpf/cgroup.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> index 43eb3501721b..ebd87e54f2d0 100644
> --- a/kernel/bpf/cgroup.c
> +++ b/kernel/bpf/cgroup.c
> @@ -440,6 +440,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> struct bpf_cgroup_storage *new_storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> enum cgroup_bpf_attach_type atype;
> + char cgrp_path[64] = "cgroup:";
> struct bpf_prog_list *pl;
> struct list_head *progs;
> int err;
> @@ -508,6 +509,11 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> else
> static_branch_inc(&cgroup_bpf_enabled_key[atype]);
> bpf_cgroup_storages_link(new_storage, cgrp, type);
> +
> + cgroup_name(cgrp, cgrp_path + strlen("cgroup:"), 64);
> + cgrp_path[63] = '\0';
> + prog->aux->attach_name = kstrdup(cgrp_path, GFP_KERNEL);
> +
This is pure debug code. We cannot have it in the kernel.
Not even under #ifdef.
Please do such debug code on a side as your own bpf program.
For example by kprobe-ing in this function and keeping the path
in a bpf map or send it to user space via ringbuf.
Or enable cgroup tracepoint and monitor cgroup_mkdir with full path.
Record it in user space or in bpf map, etc.
Also please read Documentation/bpf/bpf_devel_QA.rst
bpf patches should be based on bpf-next tree.
These patches are not.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name
2022-02-19 18:27 ` Alexei Starovoitov
@ 2022-02-20 14:17 ` Yafang Shao
2022-02-20 20:59 ` Alexei Starovoitov
0 siblings, 1 reply; 11+ messages in thread
From: Yafang Shao @ 2022-02-20 14:17 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Network Development, bpf
On Sun, Feb 20, 2022 at 2:27 AM Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
>
> On Fri, Feb 18, 2022 at 1:56 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> >
> > Set the cgroup path when a bpf prog is attached to a cgroup, and unset
> > it when the bpf prog is detached.
> >
> > Below is the result after this change,
> > $ cat progs.debug
> > id name attached
> > 5 dump_bpf_map bpf_iter_bpf_map
> > 7 dump_bpf_prog bpf_iter_bpf_prog
> > 17 bpf_sockmap cgroup:/
> > 19 bpf_redir_proxy
> >
> > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> > ---
> > kernel/bpf/cgroup.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> > index 43eb3501721b..ebd87e54f2d0 100644
> > --- a/kernel/bpf/cgroup.c
> > +++ b/kernel/bpf/cgroup.c
> > @@ -440,6 +440,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > struct bpf_cgroup_storage *new_storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > enum cgroup_bpf_attach_type atype;
> > + char cgrp_path[64] = "cgroup:";
> > struct bpf_prog_list *pl;
> > struct list_head *progs;
> > int err;
> > @@ -508,6 +509,11 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > else
> > static_branch_inc(&cgroup_bpf_enabled_key[atype]);
> > bpf_cgroup_storages_link(new_storage, cgrp, type);
> > +
> > + cgroup_name(cgrp, cgrp_path + strlen("cgroup:"), 64);
> > + cgrp_path[63] = '\0';
> > + prog->aux->attach_name = kstrdup(cgrp_path, GFP_KERNEL);
> > +
>
> This is pure debug code. We cannot have it in the kernel.
> Not even under #ifdef.
>
> Please do such debug code on a side as your own bpf program.
> For example by kprobe-ing in this function and keeping the path
> in a bpf map or send it to user space via ringbuf.
> Or enable cgroup tracepoint and monitor cgroup_mkdir with full path.
> Record it in user space or in bpf map, etc.
>
It is another possible solution to hook the related kernel functions
or tracepoints, but it may be a little complicated to track all the
bpf attach types, for example we also want to track
BPF_PROG_TYPE_SK_MSG[1], BPF_PROG_TYPE_FLOW_DISSECTOR and etc.
While the attach_name provides us a generic way to get how the bpf
progs are attached, which can't be got by bpftool.
It is not for debug-only purpose, while it gives us a better way to
maintain all the bpf progs running on a single host.
> Also please read Documentation/bpf/bpf_devel_QA.rst
> bpf patches should be based on bpf-next tree.
> These patches are not.
My local bpf-next repo is a little old.
Next time I will pull the newest bpf-next code before sending bpf
patches. Thanks for the information.
[1]. https://patchwork.kernel.org/project/netdevbpf/patch/20220218095612.52082-4-laoar.shao@gmail.com/
--
Thanks
Yafang
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name
2022-02-20 14:17 ` Yafang Shao
@ 2022-02-20 20:59 ` Alexei Starovoitov
2022-02-21 2:33 ` Yafang Shao
2022-02-21 14:26 ` Yafang Shao
0 siblings, 2 replies; 11+ messages in thread
From: Alexei Starovoitov @ 2022-02-20 20:59 UTC (permalink / raw)
To: Yafang Shao
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Network Development, bpf
On Sun, Feb 20, 2022 at 6:17 AM Yafang Shao <laoar.shao@gmail.com> wrote:
>
> On Sun, Feb 20, 2022 at 2:27 AM Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
> >
> > On Fri, Feb 18, 2022 at 1:56 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> > >
> > > Set the cgroup path when a bpf prog is attached to a cgroup, and unset
> > > it when the bpf prog is detached.
> > >
> > > Below is the result after this change,
> > > $ cat progs.debug
> > > id name attached
> > > 5 dump_bpf_map bpf_iter_bpf_map
> > > 7 dump_bpf_prog bpf_iter_bpf_prog
> > > 17 bpf_sockmap cgroup:/
> > > 19 bpf_redir_proxy
> > >
> > > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> > > ---
> > > kernel/bpf/cgroup.c | 8 ++++++++
> > > 1 file changed, 8 insertions(+)
> > >
> > > diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> > > index 43eb3501721b..ebd87e54f2d0 100644
> > > --- a/kernel/bpf/cgroup.c
> > > +++ b/kernel/bpf/cgroup.c
> > > @@ -440,6 +440,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > struct bpf_cgroup_storage *new_storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > enum cgroup_bpf_attach_type atype;
> > > + char cgrp_path[64] = "cgroup:";
> > > struct bpf_prog_list *pl;
> > > struct list_head *progs;
> > > int err;
> > > @@ -508,6 +509,11 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > else
> > > static_branch_inc(&cgroup_bpf_enabled_key[atype]);
> > > bpf_cgroup_storages_link(new_storage, cgrp, type);
> > > +
> > > + cgroup_name(cgrp, cgrp_path + strlen("cgroup:"), 64);
> > > + cgrp_path[63] = '\0';
> > > + prog->aux->attach_name = kstrdup(cgrp_path, GFP_KERNEL);
> > > +
> >
> > This is pure debug code. We cannot have it in the kernel.
> > Not even under #ifdef.
> >
> > Please do such debug code on a side as your own bpf program.
> > For example by kprobe-ing in this function and keeping the path
> > in a bpf map or send it to user space via ringbuf.
> > Or enable cgroup tracepoint and monitor cgroup_mkdir with full path.
> > Record it in user space or in bpf map, etc.
> >
>
> It is another possible solution to hook the related kernel functions
> or tracepoints, but it may be a little complicated to track all the
> bpf attach types, for example we also want to track
> BPF_PROG_TYPE_SK_MSG[1], BPF_PROG_TYPE_FLOW_DISSECTOR and etc.
> While the attach_name provides us a generic way to get how the bpf
> progs are attached, which can't be got by bpftool.
bpftool can certainly print such details.
See how it's using task_file iterator.
It can be extended to look into cgroups and sockmap,
and for each program print "sockmap:%d", map->id if so desired.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name
2022-02-20 20:59 ` Alexei Starovoitov
@ 2022-02-21 2:33 ` Yafang Shao
2022-02-21 14:26 ` Yafang Shao
1 sibling, 0 replies; 11+ messages in thread
From: Yafang Shao @ 2022-02-21 2:33 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Network Development, bpf
On Mon, Feb 21, 2022 at 4:59 AM Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
>
> On Sun, Feb 20, 2022 at 6:17 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> >
> > On Sun, Feb 20, 2022 at 2:27 AM Alexei Starovoitov
> > <alexei.starovoitov@gmail.com> wrote:
> > >
> > > On Fri, Feb 18, 2022 at 1:56 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> > > >
> > > > Set the cgroup path when a bpf prog is attached to a cgroup, and unset
> > > > it when the bpf prog is detached.
> > > >
> > > > Below is the result after this change,
> > > > $ cat progs.debug
> > > > id name attached
> > > > 5 dump_bpf_map bpf_iter_bpf_map
> > > > 7 dump_bpf_prog bpf_iter_bpf_prog
> > > > 17 bpf_sockmap cgroup:/
> > > > 19 bpf_redir_proxy
> > > >
> > > > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> > > > ---
> > > > kernel/bpf/cgroup.c | 8 ++++++++
> > > > 1 file changed, 8 insertions(+)
> > > >
> > > > diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> > > > index 43eb3501721b..ebd87e54f2d0 100644
> > > > --- a/kernel/bpf/cgroup.c
> > > > +++ b/kernel/bpf/cgroup.c
> > > > @@ -440,6 +440,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > > struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > > struct bpf_cgroup_storage *new_storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > > enum cgroup_bpf_attach_type atype;
> > > > + char cgrp_path[64] = "cgroup:";
> > > > struct bpf_prog_list *pl;
> > > > struct list_head *progs;
> > > > int err;
> > > > @@ -508,6 +509,11 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > > else
> > > > static_branch_inc(&cgroup_bpf_enabled_key[atype]);
> > > > bpf_cgroup_storages_link(new_storage, cgrp, type);
> > > > +
> > > > + cgroup_name(cgrp, cgrp_path + strlen("cgroup:"), 64);
> > > > + cgrp_path[63] = '\0';
> > > > + prog->aux->attach_name = kstrdup(cgrp_path, GFP_KERNEL);
> > > > +
> > >
> > > This is pure debug code. We cannot have it in the kernel.
> > > Not even under #ifdef.
> > >
> > > Please do such debug code on a side as your own bpf program.
> > > For example by kprobe-ing in this function and keeping the path
> > > in a bpf map or send it to user space via ringbuf.
> > > Or enable cgroup tracepoint and monitor cgroup_mkdir with full path.
> > > Record it in user space or in bpf map, etc.
> > >
> >
> > It is another possible solution to hook the related kernel functions
> > or tracepoints, but it may be a little complicated to track all the
> > bpf attach types, for example we also want to track
> > BPF_PROG_TYPE_SK_MSG[1], BPF_PROG_TYPE_FLOW_DISSECTOR and etc.
> > While the attach_name provides us a generic way to get how the bpf
> > progs are attached, which can't be got by bpftool.
>
> bpftool can certainly print such details.
> See how it's using task_file iterator.
> It can be extended to look into cgroups and sockmap,
> and for each program print "sockmap:%d", map->id if so desired.
Thanks for the explanation. I will analyze it.
--
Thanks
Yafang
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name
2022-02-20 20:59 ` Alexei Starovoitov
2022-02-21 2:33 ` Yafang Shao
@ 2022-02-21 14:26 ` Yafang Shao
2022-02-22 4:30 ` Alexei Starovoitov
1 sibling, 1 reply; 11+ messages in thread
From: Yafang Shao @ 2022-02-21 14:26 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Network Development, bpf
On Mon, Feb 21, 2022 at 4:59 AM Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
>
> On Sun, Feb 20, 2022 at 6:17 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> >
> > On Sun, Feb 20, 2022 at 2:27 AM Alexei Starovoitov
> > <alexei.starovoitov@gmail.com> wrote:
> > >
> > > On Fri, Feb 18, 2022 at 1:56 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> > > >
> > > > Set the cgroup path when a bpf prog is attached to a cgroup, and unset
> > > > it when the bpf prog is detached.
> > > >
> > > > Below is the result after this change,
> > > > $ cat progs.debug
> > > > id name attached
> > > > 5 dump_bpf_map bpf_iter_bpf_map
> > > > 7 dump_bpf_prog bpf_iter_bpf_prog
> > > > 17 bpf_sockmap cgroup:/
> > > > 19 bpf_redir_proxy
> > > >
> > > > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> > > > ---
> > > > kernel/bpf/cgroup.c | 8 ++++++++
> > > > 1 file changed, 8 insertions(+)
> > > >
> > > > diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> > > > index 43eb3501721b..ebd87e54f2d0 100644
> > > > --- a/kernel/bpf/cgroup.c
> > > > +++ b/kernel/bpf/cgroup.c
> > > > @@ -440,6 +440,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > > struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > > struct bpf_cgroup_storage *new_storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > > enum cgroup_bpf_attach_type atype;
> > > > + char cgrp_path[64] = "cgroup:";
> > > > struct bpf_prog_list *pl;
> > > > struct list_head *progs;
> > > > int err;
> > > > @@ -508,6 +509,11 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > > else
> > > > static_branch_inc(&cgroup_bpf_enabled_key[atype]);
> > > > bpf_cgroup_storages_link(new_storage, cgrp, type);
> > > > +
> > > > + cgroup_name(cgrp, cgrp_path + strlen("cgroup:"), 64);
> > > > + cgrp_path[63] = '\0';
> > > > + prog->aux->attach_name = kstrdup(cgrp_path, GFP_KERNEL);
> > > > +
> > >
> > > This is pure debug code. We cannot have it in the kernel.
> > > Not even under #ifdef.
> > >
> > > Please do such debug code on a side as your own bpf program.
> > > For example by kprobe-ing in this function and keeping the path
> > > in a bpf map or send it to user space via ringbuf.
> > > Or enable cgroup tracepoint and monitor cgroup_mkdir with full path.
> > > Record it in user space or in bpf map, etc.
> > >
> >
> > It is another possible solution to hook the related kernel functions
> > or tracepoints, but it may be a little complicated to track all the
> > bpf attach types, for example we also want to track
> > BPF_PROG_TYPE_SK_MSG[1], BPF_PROG_TYPE_FLOW_DISSECTOR and etc.
> > While the attach_name provides us a generic way to get how the bpf
> > progs are attached, which can't be got by bpftool.
>
> bpftool can certainly print such details.
> See how it's using task_file iterator.
> It can be extended to look into cgroups and sockmap,
> and for each program print "sockmap:%d", map->id if so desired.
I have read through the task_file code, but I haven't found a direct
way to get the attached cgroups or maps of a specified prog.
It is easy to look into a cgroup or sockmap, but the key point here is
which is the proper cgroup or sockmap.
There are some possible ways to get the attached cgroup or sockmap.
- add new member into struct bpf_prog_aux
For example,
struct bpf_prog_aux{
union {
struct cgroup *attached_cgrp;
struct bpf_map *attached_map;
};
};
Then we can easily get the related map or cgroup by extending
task_file iterator.
- build a table for attached maps, cgroups and etc
Like we did for pinned files.
Then we can compare the prog with the members stored in this table
one by one, but that seems a little heavy.
There may be some other ways.
I'm not sure if I clearly understand what you mean.
Hopefully you could help clarify it.
--
Thanks
Yafang
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name
2022-02-21 14:26 ` Yafang Shao
@ 2022-02-22 4:30 ` Alexei Starovoitov
2022-02-22 8:34 ` Yafang Shao
0 siblings, 1 reply; 11+ messages in thread
From: Alexei Starovoitov @ 2022-02-22 4:30 UTC (permalink / raw)
To: Yafang Shao
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Network Development, bpf
On Mon, Feb 21, 2022 at 6:26 AM Yafang Shao <laoar.shao@gmail.com> wrote:
>
> On Mon, Feb 21, 2022 at 4:59 AM Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
> >
> > On Sun, Feb 20, 2022 at 6:17 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> > >
> > > On Sun, Feb 20, 2022 at 2:27 AM Alexei Starovoitov
> > > <alexei.starovoitov@gmail.com> wrote:
> > > >
> > > > On Fri, Feb 18, 2022 at 1:56 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> > > > >
> > > > > Set the cgroup path when a bpf prog is attached to a cgroup, and unset
> > > > > it when the bpf prog is detached.
> > > > >
> > > > > Below is the result after this change,
> > > > > $ cat progs.debug
> > > > > id name attached
> > > > > 5 dump_bpf_map bpf_iter_bpf_map
> > > > > 7 dump_bpf_prog bpf_iter_bpf_prog
> > > > > 17 bpf_sockmap cgroup:/
> > > > > 19 bpf_redir_proxy
> > > > >
> > > > > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> > > > > ---
> > > > > kernel/bpf/cgroup.c | 8 ++++++++
> > > > > 1 file changed, 8 insertions(+)
> > > > >
> > > > > diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> > > > > index 43eb3501721b..ebd87e54f2d0 100644
> > > > > --- a/kernel/bpf/cgroup.c
> > > > > +++ b/kernel/bpf/cgroup.c
> > > > > @@ -440,6 +440,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > > > struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > > > struct bpf_cgroup_storage *new_storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > > > enum cgroup_bpf_attach_type atype;
> > > > > + char cgrp_path[64] = "cgroup:";
> > > > > struct bpf_prog_list *pl;
> > > > > struct list_head *progs;
> > > > > int err;
> > > > > @@ -508,6 +509,11 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > > > else
> > > > > static_branch_inc(&cgroup_bpf_enabled_key[atype]);
> > > > > bpf_cgroup_storages_link(new_storage, cgrp, type);
> > > > > +
> > > > > + cgroup_name(cgrp, cgrp_path + strlen("cgroup:"), 64);
> > > > > + cgrp_path[63] = '\0';
> > > > > + prog->aux->attach_name = kstrdup(cgrp_path, GFP_KERNEL);
> > > > > +
> > > >
> > > > This is pure debug code. We cannot have it in the kernel.
> > > > Not even under #ifdef.
> > > >
> > > > Please do such debug code on a side as your own bpf program.
> > > > For example by kprobe-ing in this function and keeping the path
> > > > in a bpf map or send it to user space via ringbuf.
> > > > Or enable cgroup tracepoint and monitor cgroup_mkdir with full path.
> > > > Record it in user space or in bpf map, etc.
> > > >
> > >
> > > It is another possible solution to hook the related kernel functions
> > > or tracepoints, but it may be a little complicated to track all the
> > > bpf attach types, for example we also want to track
> > > BPF_PROG_TYPE_SK_MSG[1], BPF_PROG_TYPE_FLOW_DISSECTOR and etc.
> > > While the attach_name provides us a generic way to get how the bpf
> > > progs are attached, which can't be got by bpftool.
> >
> > bpftool can certainly print such details.
> > See how it's using task_file iterator.
> > It can be extended to look into cgroups and sockmap,
> > and for each program print "sockmap:%d", map->id if so desired.
>
> I have read through the task_file code, but I haven't found a direct
> way to get the attached cgroups or maps of a specified prog.
> It is easy to look into a cgroup or sockmap, but the key point here is
> which is the proper cgroup or sockmap.
> There are some possible ways to get the attached cgroup or sockmap.
>
> - add new member into struct bpf_prog_aux
No. Please stop proposing kernel changes for your debug needs.
> For example,
> struct bpf_prog_aux{
> union {
> struct cgroup *attached_cgrp;
> struct bpf_map *attached_map;
> };
> };
> Then we can easily get the related map or cgroup by extending
> task_file iterator.
>
> - build a table for attached maps, cgroups and etc
> Like we did for pinned files.
> Then we can compare the prog with the members stored in this table
> one by one, but that seems a little heavy.
>
> There may be some other ways.
- iterate bpf maps
- find sockmap
- do equivalent of sock_map_progs(), but open coded inside bpf prog
- read progs, print them.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name
2022-02-22 4:30 ` Alexei Starovoitov
@ 2022-02-22 8:34 ` Yafang Shao
0 siblings, 0 replies; 11+ messages in thread
From: Yafang Shao @ 2022-02-22 8:34 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Network Development, bpf
On Tue, Feb 22, 2022 at 12:30 PM Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
>
> On Mon, Feb 21, 2022 at 6:26 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> >
> > On Mon, Feb 21, 2022 at 4:59 AM Alexei Starovoitov
> > <alexei.starovoitov@gmail.com> wrote:
> > >
> > > On Sun, Feb 20, 2022 at 6:17 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> > > >
> > > > On Sun, Feb 20, 2022 at 2:27 AM Alexei Starovoitov
> > > > <alexei.starovoitov@gmail.com> wrote:
> > > > >
> > > > > On Fri, Feb 18, 2022 at 1:56 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> > > > > >
> > > > > > Set the cgroup path when a bpf prog is attached to a cgroup, and unset
> > > > > > it when the bpf prog is detached.
> > > > > >
> > > > > > Below is the result after this change,
> > > > > > $ cat progs.debug
> > > > > > id name attached
> > > > > > 5 dump_bpf_map bpf_iter_bpf_map
> > > > > > 7 dump_bpf_prog bpf_iter_bpf_prog
> > > > > > 17 bpf_sockmap cgroup:/
> > > > > > 19 bpf_redir_proxy
> > > > > >
> > > > > > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> > > > > > ---
> > > > > > kernel/bpf/cgroup.c | 8 ++++++++
> > > > > > 1 file changed, 8 insertions(+)
> > > > > >
> > > > > > diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> > > > > > index 43eb3501721b..ebd87e54f2d0 100644
> > > > > > --- a/kernel/bpf/cgroup.c
> > > > > > +++ b/kernel/bpf/cgroup.c
> > > > > > @@ -440,6 +440,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > > > > struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > > > > struct bpf_cgroup_storage *new_storage[MAX_BPF_CGROUP_STORAGE_TYPE] = {};
> > > > > > enum cgroup_bpf_attach_type atype;
> > > > > > + char cgrp_path[64] = "cgroup:";
> > > > > > struct bpf_prog_list *pl;
> > > > > > struct list_head *progs;
> > > > > > int err;
> > > > > > @@ -508,6 +509,11 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
> > > > > > else
> > > > > > static_branch_inc(&cgroup_bpf_enabled_key[atype]);
> > > > > > bpf_cgroup_storages_link(new_storage, cgrp, type);
> > > > > > +
> > > > > > + cgroup_name(cgrp, cgrp_path + strlen("cgroup:"), 64);
> > > > > > + cgrp_path[63] = '\0';
> > > > > > + prog->aux->attach_name = kstrdup(cgrp_path, GFP_KERNEL);
> > > > > > +
> > > > >
> > > > > This is pure debug code. We cannot have it in the kernel.
> > > > > Not even under #ifdef.
> > > > >
> > > > > Please do such debug code on a side as your own bpf program.
> > > > > For example by kprobe-ing in this function and keeping the path
> > > > > in a bpf map or send it to user space via ringbuf.
> > > > > Or enable cgroup tracepoint and monitor cgroup_mkdir with full path.
> > > > > Record it in user space or in bpf map, etc.
> > > > >
> > > >
> > > > It is another possible solution to hook the related kernel functions
> > > > or tracepoints, but it may be a little complicated to track all the
> > > > bpf attach types, for example we also want to track
> > > > BPF_PROG_TYPE_SK_MSG[1], BPF_PROG_TYPE_FLOW_DISSECTOR and etc.
> > > > While the attach_name provides us a generic way to get how the bpf
> > > > progs are attached, which can't be got by bpftool.
> > >
> > > bpftool can certainly print such details.
> > > See how it's using task_file iterator.
> > > It can be extended to look into cgroups and sockmap,
> > > and for each program print "sockmap:%d", map->id if so desired.
> >
> > I have read through the task_file code, but I haven't found a direct
> > way to get the attached cgroups or maps of a specified prog.
> > It is easy to look into a cgroup or sockmap, but the key point here is
> > which is the proper cgroup or sockmap.
> > There are some possible ways to get the attached cgroup or sockmap.
> >
> > - add new member into struct bpf_prog_aux
>
> No. Please stop proposing kernel changes for your debug needs.
>
> > For example,
> > struct bpf_prog_aux{
> > union {
> > struct cgroup *attached_cgrp;
> > struct bpf_map *attached_map;
> > };
> > };
> > Then we can easily get the related map or cgroup by extending
> > task_file iterator.
> >
> > - build a table for attached maps, cgroups and etc
> > Like we did for pinned files.
> > Then we can compare the prog with the members stored in this table
> > one by one, but that seems a little heavy.
> >
> > There may be some other ways.
>
> - iterate bpf maps
> - find sockmap
> - do equivalent of sock_map_progs(), but open coded inside bpf prog
> - read progs, print them.
That's similar to the second way I proposed above.
The trouble is it may be too heavy to iterate the target objects, for
example, there may be thousands of cgroups on a single host, and if we
want to know which cgroup is attached by a bpf prog we have to iterate
all the cgroups until find it.
But it seems there is no better choice.
Anyway thanks for the advice.
--
Thanks
Yafang
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-02-22 8:35 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-18 9:56 [PATCH RFC 0/3] bpf: show attached name for progs without btf name Yafang Shao
2022-02-18 9:56 ` [PATCH RFC 1/3] bpf: rename attach_func_name to attach_name Yafang Shao
2022-02-18 9:56 ` [PATCH RFC 2/3] bpf: set attached cgroup name in attach_name Yafang Shao
2022-02-19 18:27 ` Alexei Starovoitov
2022-02-20 14:17 ` Yafang Shao
2022-02-20 20:59 ` Alexei Starovoitov
2022-02-21 2:33 ` Yafang Shao
2022-02-21 14:26 ` Yafang Shao
2022-02-22 4:30 ` Alexei Starovoitov
2022-02-22 8:34 ` Yafang Shao
2022-02-18 9:56 ` [PATCH RFC 3/3] bpf: set attached sockmap id " Yafang Shao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).