]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add __printf verification to bpf_verifier_vlog
authorMathieu Malaterre <malat@debian.org>
Wed, 16 May 2018 20:27:41 +0000 (22:27 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 16 May 2018 22:49:17 +0000 (00:49 +0200)
commit3e440404c81f1aedbcd1eee8ba7f25320c7ada30
tree64f6eb3bde9c91d2598a15f2744f2dbe1154afe2
parent5035b5b22978d19e7af1173684498f0315855687
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>
include/linux/bpf_verifier.h