lkml.org 
[lkml]   [2023]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] smb3: Replace smb2pdu 1-element arrays with flex-arrays
On Thu, Feb 16, 2023 at 11:25:01PM +0900, Namjae Jeon wrote:
> Hi Kees,
>
> > /* Read flags */
> > @@ -730,7 +730,7 @@ struct smb2_read_rsp {
> > __le32 DataLength;
> > __le32 DataRemaining;
> > __le32 Flags;
> > - __u8 Buffer[1];
> > + __u8 Buffer[];
> > } __packed;
> >
>
> You seem to have missed -1 removal in the code below.

Ah; thanks for this heads-up. I will need a v3.

> ./fs/cifs/smb2ops.c:5632: .read_rsp_size = sizeof(struct
> smb2_read_rsp) - 1,
> ./fs/cifs/smb2ops.c:5654: .read_rsp_size = sizeof(struct
> smb2_read_rsp) - 1,
...

These are interesting -- they don't show up at all in the code. What I
mean is that they're data-only changes. I'll add that to my before/after
build sanity checks.

Thanks!

-Kees

--
Kees Cook

\
 
 \ /
  Last update: 2023-03-27 00:27    [W:2.286 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site