提交 be2d04d1 编写于 作者: M Mathieu Malaterre 提交者: Daniel Borkmann

bpf: add __printf verification to bpf_verifier_vlog

__printf is useful to verify format and arguments. ‘bpf_verifier_vlog’
function is used twice in verifier.c in both cases the caller function
already uses the __printf gcc attribute.

Remove the following warning, triggered with W=1:

  kernel/bpf/verifier.c:176:2: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
Signed-off-by: NMathieu Malaterre <malat@debian.org>
Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
上级 44edef77
...@@ -200,8 +200,8 @@ struct bpf_verifier_env { ...@@ -200,8 +200,8 @@ struct bpf_verifier_env {
u32 subprog_cnt; u32 subprog_cnt;
}; };
void bpf_verifier_vlog(struct bpf_verifier_log *log, const char *fmt, __printf(2, 0) void bpf_verifier_vlog(struct bpf_verifier_log *log,
va_list args); const char *fmt, va_list args);
__printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env,
const char *fmt, ...); const char *fmt, ...);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册