1. 30 Aug, 2019 1 commit
    • Yauheni Kaliuta's avatar
      bpf: s390: add JIT support for multi-function programs · 1c8f9b91
      Yauheni Kaliuta authored
      This adds support for bpf-to-bpf function calls in the s390 JIT
      compiler. The JIT compiler converts the bpf call instructions to
      native branch instructions. After a round of the usual passes, the
      start addresses of the JITed images for the callee functions are
      known. Finally, to fixup the branch target addresses, we need to
      perform an extra pass.
      
      Because of the address range in which JITed images are allocated on
      s390, the offsets of the start addresses of these images from
      __bpf_call_base are as large as 64 bits. So, for a function call,
      the imm field of the instruction cannot be used to determine the
      callee's address. Use bpf_jit_get_func_addr() helper instead.
      
      The patch borrows a lot from:
      
      commit 8c11ea5c ("bpf, arm64: fix getting subprog addr from aux
      for calls")
      
      commit e2c95a61 ("bpf, ppc64: generalize fetching subprog into
      bpf_jit_get_func_addr")
      
      commit 8484ce83 ("bpf: powerpc64: add JIT support for
      multi-function programs")
      
      (including the commit message).
      
      test_verifier (5.3-rc6 with CONFIG_BPF_JIT_ALWAYS_ON=y):
      
      without patch:
      Summary: 1501 PASSED, 0 SKIPPED, 47 FAILED
      
      with patch:
      Summary: 1540 PASSED, 0 SKIPPED, 8 FAILED
      Signed-off-by: default avatarYauheni Kaliuta <yauheni.kaliuta@redhat.com>
      Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Tested-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      1c8f9b91
  2. 27 Aug, 2019 11 commits
  3. 21 Aug, 2019 10 commits
  4. 20 Aug, 2019 10 commits
  5. 17 Aug, 2019 8 commits