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
struct device *parent;
struct fwnode_handle *bus_handle;
size_t num_aliases;
- u16 *aliases;
+ u16 *aliases __counted_by_ptr(num_aliases);
};
/**