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

2024-09-24 Thread Tom Talpey
On 9/24/2024 4:56 PM, Thorsten Blum wrote: On 24. Sep 2024, at 21:33, Thorsten Blum wrote: On 24. Sep 2024, at 20:05, Tom Talpey wrote: On 9/24/2024 6:22 AM, Thorsten Blum wrote: Add the __counted_by_le compiler attribute to the flexible array member Chunks to improve access bounds-checking

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

2024-09-24 Thread Tom Talpey
On 9/24/2024 6:22 AM, 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. Read Chunks[0] after checking that ChunkCount is not 0. Compile-tested only. Signed-off

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

2024-08-20 Thread Tom Talpey
On 8/20/2024 12:33 PM, Thorsten Blum wrote: On 20. Aug 2024, at 16:52, Tom Talpey wrote: On 8/20/2024 10:11 AM, Namjae Jeon wrote: 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

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

2024-08-20 Thread Tom Talpey
On 8/20/2024 10:11 AM, Namjae Jeon wrote: 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://g