[dpdk-dev,0/3] bpf: extend validation of input BPF programs

Message ID 1528447355-29411-1-git-send-email-konstantin.ananyev@intel.com (mailing list archive)
Headers
Series bpf: extend validation of input BPF programs |

Message

Ananyev, Konstantin June 8, 2018, 8:42 a.m. UTC
  As first step extend struct rte_bpf_xsym with new fields to provide
extra information for allowed external varaibles and helper functions.
That allows to extend bpf validation with new checks for:
 - use/return uninitialized registers and/or stack data
 - possible memory access boundaries violation
 - invalid arguments for the function

Konstantin Ananyev (3):
  bpf: add extra information for external symbol definitions
  bpf: add extra validation for input BPF program
  test/bpf: add new test-case for external function call

 app/test-pmd/bpf_cmd.c        |   27 +-
 lib/librte_bpf/bpf_def.h      |    5 +
 lib/librte_bpf/bpf_exec.c     |    2 +-
 lib/librte_bpf/bpf_impl.h     |   14 +
 lib/librte_bpf/bpf_jit_x86.c  |   17 +-
 lib/librte_bpf/bpf_load.c     |   49 +-
 lib/librte_bpf/bpf_load_elf.c |    4 +-
 lib/librte_bpf/bpf_validate.c | 1136 +++++++++++++++++++++++++++++++++++++++--
 lib/librte_bpf/rte_bpf.h      |   21 +-
 test/test/test_bpf.c          |  169 +++++-
 10 files changed, 1382 insertions(+), 62 deletions(-)
  

Comments

Thomas Monjalon July 12, 2018, 7:46 a.m. UTC | #1
> Konstantin Ananyev (3):
>   bpf: add extra information for external symbol definitions
>   bpf: add extra validation for input BPF program
>   test/bpf: add new test-case for external function call

Applied, thanks