From: sashiko-bot@kernel.org
To: "Yonghong Song" <yonghong.song@linux.dev>, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 2/3] selftests/bpf: Test enum value relocations within the local enumerator range
Date: Thu, 26 Nov 2026 18:00:31 +0000 [thread overview]
Message-ID: <sashiko-outbox-235985@kernel.org> (raw)
In-Reply-To: <20261126175613.1883881-1-yonghong.song@linux.dev>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] selftests/bpf: non-standard multi-line comment style in
core_reloc_types.h
--
commit 7b2de00cc3d3bd98446d7a82129006ec470a720b
Author: Yonghong Song <yonghong.song@linux.dev>
selftests/bpf: Test enum value relocations within the local enumerator range
This commit adds CO-RE enum value relocation tests for target enum values
that fit within the range of the local enumerator type across 8-byte,
negative, and unpacked 1-byte target enums.
> diff --git a/tools/testing/selftests/bpf/progs/core_reloc_types.h b/tools/testing/selftests/bpf/progs/core_reloc_types.h
> index 6d758e74bd586..116a67fdd1b2e 100644
> --- a/tools/testing/selftests/bpf/progs/core_reloc_types.h
> +++ b/tools/testing/selftests/bpf/progs/core_reloc_types.h
[ ... ]
> @@ -1355,6 +1363,52 @@ struct core_reloc_enumval___err_missing {
> anon_enum___err_missing f2;
> };
>
> +/* 8-byte target enums, whose relocated values fit in the int enumerators of
> + * the local enums
> + */
> +enum named_enum___enum64 {
> + NAMED_ENUM_VAL1___enum64 = 1001,
> + NAMED_ENUM_VAL2___enum64 = 2002,
> + NAMED_ENUM_VAL3___enum64 = 0x300000000ULL,
> +};
> +
> +typedef enum {
> + ANON_ENUM_VAL1___enum64 = 0x11,
> + ANON_ENUM_VAL2___enum64 = 0x22,
> + ANON_ENUM_VAL3___enum64 = 0x300000000ULL,
> +} anon_enum___enum64;
> +
> +struct core_reloc_enumval___enum64 {
> + enum named_enum___enum64 f1;
> + anon_enum___enum64 f2;
> +};
> +
> +/* negative value for an int enumerator */
> +typedef enum {
> + ANON_ENUM_VAL1___negative = -0x10,
> + ANON_ENUM_VAL2___negative = 0x20,
> + ANON_ENUM_VAL3___negative = 0x30,
> +} anon_enum___negative;
> +
> +struct core_reloc_enumval___negative {
> + enum named_enum f1;
> + anon_enum___negative f2;
> +};
> +
> +/* 4-byte target enum with a value out of a byte, for the int enumerators of
> + * the local 1-byte enum
> + */
[Severity: Low]
This isn't a bug, but BPF coding style places the opening /* of multi-line
comments on its own line in these two comments.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126175602.1882988-1-yonghong.song@linux.dev?part=2
next prev parent reply other threads:[~2026-11-26 18:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 17:56 [PATCH bpf-next 0/3] libbpf: Check enum value relocations against the local enumerator type Yonghong Song
2026-11-26 17:56 ` [PATCH bpf-next 1/3] libbpf: Poison an enum value relocation out of the local enumerator range Yonghong Song
2026-11-26 18:36 ` bot+bpf-ci
2026-11-26 19:35 ` Yonghong Song
2026-11-26 20:20 ` Alexei Starovoitov
2026-11-27 7:11 ` Yonghong Song
2026-11-26 17:56 ` [PATCH bpf-next 2/3] selftests/bpf: Test enum value relocations within " Yonghong Song
2026-11-26 18:00 ` sashiko-bot [this message]
2026-11-26 17:56 ` [PATCH bpf-next 3/3] selftests/bpf: Test enum value relocations out of " Yonghong Song
2026-11-26 18:02 ` sashiko-bot
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-235985@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yonghong.song@linux.dev \
/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.