diff options
| author | Bill Wendling <morbo@google.com> | 2026-09-22 22:35:38 +0000 |
|---|---|---|
| committer | Christophe Leroy (CS GROUP) <chleroy@kernel.org> | 2026-10-09 10:15:19 +0200 |
| commit | 7aed976c4207bda126f41475eebaf8162b6a0ce4 (patch) | |
| tree | a980a16ec71865dfdb62258b0e96cd8a0c82c6e2 /tools/perf/scripts/python/bin | |
| parent | 4258e8f44462463d618f6b4f24a46b35f36cfd0f (diff) | |
bus: fsl-mc: Annotate fsl_mc_io.portal_virt_addr with __counted_by_ptr
The GCC and Clang compilers provide the __counted_by_ptr attribute,
which is used by KASAN and compiler bounds-checking to detect
out-of-bounds accesses to pointer fields.
In "struct fsl_mc_io", the "portal_virt_addr" pointer points to the MC
command portal virtual address. The size of this allocated portal in
bytes is tracked by the "portal_size" field within the same structure.
Annotate the "portal_virt_addr" pointer field with
"__counted_by_ptr(portal_size)" to enable compiler bounds-checking and
harden against potential out-of-bounds accesses.
Cc: codemender-patching+linux@google.com
Assisted-by: LLM
Signed-off-by: Bill Wendling <morbo@google.com>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20260922223538.2287676-1-morbo@google.com
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
