[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_92599297262AE4AF18A39988330606425408@qq.com>
Date: Fri, 28 Oct 2022 09:01:42 +0800
From: Rong Tao <rtoax@...mail.com>
To: andrii.nakryiko@...il.com
Cc: andrii@...nel.org, ast@...nel.org, bpf@...r.kernel.org,
daniel@...earbox.net, haoluo@...gle.com, john.fastabend@...il.com,
jolsa@...nel.org, kpsingh@...nel.org, linux-kernel@...r.kernel.org,
martin.lau@...ux.dev, rongtao@...tc.cn, rtoax@...mail.com,
sdf@...gle.com, song@...nel.org, yhs@...com
Subject: Re: [PATCH] samples/bpf: Fix sockex3: missing BPF prog type
Thanks for your reply, actually, i tried another method, which can solved
this error, recognize "socket/xxx" as "socket". However, it maybe influence
other BPF prog or not? What do you think the following patch?
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -8659,7 +8659,7 @@ static bool sec_def_matches(const struct bpf_sec_def *sec_def, const char *sec_n
return false;
}
- return strcmp(sec_name, sec_def->sec) == 0;
+ return strncmp(sec_name, sec_def->sec, len) == 0;
}
Powered by blists - more mailing lists