From: Alan Huang <mmpgouride@gmail.com>
To: kent.overstreet@linux.dev, kees@kernel.org,
gustavoars@kernel.org, thorsten.blum@toblux.com
Cc: linux-bcachefs@vger.kernel.org, linux-hardening@vger.kernel.org,
Alan Huang <mmpgouride@gmail.com>
Subject: [PATCH] bcachefs: Add a comment to clarify the removal of __counted_by
Date: Fri, 2 May 2025 02:51:08 +0800 [thread overview]
Message-ID: <20250501185108.203158-1-mmpgouride@gmail.com> (raw)
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
reply other threads:[~2025-05-01 18:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250501185108.203158-1-mmpgouride@gmail.com \
--to=mmpgouride@gmail.com \
--cc=gustavoars@kernel.org \
--cc=kees@kernel.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=thorsten.blum@toblux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox