Re: [PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Song Liu
; drivers/infiniband/core/ucma.c| 2 +- > drivers/macintosh/mac_hid.c | 2 +- > drivers/md/md.c | 2 +- For md bits: Reviewed-by: Song Liu Thanks, Song [...]

Re: [PATCH] md/md-multipath: Convert "struct mpconf" to flexible array

2023-12-11 Thread Song Liu
Hi Christoph, On Mon, Dec 11, 2023 at 9:46 PM Christoph Hellwig wrote: > > On Fri, Dec 08, 2023 at 10:11:10AM -0800, Song Liu wrote: > > We marked it as deprecated about 2.5 years ago. But to be honest, > > I currently don't have a plan to remove it. I guess I should star

Re: [PATCH] md/md-multipath: Convert "struct mpconf" to flexible array

2023-12-08 Thread Song Liu
On Fri, Dec 8, 2023 at 9:27 AM Kees Cook wrote: > > On Thu, Dec 07, 2023 at 09:33:17PM -0800, Song Liu wrote: > > On Mon, Dec 4, 2023 at 2:20 PM Kees Cook wrote: > > > > > > On Sun, Dec 03, 2023 at 08:48:06PM +0100, Christophe JAILLET wrote: > > > > The

Re: [PATCH] md/md-multipath: Convert "struct mpconf" to flexible array

2023-12-07 Thread Song Liu
On Mon, Dec 4, 2023 at 2:20 PM Kees Cook wrote: > > On Sun, Dec 03, 2023 at 08:48:06PM +0100, Christophe JAILLET wrote: > > The 'multipaths' field of 'struct mpconf' can be declared as a flexible > > array. > > > > The advantages are: > >- 1 less indirection when accessing to the 'multipaths'

Re: [PATCH] md/md-linear: Annotate struct linear_conf with __counted_by

2023-09-29 Thread Song Liu
On Fri, Sep 29, 2023 at 12:21 PM Kees Cook wrote: > > On Fri, 15 Sep 2023 13:03:28 -0700, Kees Cook wrote: > > Prepare for the coming implementation by GCC and Clang of the __counted_by > > attribute. Flexible array members annotated with __counted_by can have > > their accesses bounds-checked at

Re: [PATCH] md: replace deprecated strncpy with memcpy

2023-09-26 Thread Song Liu
On Mon, Sep 25, 2023 at 11:22 AM Kees Cook wrote: > [...] > > > > So really, all these instances have precisely calculated lengths and > > purposeful NUL-termination so we can just use memcpy to remove ambiguity > > surrounding strncpy. > > > > Link: > > https://www.kernel.org/doc/html/latest/pro

Re: [PATCH] md/md-linear: Annotate struct linear_conf with __counted_by

2023-09-22 Thread Song Liu
he element count member must be set before accessing > > the annotated flexible array member, move its initialization earlier. > > > > [1] > > https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > > > Cc: Song Liu > > Cc: linu