diff options
| author | Bill Wendling <morbo@google.com> | 2026-09-28 04:45:13 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-28 13:11:36 +0100 |
| commit | 3e71ea6dca1d585692b645aaf3b8cc58f6e5eb35 (patch) | |
| tree | 120ff812f7c897caa6c73c8aa45983e95905fc67 /scripts/Makefile.thinlto | |
| parent | 20b2f7f7562307abc70f932fe97147d175005935 (diff) | |
| download | linux-3e71ea6dca1d585692b645aaf3b8cc58f6e5eb35.tar.gz linux-3e71ea6dca1d585692b645aaf3b8cc58f6e5eb35.zip | |
firmware: cs_dsp: Annotate struct cs_dsp_coeff_ctl with __counted_by_ptr
Annotate the 'cache' pointer member of 'struct cs_dsp_coeff_ctl' with
the '__counted_by_ptr' attribute. This allows the compiler and KASAN
to perform run-time bounds checking on accesses to the 'cache' buffer,
preventing potential out-of-bounds reads or writes.
The 'cache' pointer points to a buffer of size 'len' bytes, allocated
to hold the cached value of a DSP coefficient control. The 'cache' and
'len' are initialized in 'cs_dsp_create_control()'.
Every subsequent access to 'ctl->cache' is strictly validated to
ensure that it lies within the bounds of 'ctl->len'.
Cc: codemender-patching+linux@google.com
Assisted-by: LLM
Signed-off-by: Bill Wendling <morbo@google.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260928044513.1330392-1-morbo@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
