All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <sdf@google.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf@vger.kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	 martin.lau@kernel.org, eddyz87@gmail.com, kernel-team@fb.com
Subject: Re: [PATCH bpf 1/4] bpf: Clarify bpf_arena comments.
Date: Fri, 15 Mar 2024 10:59:26 -0700	[thread overview]
Message-ID: <ZfSMft5k3NMrTqlK@google.com> (raw)
In-Reply-To: <20240315021834.62988-2-alexei.starovoitov@gmail.com>

On 03/14, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@kernel.org>
> 
> Clarify two bpf_arena comments, use existing SZ_4G #define,
> improve page_cnt check.
> 
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
> ---
>  kernel/bpf/arena.c | 25 ++++++++++++++++++-------
>  1 file changed, 18 insertions(+), 7 deletions(-)
> 
> diff --git a/kernel/bpf/arena.c b/kernel/bpf/arena.c
> index 86571e760dd6..343c3456c8dd 100644
> --- a/kernel/bpf/arena.c
> +++ b/kernel/bpf/arena.c
> @@ -38,7 +38,7 @@
>  
>  /* number of bytes addressable by LDX/STX insn with 16-bit 'off' field */
>  #define GUARD_SZ (1ull << sizeof(((struct bpf_insn *)0)->off) * 8)

Unrelated nit, maybe worth doing the following as well:

#define GUARD_SZ (1ull << sizeof_field(struct bpf_insn, off) * 8)

  reply	other threads:[~2024-03-15 17:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  2:18 [PATCH bpf 0/4] bpf: arena followups Alexei Starovoitov
2024-03-15  2:18 ` [PATCH bpf 1/4] bpf: Clarify bpf_arena comments Alexei Starovoitov
2024-03-15 17:59   ` Stanislav Fomichev [this message]
2024-03-15  2:18 ` [PATCH bpf 2/4] libbpf, selftests/bpf: Adjust libbpf, bpftool, selftests to match LLVM Alexei Starovoitov
2024-03-15  3:57   ` Andrii Nakryiko
2024-03-15  4:44     ` Alexei Starovoitov
2024-03-15  2:18 ` [PATCH bpf 3/4] selftests/bpf: Remove hard coded PAGE_SIZE macro Alexei Starovoitov
2024-03-15  2:18 ` [PATCH bpf 4/4] selftests/bpf: Add arena test case for 4Gbyte corner case Alexei Starovoitov
2024-03-15 18:00 ` [PATCH bpf 0/4] bpf: arena followups Stanislav Fomichev
2024-03-15 21:30 ` patchwork-bot+netdevbpf

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=ZfSMft5k3NMrTqlK@google.com \
    --to=sdf@google.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@kernel.org \
    /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.