From: sashiko-bot@kernel.org
To: "Tao Yu" <tao1.yu@intel.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH] bpf: normalize arg_track state construction
Date: Thu, 23 Jul 2026 06:11:05 +0000 [thread overview]
Message-ID: <20260723061105.B4DB31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260723055508.1403247-1-tao1.yu@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The helper `arg_track_imprecise()` leaves union bytes uninitialized, failing to fully resolve the KMSAN uninit-value bug.
--
--- Patch [1]: [PATCH] bpf: normalize arg_track state construction ---
commit 66a3cf2cd9455714944be22e6ff4f7ab5a037e76
Author: Tao Yu <tao1.yu@intel.com>
bpf: normalize arg_track state construction
This commit introduces explicit helper functions to normalize arg_track
state construction and address a KMSAN uninitialized-value bug during
liveness analysis.
> diff --git a/kernel/bpf/liveness.c b/kernel/bpf/liveness.c
> index 0aadfbae0acc5..58b979c17c3e4 100644
> --- a/kernel/bpf/liveness.c
> +++ b/kernel/bpf/liveness.c
[ ... ]
> +static struct arg_track arg_track_imprecise(u16 mask)
> +{
> + return (struct arg_track){ .mask = mask, .frame = ARG_IMPRECISE };
> +}
[Severity: Medium]
Does this compound literal leave the remaining 6 bytes of the anonymous union
uninitialized?
Since the union contains both an 8-byte offset array and a 2-byte mask,
explicitly initializing only the mask member leaves the remaining bytes of
the union unspecified.
When this state is returned, such as from fill_from_stack(), and propagated
via arg_track_join() during liveness analysis, won't KMSAN continue to
trigger warnings when the structure is copied by value?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260723055508.1403247-1-tao1.yu@intel.com?part=1
prev parent reply other threads:[~2026-07-23 6:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 5:55 [PATCH] bpf: normalize arg_track state construction Tao Yu
2026-07-23 6:11 ` sashiko-bot [this message]
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=20260723061105.B4DB31F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tao1.yu@intel.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