summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-11 11:49:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-11 11:49:08 -0700
commitd6d3455d8751854e0d1820f14184682e23ac4475 (patch)
tree3107f1b1b6e6a358126d76304bf914f234a0124c
parentf47959816751f02a711aab27cf1c805bd4964819 (diff)
parent3d8cc52db2f86b624308321c58513019f6b21eec (diff)
Merge tag 'landlock-7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux
Pull Landlock fix from Mickaël Salaün: "This fixes a Clang bug by removing an annotation, which was introduced mostly for documentation" * tag 'landlock-7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: landlock: Drop __counted_by from landlock_domain.handled_masks
-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[];
};
};
};