summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/landlock/domain.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/security/landlock/domain.h b/security/landlock/domain.h
index caa3d19d2c43..428c1d9890db 100644
--- a/security/landlock/domain.h
+++ b/security/landlock/domain.h
@@ -242,9 +242,14 @@ struct landlock_domain {
* to properly handle merged rulesets without
* overlapping access rights. These layers are set once
* and never changed for the lifetime of the domain.
+ *
+ * Not annotated with __counted_by(num_layers): clang
+ * miscomputes the counter address for a FAM nested in
+ * an anonymous struct within a union, which trips
+ * FORTIFY:
+ * https://github.com/llvm/llvm-project/pull/228309
*/
- struct access_masks
- handled_masks[] __counted_by(num_layers);
+ struct access_masks handled_masks[];
};
};
};