bpf: use different interpreter depending on required stack size
authorAlexei Starovoitov <ast@fb.com>
Tue, 30 May 2017 20:31:33 +0000 (13:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 May 2017 23:29:48 +0000 (19:29 -0400)
commitb870aa901f4be1d32c13faf9e8f40bf2a8562e19
tree80ea6e90353fd5cff52f5c7f5e80c73b57ce3a15
parent105c03614bff2de60adf338e3ee90652b65c2d05
bpf: use different interpreter depending on required stack size

16 __bpf_prog_run() interpreters for various stack sizes add .text
but not a lot comparing to run-time stack savings

   text    data     bss     dec     hex filename
  26350   10328     624   37302    91b6 kernel/bpf/core.o.before_split
  25777   10328     624   36729    8f79 kernel/bpf/core.o.after_split
  26970   10328     624   37922    9422 kernel/bpf/core.o.now

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/core.c