mbox series

[RESEND,v2,0/3] bpf,x64: implement jump padding in jit

Message ID 20210107021701.1797-1-glin@suse.com (mailing list archive)
Headers show
Series bpf,x64: implement jump padding in jit | expand

Message

Gary Lin Jan. 7, 2021, 2:16 a.m. UTC
This patch series implements jump padding to x64 jit to cover some
corner cases that used to consume more than 20 passes and caused
failure.

v2:
  - Simplify the sample code in the commit description and provide the
    jit code
  - Check the expected padding bytes with WARN_ONCE
  - Move the 'padded' flag to 'struct x64_jit_data'
  - Remove the EXPECTED_FAIL flag from bpf_fill_maxinsns11() in test_bpf
  - Add 2 verifier tests

Gary Lin (3):
  bpf,x64: pad NOPs to make images converge more easily
  test_bpf: remove EXPECTED_FAIL flag from bpf_fill_maxinsns11
  selftests/bpf: Add verifier test for x64 jit jump padding

 arch/x86/net/bpf_jit_comp.c                 | 86 +++++++++++++++------
 lib/test_bpf.c                              |  7 +-
 tools/testing/selftests/bpf/test_verifier.c | 43 +++++++++++
 tools/testing/selftests/bpf/verifier/jit.c  | 16 ++++
 4 files changed, 122 insertions(+), 30 deletions(-)