* [PATCH] bcachefs: Add a comment to clarify the removal of __counted_by
@ 2025-05-01 18:51 Alan Huang
0 siblings, 0 replies; only message in thread
From: Alan Huang @ 2025-05-01 18:51 UTC (permalink / raw)
To: kent.overstreet, kees, gustavoars, thorsten.blum
Cc: linux-bcachefs, linux-hardening, Alan Huang
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
---
fs/bcachefs/xattr_format.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/bcachefs/xattr_format.h b/fs/bcachefs/xattr_format.h
index e9f810539552..8fe0bb897038 100644
--- a/fs/bcachefs/xattr_format.h
+++ b/fs/bcachefs/xattr_format.h
@@ -13,6 +13,12 @@ struct bch_xattr {
__u8 x_type;
__u8 x_name_len;
__le16 x_val_len;
+ /*
+ * Do not reintroduce __counted_by(x_name_len) here.
+ * There is a value following x_name. __counted_by requires
+ * that the flexible array member contains exactly the
+ * amount of elements that are specified.
+ */
__u8 x_name[];
} __packed __aligned(8);
--
2.48.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-05-01 18:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 18:51 [PATCH] bcachefs: Add a comment to clarify the removal of __counted_by Alan Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox