From: Hari Bathini <hbathini@linux.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
bpf@vger.kernel.org
Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Song Liu <songliubraving@fb.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Song Liu <song@kernel.org>
Subject: Re: [PATCH v6 5/5] powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free]
Date: Fri, 20 Oct 2023 19:45:24 +0530 [thread overview]
Message-ID: <6588d1ed-4df0-5344-9c4a-0dfc10e160d1@linux.ibm.com> (raw)
In-Reply-To: <87jzrj5efp.fsf@mail.lhotse>
On 19/10/23 11:41 am, Michael Ellerman wrote:
> Hari Bathini <hbathini@linux.ibm.com> writes:
>> Use bpf_jit_binary_pack_alloc in powerpc jit. The jit engine first
>> writes the program to the rw buffer. When the jit is done, the program
>> is copied to the final location with bpf_jit_binary_pack_finalize.
>> With multiple jit_subprogs, bpf_jit_free is called on some subprograms
>> that haven't got bpf_jit_binary_pack_finalize() yet. Implement custom
>> bpf_jit_free() like in commit 1d5f82d9dd47 ("bpf, x86: fix freeing of
>> not-finalized bpf_prog_pack") to call bpf_jit_binary_pack_finalize(),
>> if necessary. As bpf_flush_icache() is not needed anymore, remove it.
>>
>> Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
>> Acked-by: Song Liu <song@kernel.org>
>> ---
>> arch/powerpc/net/bpf_jit.h | 18 ++---
>> arch/powerpc/net/bpf_jit_comp.c | 106 ++++++++++++++++++++++--------
>> arch/powerpc/net/bpf_jit_comp32.c | 13 ++--
>> arch/powerpc/net/bpf_jit_comp64.c | 10 +--
>> 4 files changed, 96 insertions(+), 51 deletions(-)
>
> This causes a crash at boot on my Power7 box:
Thanks, Michael.
Posted v7.
- Hari
WARNING: multiple messages have this Message-ID (diff)
From: Hari Bathini <hbathini@linux.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
bpf@vger.kernel.org
Cc: Song Liu <songliubraving@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>, Song Liu <song@kernel.org>,
"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
Subject: Re: [PATCH v6 5/5] powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free]
Date: Fri, 20 Oct 2023 19:45:24 +0530 [thread overview]
Message-ID: <6588d1ed-4df0-5344-9c4a-0dfc10e160d1@linux.ibm.com> (raw)
In-Reply-To: <87jzrj5efp.fsf@mail.lhotse>
On 19/10/23 11:41 am, Michael Ellerman wrote:
> Hari Bathini <hbathini@linux.ibm.com> writes:
>> Use bpf_jit_binary_pack_alloc in powerpc jit. The jit engine first
>> writes the program to the rw buffer. When the jit is done, the program
>> is copied to the final location with bpf_jit_binary_pack_finalize.
>> With multiple jit_subprogs, bpf_jit_free is called on some subprograms
>> that haven't got bpf_jit_binary_pack_finalize() yet. Implement custom
>> bpf_jit_free() like in commit 1d5f82d9dd47 ("bpf, x86: fix freeing of
>> not-finalized bpf_prog_pack") to call bpf_jit_binary_pack_finalize(),
>> if necessary. As bpf_flush_icache() is not needed anymore, remove it.
>>
>> Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
>> Acked-by: Song Liu <song@kernel.org>
>> ---
>> arch/powerpc/net/bpf_jit.h | 18 ++---
>> arch/powerpc/net/bpf_jit_comp.c | 106 ++++++++++++++++++++++--------
>> arch/powerpc/net/bpf_jit_comp32.c | 13 ++--
>> arch/powerpc/net/bpf_jit_comp64.c | 10 +--
>> 4 files changed, 96 insertions(+), 51 deletions(-)
>
> This causes a crash at boot on my Power7 box:
Thanks, Michael.
Posted v7.
- Hari
next prev parent reply other threads:[~2023-10-20 14:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 20:03 [PATCH v6 0/5] powerpc/bpf: use BPF prog pack allocator Hari Bathini
2023-10-12 20:03 ` Hari Bathini
2023-10-12 20:03 ` [PATCH v6 1/5] powerpc/code-patching: introduce patch_instructions() Hari Bathini
2023-10-12 20:03 ` Hari Bathini
2023-10-12 20:03 ` [PATCH v6 2/5] powerpc/bpf: implement bpf_arch_text_copy Hari Bathini
2023-10-12 20:03 ` Hari Bathini
2023-10-12 20:03 ` [PATCH v6 3/5] powerpc/bpf: implement bpf_arch_text_invalidate for bpf_prog_pack Hari Bathini
2023-10-12 20:03 ` Hari Bathini
2023-10-12 20:03 ` [PATCH v6 4/5] powerpc/bpf: rename powerpc64_jit_data to powerpc_jit_data Hari Bathini
2023-10-12 20:03 ` Hari Bathini
2023-10-12 20:03 ` [PATCH v6 5/5] powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free] Hari Bathini
2023-10-12 20:03 ` Hari Bathini
2023-10-19 6:11 ` Michael Ellerman
2023-10-19 6:11 ` Michael Ellerman
2023-10-20 14:15 ` Hari Bathini [this message]
2023-10-20 14:15 ` Hari Bathini
2023-10-16 12:07 ` [PATCH v6 0/5] powerpc/bpf: use BPF prog pack allocator Daniel Borkmann
2023-10-16 12:07 ` Daniel Borkmann
2023-10-17 6:26 ` Hari Bathini
2023-10-17 6:26 ` Hari Bathini
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=6588d1ed-4df0-5344-9c4a-0dfc10e160d1@linux.ibm.com \
--to=hbathini@linux.ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=daniel@iogearbox.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.ibm.com \
--cc=song@kernel.org \
--cc=songliubraving@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.