From: Kees Cook <kees@kernel.org>
To: Bill Wendling <morbo@google.com>
Cc: Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
codemender-patching+linux@google.com
Subject: Re: [PATCH] clk: tegra: annotate struct tegra210_clk_emc_provider with __counted_by_ptr
Date: Wed, 23 Sep 2026 00:28:41 -0700 [thread overview]
Message-ID: <202609230028.B4D7FE202@keescook> (raw)
In-Reply-To: <20260922110601.1959213-1-morbo@google.com>
On Tue, Sep 22, 2026 at 11:06:01AM +0000, Bill Wendling wrote:
> Annotate the "configs" pointer field of "struct
> tegra210_clk_emc_provider" with the "__counted_by_ptr" attribute,
> allowing the compiler to perform runtime bounds checking on accesses to
> "configs" based on the value of "num_configs".
>
> The "emc->provider.configs = devm_kcalloc(...)" call uses
> "emc->num_timings" for the number of elements, which is then assigned to
> "emc->provider.num_configs" before any accesses to "configs". The
> "num_configs" field isn't modified after assignment.
Yup, that's the only assignment I can find.
> Cc: codemender-patching+linux@google.com
> Assisted-by: LLM
> Signed-off-by: Bill Wendling <morbo@google.com>
Reviewed-by: Kees Cook <kees@kernel.org>
--
Kees Cook
next prev parent reply other threads:[~2026-09-23 7:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 11:06 [PATCH] clk: tegra: annotate struct tegra210_clk_emc_provider with __counted_by_ptr Bill Wendling
2026-09-23 5:42 ` Gustavo A. R. Silva
2026-09-23 7:28 ` Kees Cook [this message]
2026-09-24 19:24 ` Brian Masney
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=202609230028.B4D7FE202@keescook \
--to=kees@kernel.org \
--cc=bmasney+clk@redhat.com \
--cc=codemender-patching+linux@google.com \
--cc=gustavoars@kernel.org \
--cc=jbrunet+clk@baylibre.com \
--cc=jonathanh@nvidia.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=morbo@google.com \
--cc=sboyd@kernel.org \
--cc=thierry.reding@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.