Re: [PATCH v2] ksmbd: Annotate struct copychunk_ioctl_req with __counted_by_le()

2024-09-27 Thread Namjae Jeon
On Wed, Sep 25, 2024 at 6:10 PM Thorsten Blum wrote: > > Add the __counted_by_le compiler attribute to the flexible array member > Chunks to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and > CONFIG_FORTIFY_SOURCE. > > Change the data type of the flexible array member Chunks from __u8[]

Re: [PATCH v2] ksmbd: Replace one-element arrays with flexible-array members

2024-09-19 Thread Namjae Jeon
On Thu, Sep 19, 2024 at 6:12 PM Thorsten Blum wrote: > > Hi Namjae, > > On 22. Aug 2024, at 14:01, Namjae Jeon wrote: > > On Wed, Aug 21, 2024 at 4:15 AM Thorsten Blum > > wrote: > >> > >> Replace the deprecated one-element arrays with

Re: [PATCH] smb: Annotate struct xattr_smb_acl with __counted_by()

2024-08-24 Thread Namjae Jeon
On Fri, Aug 23, 2024 at 8:48 PM Thorsten Blum wrote: > > Add the __counted_by compiler attribute to the flexible array member > entries to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and > CONFIG_FORTIFY_SOURCE. > > Signed-off-by: Thorsten Blum Applied it to #ksmbd-for-next-next. Thank

Re: [PATCH v2] ksmbd: Replace one-element arrays with flexible-array members

2024-08-22 Thread Namjae Jeon
/KSPP/linux/issues/79 > Signed-off-by: Thorsten Blum > --- > Changes in v2: > - Use <= instead of < and +1 as suggested by Namjae Jeon and Tom Talpey > - Link to v1: > https://lore.kernel.org/linux-kernel/20240818162136.268325-2-thorsten.b...@toblux.com/ Applied it to #ksmbd-for-next-next. Thanks!

Re: [PATCH] ksmbd: Replace one-element arrays with flexible-array members

2024-08-20 Thread Namjae Jeon
On Mon, Aug 19, 2024 at 1:22 AM Thorsten Blum wrote: > > Replace the deprecated one-element arrays with flexible-array members > in the structs copychunk_ioctl_req and smb2_ea_info_req. > > There are no binary differences after this conversion. > > Link: https://github.com/KSPP/linux/issues/79 > S

Re: [PATCH v2] ksmbd: Replace one-element arrays with flexible-array members

2024-08-16 Thread Namjae Jeon
> > Replace the deprecated one-element arrays with flexible-array members > in the structs filesystem_attribute_info and filesystem_device_info. > > There are no binary differences after this conversion. > > Link: https://github.com/KSPP/linux/issues/79 > Signed-off-by: Thorsten Blum Applied it to

Re: [PATCH][next] smb: smb2pdu.h: Use static_assert() to check struct sizes

2024-08-08 Thread Namjae Jeon
ure, > they are always included within this tagged struct. > > So, we use `static_assert()` to ensure that the memory layout for > both the flexible structure and the tagged struct is the same after > any changes. > > Signed-off-by: Gustavo A. R. Silva Acked-by: Namjae Jeon Thanks!

Re: [PATCH][next] smb: client: Fix struct_group() usage in __packed structs

2024-04-23 Thread Namjae Jeon
} __attribute__((__packed__)) common_attributes; /* > 036 */ > }; /* 036 */ > > ... > > /* size: 109, cachelines: 2, members: 17 */ > /* last cacheline: 45 bytes */ > } __attribute__((__packed__)) FILE_ALL_INFO; > > Fixes: 0015eb6e1238 ("smb: client, common: fix fortify warnings") > Cc: sta...@vger.kernel.org > Signed-off-by: Gustavo A. R. Silva Looks good to me:) Reviewed-by: Namjae Jeon Thanks!