Commit 8d8d2447 authored by Thorsten Blum's avatar Thorsten Blum Committed by Steve French

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: default avatarThorsten Blum <thorsten.blum@toblux.com>
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 780bdc1b
...@@ -76,7 +76,7 @@ struct xattr_acl_entry { ...@@ -76,7 +76,7 @@ struct xattr_acl_entry {
struct xattr_smb_acl { struct xattr_smb_acl {
int count; int count;
int next; int next;
struct xattr_acl_entry entries[]; struct xattr_acl_entry entries[] __counted_by(count);
}; };
/* 64bytes hash in xattr_ntacl is computed with sha256 */ /* 64bytes hash in xattr_ntacl is computed with sha256 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment