summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2026-06-11 23:55:02 +0200
committerAndi Shyti <andi.shyti@kernel.org>2026-06-17 00:15:09 +0200
commit1e696bc33c30acda698e5e921adcc7f7e61976f7 (patch)
tree7873de628fd64cd4304a75c02f343c5de3646284 /include/linux
parentbb0301f856bfc0ea8192b8d2bd5a79bdc6d3d3f1 (diff)
i2c: atr: annotate i2c_atr_adap_desc->aliases with __counted_by_ptr
Add the __counted_by_ptr() compiler attribute to ->aliases to improve bounds checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20260611215501.464405-3-thorsten.blum@linux.dev
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c-atr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/i2c-atr.h b/include/linux/i2c-atr.h
index 2bb54dc87c8e..b52a7b9ec536 100644
--- a/include/linux/i2c-atr.h
+++ b/include/linux/i2c-atr.h
@@ -71,7 +71,7 @@ struct i2c_atr_adap_desc {
struct device *parent;
struct fwnode_handle *bus_handle;
size_t num_aliases;
- u16 *aliases;
+ u16 *aliases __counted_by_ptr(num_aliases);
};
/**