public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Song Liu <song@kernel.org>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
	andrii@kernel.org, martin.lau@kernel.org, kernel-team@meta.com,
	bjorn@kernel.org, xukuohai@huawei.com, pulehui@huawei.com,
	iii@linux.ibm.com
Subject: Re: [PATCH v5 bpf-next 0/7] Allocate bpf trampoline on bpf_prog_pack
Date: Wed, 25 Oct 2023 15:49:38 +0200	[thread overview]
Message-ID: <ZTkc8hR3ALOsABQq@krava> (raw)
In-Reply-To: <20231024224601.2292927-1-song@kernel.org>

On Tue, Oct 24, 2023 at 03:45:54PM -0700, Song Liu wrote:
> This set enables allocating bpf trampoline from bpf_prog_pack on x86. The
> majority of this work, however, is the refactoring of trampoline code.
> This is needed because we need to handle 4 archs and 2 users (trampoline
> and struct_ops).
> 
> 1/7 through 6/7 refactors trampoline code. A few helpers are added.
> 7/7 finally let bpf trampoline on x86 use bpf_prog_pack.
> 
> Changes in v5:
> 1. Adjust size of trampoline ksym. (Jiri)
> 2. Use "unsigned int size" arg in image management helpers.(Daniel)
> 
> Changes in v4:
> 1. Dropped 1/8 in v3, which is already merged in bpf-next.
> 2. Add Reviewed-by from Björn Töpel.
> 
> Changes in v3:
> 1. Fix bug in s390. (Thanks to Ilya Leoshkevich).
> 2. Fix build error in riscv. (kernel test robot).
> 
> Changes in v2:
> 1. Add missing changes in net/bpf/bpf_dummy_struct_ops.c.
> 2. Reduce one dry run in arch_prepare_bpf_trampoline. (Xu Kuohai)
> 3. Other small fixes.
> 
> Song Liu (7):
>   bpf: Let bpf_prog_pack_free handle any pointer
>   bpf: Adjust argument names of arch_prepare_bpf_trampoline()
>   bpf: Add helpers for trampoline image management
>   bpf, x86: Adjust arch_prepare_bpf_trampoline return value
>   bpf: Add arch_bpf_trampoline_size()
>   bpf: Use arch_bpf_trampoline_size
>   x86, bpf: Use bpf_prog_pack for bpf trampoline

Acked-by: Jiri Olsa <jolsa@kernel.org>

jirka

> 
>  arch/arm64/net/bpf_jit_comp.c   |  55 +++++++++-----
>  arch/riscv/net/bpf_jit_comp64.c |  25 ++++---
>  arch/s390/net/bpf_jit_comp.c    |  56 +++++++++------
>  arch/x86/net/bpf_jit_comp.c     | 124 +++++++++++++++++++++++++-------
>  include/linux/bpf.h             |  14 +++-
>  include/linux/filter.h          |   2 +-
>  kernel/bpf/bpf_struct_ops.c     |  19 +++--
>  kernel/bpf/core.c               |  21 +++---
>  kernel/bpf/dispatcher.c         |   7 +-
>  kernel/bpf/trampoline.c         | 101 +++++++++++++++++++-------
>  net/bpf/bpf_dummy_struct_ops.c  |   7 +-
>  11 files changed, 299 insertions(+), 132 deletions(-)
> 
> --
> 2.34.1

      parent reply	other threads:[~2023-10-25 13:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 22:45 [PATCH v5 bpf-next 0/7] Allocate bpf trampoline on bpf_prog_pack Song Liu
2023-10-24 22:45 ` [PATCH v5 bpf-next 1/7] bpf: Let bpf_prog_pack_free handle any pointer Song Liu
2023-10-24 22:45 ` [PATCH v5 bpf-next 2/7] bpf: Adjust argument names of arch_prepare_bpf_trampoline() Song Liu
2023-10-24 22:45 ` [PATCH v5 bpf-next 3/7] bpf: Add helpers for trampoline image management Song Liu
2023-10-24 22:45 ` [PATCH v5 bpf-next 4/7] bpf, x86: Adjust arch_prepare_bpf_trampoline return value Song Liu
2023-10-24 22:45 ` [PATCH v5 bpf-next 5/7] bpf: Add arch_bpf_trampoline_size() Song Liu
2023-10-26 11:59   ` Björn Töpel
2023-10-24 22:46 ` [PATCH v5 bpf-next 6/7] bpf: Use arch_bpf_trampoline_size Song Liu
2023-10-26 20:21   ` Björn Töpel
2023-10-24 22:46 ` [PATCH v5 bpf-next 7/7] x86, bpf: Use bpf_prog_pack for bpf trampoline Song Liu
2023-10-25 13:49 ` Jiri Olsa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZTkc8hR3ALOsABQq@krava \
    --to=olsajiri@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=iii@linux.ibm.com \
    --cc=kernel-team@meta.com \
    --cc=martin.lau@kernel.org \
    --cc=pulehui@huawei.com \
    --cc=song@kernel.org \
    --cc=xukuohai@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox