diff options
author | Alexei Starovoitov <ast@fb.com> | 2017-05-30 13:31:31 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-31 19:29:47 -0400 |
commit | 50bbfed96766acb8b9e1b299e3daae5187c3eb5a (patch) | |
tree | 2486090dff6e58fbabb5cce544219075601e0ac0 /lib | |
parent | 80a58d02559465b0ea403ff91c8bca9a733b1b0d (diff) |
bpf: track stack depth of classic bpf programs
To track stack depth of classic bpf programs we only need
to analyze ST|STX instructions, since check_load_and_stores()
verifies that programs can load from stack only after write.
We also need to change the way cBPF stack slots map to eBPF stack,
since typical classic programs are using slots 0 and 1, so they
need to map to stack offsets -4 and -8 respectively in order
to take advantage of small stack interpreter and JITs.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions