projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a2d28f
)
bpf: annotate bpf_insn_print_t with __printf
author
Jakub Kicinski
<
[email protected]
>
Tue, 16 Jan 2018 23:51:46 +0000
(15:51 -0800)
committer
Daniel Borkmann
<
[email protected]
>
Wed, 17 Jan 2018 00:15:05 +0000
(
01:15
+0100)
Functions of type bpf_insn_print_t take printf-like format
string, mark the type accordingly.
Signed-off-by: Jakub Kicinski <
[email protected]
>
Reviewed-by: Quentin Monnet <
[email protected]
>
Signed-off-by: Daniel Borkmann <
[email protected]
>
kernel/bpf/disasm.h
patch
|
blob
|
history
diff --git
a/kernel/bpf/disasm.h
b/kernel/bpf/disasm.h
index e0857d016f8957fbcdd0140ee8c0c07e577566d4..266fe8ee542bb814a9e93d237177302c59247f3f 100644
(file)
--- a/
kernel/bpf/disasm.h
+++ b/
kernel/bpf/disasm.h
@@
-29,8
+29,8
@@
extern const char *const bpf_class_string[8];
const char *func_id_name(int id);
-typedef void (*bpf_insn_print_t)(struct bpf_verifier_env *env,
- const char *, ...);
+typedef
__printf(2, 3)
void (*bpf_insn_print_t)(struct bpf_verifier_env *env,
+
const char *, ...);
typedef const char *(*bpf_insn_revmap_call_t)(void *private_data,
const struct bpf_insn *insn);
typedef const char *(*bpf_insn_print_imm_t)(void *private_data,