diff options
author | Thorsten Blum <thorsten.blum@toblux.com> | 2024-08-23 14:47:05 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-08-30 04:28:36 +0300 |
commit | 8d8d244726c8436c50f84092616c92bf551ea89a (patch) | |
tree | cbf109cf82a8c3724b586197c9e83abf51de5066 | |
parent | 780bdc1ba77646c3461f1988b12c42c60f836d77 (diff) | |
download | linux-8d8d244726c8436c50f84092616c92bf551ea89a.tar.xz |
smb: Annotate struct xattr_smb_acl with __counted_by()
Add the __counted_by compiler attribute to the flexible array member
entries to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE.
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r-- | fs/smb/server/xattr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/server/xattr.h b/fs/smb/server/xattr.h index 16499ca5c82d..fa3e27d6971b 100644 --- a/fs/smb/server/xattr.h +++ b/fs/smb/server/xattr.h @@ -76,7 +76,7 @@ struct xattr_acl_entry { struct xattr_smb_acl { int count; int next; - struct xattr_acl_entry entries[]; + struct xattr_acl_entry entries[] __counted_by(count); }; /* 64bytes hash in xattr_ntacl is computed with sha256 */ |