[PATCH 6.7 309/713] pstore: inode: Convert mutex usage to guard(mutex)

2024-03-25 Thread Sasha Levin
From: Kees Cook [ Upstream commit e2eeddefb046dbc771a6fa426f7f98fb25adfe68 ] Replace open-coded mutex handling with cleanup.h guard(mutex) and scoped_guard(mutex, ...). Cc: Guilherme G. Piccoli Cc: Tony Luck Cc: Link: https://lore.kernel.org/r/20231205182622.1329923-2-keesc...@chromium.org S

[PATCH 6.1 173/451] pstore: inode: Convert mutex usage to guard(mutex)

2024-03-25 Thread Sasha Levin
From: Kees Cook [ Upstream commit e2eeddefb046dbc771a6fa426f7f98fb25adfe68 ] Replace open-coded mutex handling with cleanup.h guard(mutex) and scoped_guard(mutex, ...). Cc: Guilherme G. Piccoli Cc: Tony Luck Cc: Link: https://lore.kernel.org/r/20231205182622.1329923-2-keesc...@chromium.org S

[PATCH][next] wifi: ti: Avoid a hundred -Wflex-array-member-not-at-end warnings

2024-03-25 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. Remove unused flexible-array members in multiple structures, and fix a hundred -Wflex-array-member-not-at-end warnings[1] in drivers/wireless/ti/ Link: https://gist.github.com/GustavoARSilva/fbf63c

Re: [PATCH v2][next] net/smc: Avoid -Wflex-array-member-not-at-end warnings

2024-03-25 Thread Wen Gu
On 2024/3/13 01:55, Gustavo A. R. Silva wrote: -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. There are currently a couple of objects in `struct smc_clc_msg_proposal_area` that contain a couple of flexible structures: struct smc_clc_msg_pr

[PATCH][next] wifi: mwl8k: Avoid -Wflex-array-member-not-at-end warnings

2024-03-25 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. There is currently an object (`header`), at the beginning of multiple structures, that contains a flexible structure (`struct mwl8k_cmd_pkt`), for example: struct mwl8k_cmd_get_hw_spec_sta {

Re: [PATCH 00/11] Bump the minimum supported version of LLVM to 13.0.1

2024-03-25 Thread patchwork-bot+linux-riscv
Hello: This series was applied to riscv/linux.git (fixes) by Andrew Morton : On Thu, 25 Jan 2024 15:55:06 -0700 you wrote: > Hi all, > > This series bumps the minimum supported version of LLVM for building the > kernel to 13.0.1. The first patch does the bump and all subsequent > patches clean u

Re: [PATCH v2 0/9] slab: Introduce dedicated bucket allocator

2024-03-25 Thread Vlastimil Babka
On 3/5/24 11:10 AM, Kees Cook wrote: > Hi, > > Repeating the commit logs for patch 4 here: > > Dedicated caches are available For fixed size allocations via > kmem_cache_alloc(), but for dynamically sized allocations there is only > the global kmalloc API's set of buckets available. T

Re: [PATCH v2][next] net/smc: Avoid -Wflex-array-member-not-at-end warnings

2024-03-25 Thread Gustavo A. R. Silva
diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index e55026c7529c..63bb5745ab54 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c @@ -853,8 +853,9 @@ int smc_clc_send_proposal(struct smc_sock *smc, struct smc_init_info *ini)   pclc_smcd = &pclc->pclc_smcd;   pclc_prfx = &pclc-

[PATCH][next] rpmsg: glink: Avoid -Wflex-array-member-not-at-end warnings

2024-03-25 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. There is currently an object (`msg`) in multiple structures that contains a flexible structure (`struct glink_msg`), for example: struct glink_defer_cmd { ... struct glink_msg msg;

[PATCH v4 0/4] Add support for QoS configuration

2024-03-25 Thread Odelu Kukatla
This series adds QoS support for QNOC type device which can be found on SC7280 platform. It adds support for programming priority, priority forward disable and urgency forwarding. This helps in priortizing the traffic originating from different interconnect masters at NOC(Network On Chip). Changes

[PATCH v4 1/4] interconnect: qcom: icc-rpmh: Add QoS configuration support

2024-03-25 Thread Odelu Kukatla
It adds QoS support for QNOC device and includes support for configuring priority, priority forward disable, urgency forwarding. This helps in priortizing the traffic originating from different interconnect masters at NoC(Network On Chip). Signed-off-by: Odelu Kukatla --- drivers/interconnect/qc

[PATCH v4 2/4] interconnect: qcom: sc7280: enable QoS programming

2024-03-25 Thread Odelu Kukatla
Enable QoS for the master ports with predefined values for priority and urgency. Signed-off-by: Odelu Kukatla --- drivers/interconnect/qcom/sc7280.c | 332 + 1 file changed, 332 insertions(+) diff --git a/drivers/interconnect/qcom/sc7280.c b/drivers/interconnect/qco

[PATCH v4 3/4] dt-bindings: interconnect: add clock property to enable QOS on SC7280

2024-03-25 Thread Odelu Kukatla
Added clock property to enable clocks required for accessing qos registers. Signed-off-by: Odelu Kukatla --- .../bindings/interconnect/qcom,sc7280-rpmh.yaml| 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/interconnect/qcom,sc7280-rpmh.yam

[PATCH v4 4/4] arm64: dts: qcom: sc7280: Add clocks for QOS configuration

2024-03-25 Thread Odelu Kukatla
Add handles for required clocks to be enabled for configuring QoS on sc7280. Signed-off-by: Odelu Kukatla --- arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 41f51d32611

Re: [PATCH v2 0/9] slab: Introduce dedicated bucket allocator

2024-03-25 Thread Kees Cook
On Mon, Mar 25, 2024 at 10:03:23AM +0100, Vlastimil Babka wrote: > On 3/5/24 11:10 AM, Kees Cook wrote: > > Hi, > > > > Repeating the commit logs for patch 4 here: > > > > Dedicated caches are available For fixed size allocations via > > kmem_cache_alloc(), but for dynamically sized alloc

Re: [PATCH v2 0/9] slab: Introduce dedicated bucket allocator

2024-03-25 Thread Kent Overstreet
On Mon, Mar 25, 2024 at 10:03:23AM +0100, Vlastimil Babka wrote: > On 3/5/24 11:10 AM, Kees Cook wrote: > > Hi, > > > > Repeating the commit logs for patch 4 here: > > > > Dedicated caches are available For fixed size allocations via > > kmem_cache_alloc(), but for dynamically sized alloc

Re: [PATCH v2 4/9] slab: Introduce kmem_buckets_create()

2024-03-25 Thread Kent Overstreet
On Tue, Mar 05, 2024 at 02:10:20AM -0800, Kees Cook wrote: > Dedicated caches are available For fixed size allocations via > kmem_cache_alloc(), but for dynamically sized allocations there is only > the global kmalloc API's set of buckets available. This means it isn't > possible to separate specif

[PATCH][next] mei: Avoid a bunch of -Wflex-array-member-not-at-end warnings

2024-03-25 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. After commit 40292383640a ("mei: revamp mei extension header structure layout.") it seems that flexible-array member `data` in `struct mei_ext_hdr` is no longer needed. So, remove it and, with that,

Re: [PATCH] x86, relocs: Ignore relocations in .notes section on walk_relocs

2024-03-25 Thread Kees Cook
On Sat, Mar 23, 2024 at 11:38:27AM +0100, Borislav Petkov wrote: > On Fri, Mar 22, 2024 at 04:40:11PM -0700, Kees Cook wrote: > > The earlier patch, commit aaa8736370db ("x86, relocs: Ignore relocations > > in .notes section"), landed via my tree. It was sent out on Feb 22nd > > (v1[1]) and got a s

[PATCH][next] RDMA/cm: Avoid -Wflex-array-member-not-at-end warning

2024-03-25 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. Use the `struct_group_tagged()` helper to separate the flexible array from the rest of the members in flexible `struct cm_work`, and avoid embedding the flexible-array member in `struct cm_timewait_

Re: [PATCH v2 0/9] slab: Introduce dedicated bucket allocator

2024-03-25 Thread Kees Cook
On Mon, Mar 25, 2024 at 03:32:12PM -0400, Kent Overstreet wrote: > On Mon, Mar 25, 2024 at 10:03:23AM +0100, Vlastimil Babka wrote: > > On 3/5/24 11:10 AM, Kees Cook wrote: > > > Hi, > > > > > > Repeating the commit logs for patch 4 here: > > > > > > Dedicated caches are available For fixed s

Re: [PATCH v2 4/9] slab: Introduce kmem_buckets_create()

2024-03-25 Thread Kees Cook
On Mon, Mar 25, 2024 at 03:40:51PM -0400, Kent Overstreet wrote: > On Tue, Mar 05, 2024 at 02:10:20AM -0800, Kees Cook wrote: > > Dedicated caches are available For fixed size allocations via > > kmem_cache_alloc(), but for dynamically sized allocations there is only > > the global kmalloc API's se

Re: [PATCH v2 4/9] slab: Introduce kmem_buckets_create()

2024-03-25 Thread Kent Overstreet
On Mon, Mar 25, 2024 at 01:40:34PM -0700, Kees Cook wrote: > On Mon, Mar 25, 2024 at 03:40:51PM -0400, Kent Overstreet wrote: > > On Tue, Mar 05, 2024 at 02:10:20AM -0800, Kees Cook wrote: > > > Dedicated caches are available For fixed size allocations via > > > kmem_cache_alloc(), but for dynamica

Re: [PATCH][next] RDMA/cm: Avoid -Wflex-array-member-not-at-end warning

2024-03-25 Thread Jason Gunthorpe
On Mon, Mar 25, 2024 at 02:24:07PM -0600, Gustavo A. R. Silva wrote: > -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting > ready to enable it globally. > > Use the `struct_group_tagged()` helper to separate the flexible array > from the rest of the members in flexible `struct

Re: [PATCH v2 4/9] slab: Introduce kmem_buckets_create()

2024-03-25 Thread Kees Cook
On Mon, Mar 25, 2024 at 05:49:49PM -0400, Kent Overstreet wrote: > The codetags are in their own dedicated elf sections already, so if you > put the kmem_buckets in the codetag the entire elf section can be > discarded if it's not in use. Gotcha. Yeah, sounds good. Once codetags and this series la

[PATCH][next] fs: Annotate struct file_handle with __counted_by() and use struct_size()

2024-03-25 Thread Gustavo A. R. Silva
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 run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). W

[PATCH v2][next] fsnotify: Avoid -Wflex-array-member-not-at-end warning

2024-03-25 Thread Gustavo A. R. Silva
Use the `DEFINE_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: fs/notify/fdinfo.c:45:36: warning: structure co

[PATCH][next] firewire: Annotate struct fw_iso_packet with __counted_by()

2024-03-25 Thread Gustavo A. R. Silva
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 run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). S

[PATCH v2][next] ALSA: firewire-lib: Avoid -Wflex-array-member-not-at-end warning

2024-03-25 Thread Gustavo A. R. Silva
Use the `DEFINE_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: sound/firewire/amdtp-stream.c:1184:46: warning:

Re: [PATCH][next] RDMA/cm: Avoid -Wflex-array-member-not-at-end warning

2024-03-25 Thread Gustavo A. R. Silva
On 3/25/24 16:47, Jason Gunthorpe wrote: On Mon, Mar 25, 2024 at 02:24:07PM -0600, Gustavo A. R. Silva wrote: -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. Use the `struct_group_tagged()` helper to separate the flexible array from the res

Re: [PATCH][next] firewire: Annotate struct fw_iso_packet with __counted_by()

2024-03-25 Thread Takashi Sakamoto
Hi, On Mon, Mar 25, 2024 at 07:56:10PM -0600, Gustavo A. R. Silva 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 run-time via CONFIG_UBSAN_BOUNDS (for >

Re: [PATCH v2][next] ALSA: firewire-lib: Avoid -Wflex-array-member-not-at-end warning

2024-03-25 Thread Takashi Sakamoto
Hi, On Mon, Mar 25, 2024 at 07:59:34PM -0600, Gustavo A. R. Silva wrote: > Use the `DEFINE_FLEX()` helper for an on-stack definition of a > flexible structure where the size of the flexible-array member > is known at compile-time, and refactor the rest of the code, > accordingly. > > So, with the