aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/syscall.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2015-09-29 19:41:50 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-03 08:02:39 -0400
commita91263d520246b63c63e75ddfb072ee6a853fe15 (patch)
tree17f158474a969614207febc06cae85cd17dd4ab8 /kernel/bpf/syscall.c
parentbd8762bec95ed81d5b81390ff23c5f83345cb536 (diff)
ebpf: migrate bpf_prog's flags to bitfield
As we need to add further flags to the bpf_prog structure, lets migrate both bools to a bitfield representation. The size of the base structure (excluding insns) remains unchanged at 40 bytes. Add also tags for the kmemchecker, so that it doesn't throw false positives. Even in case gcc would generate suboptimal code, it's not being accessed in performance critical paths. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/syscall.c')
-rw-r--r--kernel/bpf/syscall.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 35bac8e8b071..2190ab14b763 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -553,10 +553,10 @@ static int bpf_prog_load(union bpf_attr *attr)
553 goto free_prog; 553 goto free_prog;
554 554
555 prog->orig_prog = NULL; 555 prog->orig_prog = NULL;
556 prog->jited = false; 556 prog->jited = 0;
557 557
558 atomic_set(&prog->aux->refcnt, 1); 558 atomic_set(&prog->aux->refcnt, 1);
559 prog->gpl_compatible = is_gpl; 559 prog->gpl_compatible = is_gpl ? 1 : 0;
560 560
561 /* find program type: socket_filter vs tracing_filter */ 561 /* find program type: socket_filter vs tracing_filter */
562 err = find_prog_type(type, prog); 562 err = find_prog_type(type, prog);