Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]

2024-05-30 Thread Greg Kroah-Hartman
On Thu, May 30, 2024 at 08:22:03AM +0200, Jiri Slaby wrote: > > This will be an error in a future compiler version > > [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size] > > 291 | struct mxser_port ports[] __counted_by(nports); > > | ^

Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]

2024-05-30 Thread Jiri Slaby
On 30. 05. 24, 10:12, Gustavo A. R. Silva wrote: On 30/05/24 09:40, Greg Kroah-Hartman wrote: On Thu, May 30, 2024 at 08:22:03AM +0200, Jiri Slaby wrote:   This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size]   291 | struct

Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]

2024-05-30 Thread Jiri Slaby
On 30. 05. 24, 10:33, Jiri Slaby wrote: On 30. 05. 24, 10:12, Gustavo A. R. Silva wrote: On 30/05/24 09:40, Greg Kroah-Hartman wrote: On Thu, May 30, 2024 at 08:22:03AM +0200, Jiri Slaby wrote:   This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-

Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]

2024-05-30 Thread Bill Wendling
On Thu, May 30, 2024 at 1:41 AM Jiri Slaby wrote: > > On 30. 05. 24, 10:33, Jiri Slaby wrote: > > On 30. 05. 24, 10:12, Gustavo A. R. Silva wrote: > >> > >> > >> On 30/05/24 09:40, Greg Kroah-Hartman wrote: > >>> On Thu, May 30, 2024 at 08:22:03AM +0200, Jiri Slaby wrote: > > This will be an

Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]

2024-05-30 Thread Gustavo A. R. Silva
Ah, ok. The assumption is sentinel.data[] shall be unused. This snippet is useful information. Thanks -- Gustavo

Re: [PATCH] codetag: avoid race at alloc_slab_obj_exts

2024-05-30 Thread Vlastimil Babka
On 5/27/24 8:30 PM, Thadeu Lima de Souza Cascardo wrote: > When CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled, the following warning may > be noticed: > > [ 48.299584] [ cut here ] > [ 48.300092] alloc_tag was not set > [ 48.300528] WARNING: CPU: 2 PID: 1361 at include/

Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]

2024-05-30 Thread Gustavo A. R. Silva
On 30/05/24 09:40, Greg Kroah-Hartman wrote: On Thu, May 30, 2024 at 08:22:03AM +0200, Jiri Slaby wrote: This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size] 291 | struct mxser_port ports[] __counted_by(nports);

Re: [PATCH] RDMA/irdma: Annotate flexible array with __counted_by() in struct irdma_qvlist_info

2024-05-30 Thread Leon Romanovsky
On Sun, 19 May 2024 09:02:15 +0200, Christophe JAILLET wrote: > 'num_vectors' is used to count the number of elements in the 'qv_info' > flexible array in "struct irdma_qvlist_info". > > So annotate it with __counted_by() to make it explicit and enable some > additional checks. > > This allocat

Re: [PATCH net-next v2] net: mana: Allow variable size indirection table

2024-05-30 Thread Leon Romanovsky
On Tue, May 28, 2024 at 10:35:55PM -0700, Shradha Gupta wrote: > Allow variable size indirection table allocation in MANA instead > of using a constant value MANA_INDIRECT_TABLE_SIZE. > The size is now derived from the MANA_QUERY_VPORT_CONFIG and the > indirection table is allocated dynamically. >

Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]

2024-05-30 Thread Gustavo A. R. Silva
So we should get rid of all those. Sooner than later. Yes! Please do this. Definitely, we are working on that already[1]. :) -- Gustavo [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=-Wflex-array-member-not-at-end

Re: [PATCH net-next v2] net: mana: Allow variable size indirection table

2024-05-30 Thread Jakub Kicinski
On Tue, 28 May 2024 22:35:55 -0700 Shradha Gupta wrote: > + save_table = kcalloc(apc->indir_table_sz, sizeof(u32), GFP_KERNEL); > + if (!save_table) > + return -ENOMEM; > + > if (rxfh->indir) { > - for (i = 0; i < MANA_INDIRECT_TABLE_SIZE; i++) > +

Re: [PATCH] x86/boot: add prototype for __fortify_panic()

2024-05-30 Thread Nikolay Borisov
On 29.05.24 г. 21:09 ч., Jeff Johnson wrote: As discussed in [1] add a prototype for __fortify_panic() to fix the 'make W=1 C=1' warning: arch/x86/boot/compressed/misc.c:535:6: warning: symbol '__fortify_panic' was not declared. Should it be static? Actually doesn't it make sense to have t

Re: [PATCH net-next v2] net: mana: Allow variable size indirection table

2024-05-30 Thread Jakub Kicinski
On Thu, 30 May 2024 17:37:02 +0300 Leon Romanovsky wrote: > Once you are ok with this patch, let me create shared branch for it. > It is -rc1 and Konstantin already submitted some changes to qp.c > https://lore.kernel.org/all/1716366242-558-1-git-send-email-kotara...@linux.microsoft.com/ > > This

Re: [PATCH net-next v2] net: mana: Allow variable size indirection table

2024-05-30 Thread Leon Romanovsky
On Thu, May 30, 2024 at 08:42:55AM -0700, Jakub Kicinski wrote: > On Thu, 30 May 2024 17:37:02 +0300 Leon Romanovsky wrote: > > Once you are ok with this patch, let me create shared branch for it. > > It is -rc1 and Konstantin already submitted some changes to qp.c > > https://lore.kernel.org/all/1

Re: [PATCH] x86/boot: add prototype for __fortify_panic()

2024-05-30 Thread Jeff Johnson
On 5/30/2024 8:42 AM, Nikolay Borisov wrote: > > > On 29.05.24 г. 21:09 ч., Jeff Johnson wrote: >> As discussed in [1] add a prototype for __fortify_panic() to fix the >> 'make W=1 C=1' warning: >> >> arch/x86/boot/compressed/misc.c:535:6: warning: symbol '__fortify_panic' was >> not declared. S

Re: [PATCH] x86/boot: add prototype for __fortify_panic()

2024-05-30 Thread Borislav Petkov
On May 30, 2024 6:23:36 PM GMT+02:00, Jeff Johnson wrote: >On 5/30/2024 8:42 AM, Nikolay Borisov wrote: >> >> >> On 29.05.24 г. 21:09 ч., Jeff Johnson wrote: >>> As discussed in [1] add a prototype for __fortify_panic() to fix the >>> 'make W=1 C=1' warning: >>> >>> arch/x86/boot/compressed/mis

Re: [PATCH] nvmet-fc: Remove __counted_by from nvmet_fc_tgt_queue.fod[]

2024-05-30 Thread Nathan Chancellor
Hi Jiri, On Thu, May 30, 2024 at 08:41:18AM +0200, Jiri Slaby wrote: > On 29. 05. 24, 23:42, Nathan Chancellor wrote: > >drivers/nvme/target/fc.c:151:2: error: 'counted_by' should not be > > applied to an array with element of unknown size because 'struct > > nvmet_fc_fcp_iod' is a struct ty

Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]

2024-05-30 Thread Nathan Chancellor
On Thu, May 30, 2024 at 09:40:13AM +0200, Greg Kroah-Hartman wrote: > On Thu, May 30, 2024 at 08:22:03AM +0200, Jiri Slaby wrote: > > > This will be an error in a future compiler version > > > [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size] > > > 291 | struct mxser_port po