projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7314166
)
ovl: Annotate struct ovl_entry with __counted_by()
author
Thorsten Blum
<thorsten.blum@linux.dev>
Sat, 3 May 2025 13:25:36 +0000
(15:25 +0200)
committer
Miklos Szeredi
<mszeredi@redhat.com>
Mon, 5 May 2025 10:49:20 +0000
(12:49 +0200)
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: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/ovl_entry.h
patch
|
blob
|
blame
|
history
diff --git
a/fs/overlayfs/ovl_entry.h
b/fs/overlayfs/ovl_entry.h
index cb449ab310a7a89aafa0ee04ee7ff6c8141dd7d5..afb7762f873f66c72cc5aa795a51ab22c15106dc 100644
(file)
--- a/
fs/overlayfs/ovl_entry.h
+++ b/
fs/overlayfs/ovl_entry.h
@@
-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 */