Commit 6f9ccdad authored by Thorsten Blum's avatar Thorsten Blum Committed by Miklos Szeredi
Browse files

ovl: Annotate struct ovl_entry with __counted_by()



Add the __counted_by() compiler attribute to the flexible array member
'__lowerstack' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS
and CONFIG_FORTIFY_SOURCE.

Signed-off-by: default avatarThorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 7314166e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ struct ovl_path {

struct ovl_entry {
	unsigned int __numlower;
	struct ovl_path __lowerstack[];
	struct ovl_path __lowerstack[] __counted_by(__numlower);
};

/* private information held for overlayfs's superblock */