Re: [PATCH v4 bpf-next 5/7] bpf: Add arch_bpf_trampoline_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/23 8:03 PM, Song Liu wrote:
This helper will be used to calculate the size of the trampoline before
allocating the memory.

arch_prepare_bpf_trampoline() for arm64 and riscv64 can use
arch_bpf_trampoline_size() to check the trampoline fits in the image.

OTOH, arch_prepare_bpf_trampoline() for s390 has to call the JIT process
twice, so it cannot use arch_bpf_trampoline_size().

Signed-off-by: Song Liu <song@xxxxxxxxxx>
Acked-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
Tested-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>  # on s390x
---
  arch/arm64/net/bpf_jit_comp.c   | 56 ++++++++++++++++++++++++---------
  arch/riscv/net/bpf_jit_comp64.c | 22 ++++++++++---
  arch/s390/net/bpf_jit_comp.c    | 56 ++++++++++++++++++++-------------
  arch/x86/net/bpf_jit_comp.c     | 37 +++++++++++++++++++---
  include/linux/bpf.h             |  2 ++
  kernel/bpf/trampoline.c         |  6 ++++
  6 files changed, 133 insertions(+), 46 deletions(-)

Readding Bjorn, Xu and Pu to Cc given they reviewed prior versions, would be nice
to get some more arch Acks in.

Thanks,
Daniel




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux