[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW5fr5-wz1Q_AvuVCwSJ=byE+wVrKcKXrnJQjshn8Hc-sw@mail.gmail.com>
Date: Mon, 29 Jan 2024 09:21:49 -0800
From: Song Liu <song@...nel.org>
To: Pu Lehui <pulehui@...weicloud.com>
Cc: bpf@...r.kernel.org, linux-riscv@...ts.infradead.org,
netdev@...r.kernel.org, Björn Töpel <bjorn@...nel.org>,
Puranjay Mohan <puranjay12@...il.com>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>, Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>, Luke Nelson <luke.r.nels@...il.com>,
Pu Lehui <pulehui@...wei.com>
Subject: Re: [PATCH bpf-next 1/3] bpf: Use precise image size for struct_ops trampoline
On Tue, Jan 23, 2024 at 2:32 AM Pu Lehui <pulehui@...weicloud.com> wrote:
>
> From: Pu Lehui <pulehui@...wei.com>
>
> For trampoline using bpf_prog_pack, we need to generate a rw_image
> buffer with size of (image_end - image). For regular trampoline, we use
> the precise image size generated by arch_bpf_trampoline_size to allocate
> rw_image. But for struct_ops trampoline, we allocate rw_image directly
> using close to PAGE_SIZE size. We do not need to allocate for that much,
> as the patch size is usually much smaller than PAGE_SIZE. Let's use
> precise image size for it too.
>
> Signed-off-by: Pu Lehui <pulehui@...wei.com>
Acked-by: Song Liu <song@...nel.org>
Powered by blists - more mailing lists