[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250501185108.203158-1-mmpgouride@gmail.com>
Date: Fri, 2 May 2025 02:51:08 +0800
From: Alan Huang <mmpgouride@...il.com>
To: kent.overstreet@...ux.dev,
kees@...nel.org,
gustavoars@...nel.org,
thorsten.blum@...lux.com
Cc: linux-bcachefs@...r.kernel.org,
linux-hardening@...r.kernel.org,
Alan Huang <mmpgouride@...il.com>
Subject: [PATCH] bcachefs: Add a comment to clarify the removal of __counted_by
Signed-off-by: Alan Huang <mmpgouride@...il.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
Powered by blists - more mailing lists