From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Thorsten Blum <thorsten.blum@toblux.com>,
linkinjeon@kernel.org, sfrench@samba.org,
senozhatsky@chromium.org, tom@talpey.com
Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] ksmbd: Replace one-element arrays with flexible-array members
Date: Fri, 16 Aug 2024 08:55:06 -0600 [thread overview]
Message-ID: <f94ee92b-90e5-4af8-81a7-998040dac7b1@embeddedor.com> (raw)
In-Reply-To: <20240816135823.87543-1-thorsten.blum@toblux.com>
On 16/08/24 07:58, Thorsten Blum wrote:
> Replace the deprecated one-element arrays with flexible-array members
> in the structs filesystem_attribute_info and filesystem_device_info.
Notice that this also affects the size of the involved structs.
I encourage you to study some of the patches that have previously
addressed similar issues.
Thanks
--
Gustavo
>
> Link: https://github.com/KSPP/linux/issues/79
> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
> ---
> fs/smb/server/smb_common.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/smb/server/smb_common.h b/fs/smb/server/smb_common.h
> index 4a3148b0167f..cc1d6dfe29d5 100644
> --- a/fs/smb/server/smb_common.h
> +++ b/fs/smb/server/smb_common.h
> @@ -213,7 +213,7 @@ struct filesystem_attribute_info {
> __le32 Attributes;
> __le32 MaxPathNameComponentLength;
> __le32 FileSystemNameLen;
> - __le16 FileSystemName[1]; /* do not have to save this - get subset? */
> + __le16 FileSystemName[]; /* do not have to save this - get subset? */
> } __packed;
>
> struct filesystem_device_info {
> @@ -226,7 +226,7 @@ struct filesystem_vol_info {
> __le32 SerialNumber;
> __le32 VolumeLabelSize;
> __le16 Reserved;
> - __le16 VolumeLabel[1];
> + __le16 VolumeLabel[];
> } __packed;
>
> struct filesystem_info {
next prev parent reply other threads:[~2024-08-16 14:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 13:58 Thorsten Blum
2024-08-16 14:55 ` Gustavo A. R. Silva [this message]
2024-08-16 15:43 ` Thorsten Blum
2024-08-18 16:21 Thorsten Blum
2024-08-20 14:11 ` Namjae Jeon
2024-08-20 14:52 ` Tom Talpey
2024-08-20 16:33 ` Thorsten Blum
2024-08-20 18:39 ` Tom Talpey
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=f94ee92b-90e5-4af8-81a7-998040dac7b1@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=sfrench@samba.org \
--cc=thorsten.blum@toblux.com \
--cc=tom@talpey.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
all inboxes | Powered by JetHome®