diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2024-10-18 14:14:21 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-10-22 11:16:59 +0200 |
commit | 8c6e03ffedc5463d1aa1ba89f6ceb082518a3520 (patch) | |
tree | 0ca5dd6c019d96f55cfd7ff9ec1cc0369f1c5460 /fs/iomap | |
parent | acl: Realign struct posix_acl to save 8 bytes (diff) | |
download | linux-8c6e03ffedc5463d1aa1ba89f6ceb082518a3520.tar.xz linux-8c6e03ffedc5463d1aa1ba89f6ceb082518a3520.zip |
acl: Annotate struct posix_acl with __counted_by()
Add the __counted_by compiler attribute to the flexible array member
a_entries to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE.
Use struct_size() to calculate the number of bytes to allocate for new
and cloned acls and remove the local size variables.
Change the posix_acl_alloc() function parameter count from int to
unsigned int to match posix_acl's a_count data type. Add identifier
names to the function definition to silence two checkpatch warnings.
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20241018121426.155247-2-thorsten.blum@linux.dev
Cc: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/iomap')
0 files changed, 0 insertions, 0 deletions