BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tobias Philipp" <tphilipp@gmail.com>, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 3/4] bpf: Align devmap values to 8 bytes
Date: Tue, 24 Nov 2026 22:55:45 +0000	[thread overview]
Message-ID: <sashiko-outbox-232175@kernel.org> (raw)
In-Reply-To: <20261124225055.87344-4-tphilipp@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] bpf: non-standard multi-line comment style in struct
  bpf_dtab_netdev
--

commit b6749200cfd19f384e3c763bbc57d732deab6c99
Author: Tobias Philipp <tphilipp@gmail.com>

bpf: Align devmap values to 8 bytes

This commit aligns struct bpf_dtab_netdev::val to 8 bytes so that devmap
values match the verifier's 8-byte map-value alignment assumption and avoid
alignment faults on 64-bit load-acquire instructions.

> diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
> index 1b8f0d7f84552..0ef24e3f9f0c9 100644
> --- a/kernel/bpf/devmap.c
> +++ b/kernel/bpf/devmap.c
> @@ -70,7 +70,10 @@ struct bpf_dtab_netdev {
>  	struct bpf_prog *xdp_prog;
>  	struct rcu_head rcu;
>  	unsigned int idx;
> -	struct bpf_devmap_val val;
> +	/* Returned to BPF programs as the map value, which the verifier
> +	 * assumes to be 8-byte aligned.
> +	 */
> +	struct bpf_devmap_val val __aligned(8);
>  };

[Severity: Low]
This isn't a bug, but BPF multi-line comments place the opening /* on its
own line with the comment text starting on the next line.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261124225055.87344-1-tphilipp@gmail.com?part=3

  reply	other threads:[~2026-11-24 22:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 22:50 [PATCH bpf-next v2 0/4] bpf: Fix 8-byte alignment of map values Tobias Philipp
2026-11-24 22:50 ` [PATCH bpf-next v2 1/4] bpf: Fix alignment of memory allocator objects on 32-bit archs Tobias Philipp
2026-11-24 22:50 ` [PATCH bpf-next v2 2/4] bpf: Align lpm_trie map values to 8 bytes Tobias Philipp
2026-11-24 22:56   ` sashiko-bot
2026-11-24 22:50 ` [PATCH bpf-next v2 3/4] bpf: Align devmap " Tobias Philipp
2026-11-24 22:55   ` sashiko-bot [this message]
2026-11-24 22:50 ` [PATCH bpf-next v2 4/4] selftests/bpf: Check that map values are 8-byte aligned Tobias Philipp

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=sashiko-outbox-232175@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tphilipp@gmail.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