Re: [PATCH] pinctrl: pinctrl-zynqmp: Use devm_kcalloc() instead of devm_kzalloc()

2024-01-27 Thread Linus Walleij
On Fri, Jan 19, 2024 at 7:19 PM Erick Archer wrote: > As noted in the "Deprecated Interfaces, Language Features, Attributes, > and Conventions" documentation [1], size calculations (especially > multiplication) should not be performed in memory allocator (or similar) > function arguments due to t

Re: [PATCH] wifi: brcmfmac: Adjust n_channels usage for __counted_by

2024-01-27 Thread Gustavo A. R. Silva
On 1/26/24 16:31, Kees Cook wrote: After commit e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by"), the compiler may enforce dynamic array indexing of req->channels to stay below n_channels. As a result, n_channels needs to be increased _before_ accessing

Re: [PATCH] wifi: brcmfmac: Adjust n_channels usage for __counted_by

2024-01-27 Thread Linus Walleij
On Fri, Jan 26, 2024 at 11:31 PM Kees Cook wrote: > After commit e3eac9f32ec0 ("wifi: cfg80211: Annotate struct > cfg80211_scan_request with __counted_by"), the compiler may enforce > dynamic array indexing of req->channels to stay below n_channels. As a > result, n_channels needs to be increased

RE: [GIT PULL] Enable -Wstringop-overflow globally

2024-01-27 Thread David Laight
From: Linus Torvalds > Sent: 26 January 2024 22:36 > > On Fri, 26 Jan 2024 at 14:24, Kees Cook wrote: > > > > I think xe has some other weird problems too. This may be related (under > > allocating): > > > > ../drivers/gpu/drm/xe/xe_vm.c: In function 'xe_vma_create': > > ../drivers/gpu/drm/xe/xe_

RE: [PATCH 1/1] lib/vsprintf: Implement ssprintf() to catch truncated strings

2024-01-27 Thread David Laight
From: Lee Jones > Sent: 25 January 2024 10:36 > On Thu, 25 Jan 2024, Rasmus Villemoes wrote: > > > On 25/01/2024 09.39, Lee Jones wrote: > > > There is an ongoing effort to replace the use of {v}snprintf() variants > > > with safer alternatives - for a more in depth view, see Jon's write-up > > >

Re: [PATCH] wifi: brcmfmac: Adjust n_channels usage for __counted_by

2024-01-27 Thread Hans de Goede
Hi, On 1/26/24 23:31, Kees Cook wrote: > After commit e3eac9f32ec0 ("wifi: cfg80211: Annotate struct > cfg80211_scan_request with __counted_by"), the compiler may enforce > dynamic array indexing of req->channels to stay below n_channels. As a > result, n_channels needs to be increased _before_ ac