diff options
author | Mathieu Malaterre <malat@debian.org> | 2018-05-16 22:27:41 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-17 00:49:17 +0200 |
commit | be2d04d11fd33bd46622f94619aae1596d9f9303 (patch) | |
tree | 64f6eb3bde9c91d2598a15f2744f2dbe1154afe2 /include/linux/bpf_verifier.h | |
parent | 44edef77bd92730e1520b07f5ae2c9f4628738a8 (diff) | |
download | linux-stable-be2d04d11fd33bd46622f94619aae1596d9f9303.tar.gz linux-stable-be2d04d11fd33bd46622f94619aae1596d9f9303.tar.bz2 linux-stable-be2d04d11fd33bd46622f94619aae1596d9f9303.zip |
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: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/bpf_verifier.h')
-rw-r--r-- | include/linux/bpf_verifier.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 8f70dc181e23..c286813deaeb 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -200,8 +200,8 @@ struct bpf_verifier_env { u32 subprog_cnt; }; -void bpf_verifier_vlog(struct bpf_verifier_log *log, const char *fmt, - va_list args); +__printf(2, 0) void bpf_verifier_vlog(struct bpf_verifier_log *log, + const char *fmt, va_list args); __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, const char *fmt, ...); |