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

2024-03-27 Thread Krzysztof Kozlowski
On 26/03/2024 21:56, Konrad Dybcio wrote: > On 25.03.2024 7:16 PM, Odelu Kukatla wrote: >> 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 >> inter

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

2024-03-27 Thread Odelu Kukatla
On 3/26/2024 1:00 PM, Krzysztof Kozlowski wrote: > On 25/03/2024 19:16, Odelu Kukatla wrote: >> Added clock property to enable clocks required for accessing >> qos registers. >> >> Signed-off-by: Odelu Kukatla >> --- >> .../bindings/interconnect/qcom,sc7280-rpmh.yaml| 14 ++ >>

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

2024-03-27 Thread Odelu Kukatla
On 3/27/2024 2:14 PM, Krzysztof Kozlowski wrote: > On 26/03/2024 21:56, Konrad Dybcio wrote: >> On 25.03.2024 7:16 PM, Odelu Kukatla wrote: >>> It adds QoS support for QNOC device and includes support for >>> configuring priority, priority forward disable, urgency forwarding. >>> This helps in p

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

2024-03-27 Thread Krzysztof Kozlowski
On 27/03/2024 12:35, Odelu Kukatla wrote: >>> maxItems: 1 >>> >>> + clocks: >>> +minItems: 1 >>> +maxItems: 2 >> >> Why is this flexible? Nothing in commit msg explains that. I gave the >> same talk twice, gave there examples, yet it is not enough... >> > > Clocks property is optio

Re: [PATCH] thermal: intel: int340x_thermal: replace deprecated strncpy with strscpy

2024-03-27 Thread Rafael J. Wysocki
On Tue, Mar 19, 2024 at 5:20 PM srinivas pandruvada wrote: > > On Tue, 2024-03-19 at 12:39 +0100, Rafael J. Wysocki wrote: > > On Mon, Mar 18, 2024 at 11:36 PM Justin Stitt > > wrote: > > > > > > strncpy() is deprecated for use on NUL-terminated destination > > > strings > > > [1] and as such we

Re: [Intel-wired-lan] [PATCH net-next 2/3] idpf: make virtchnl2.h self-contained

2024-03-27 Thread Alexander Lobakin
From: Jakub Kicinski Date: Tue, 26 Mar 2024 21:04:12 -0700 > On Tue, 26 Mar 2024 17:41:15 +0100 Alexander Lobakin wrote: >> To ease maintaining of virtchnl2.h, which already is messy enough, >> make it self-contained by adding missing if_ether.h include due to >> %ETH_ALEN usage. >> At the same t

[PATCH net-next v2 0/3] compiler_types: add Endianness-dependent __counted_by_{le,be}

2024-03-27 Thread Alexander Lobakin
Some structures contain flexible arrays at the end and the counter for them, but the counter has explicit Endianness and thus __counted_by() can't be used directly. To increase test coverage for potential problems without breaking anything, introduce __counted_by_{le,be} defined depending on platf

[PATCH net-next v2 1/3] compiler_types: add Endianness-dependent __counted_by_{le,be}

2024-03-27 Thread Alexander Lobakin
Some structures contain flexible arrays at the end and the counter for them, but the counter has explicit Endianness and thus __counted_by() can't be used directly. To increase test coverage for potential problems without breaking anything, introduce __counted_by_{le,be}() defined depending on pla

[PATCH net-next v2 2/3] idpf: make virtchnl2.h self-contained

2024-03-27 Thread Alexander Lobakin
To ease maintaining of virtchnl2.h, which already is messy enough, make it self-contained by adding missing if_ether.h include due to %ETH_ALEN usage. At the same time, virtchnl2_lan_desc.h is not used anywhere in the file, so move this include to idpf_txrx.h to speed up C preprocessing. Acked-by:

[PATCH net-next v2 3/3] idpf: sprinkle __counted_by{,_le}() in the virtchnl2 header

2024-03-27 Thread Alexander Lobakin
Both virtchnl2.h and its consumer idpf_virtchnl.c are very error-prone. There are 10 structures with flexible arrays at the end, but 9 of them has flex member counter in Little Endian. Make the code a bit more robust by applying __counted_by_le() to those 9. LE platforms is the main target for this

[PATCH v2][next] Bluetooth: L2CAP: Avoid -Wflex-array-member-not-at-end warnings

2024-03-27 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 are currently a couple of objects (`req` and `rsp`), in a couple of structures, that contain flexible structures (`struct l2cap_ecred_conn_req` and `struct l2cap_ecred_conn_rsp`), for example:

Re: [PATCH v2][next] Bluetooth: L2CAP: Avoid -Wflex-array-member-not-at-end warnings

2024-03-27 Thread Luiz Augusto von Dentz
Hi Gustavo, On Wed, Mar 27, 2024 at 12:23 PM 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. Which tree is this base on, I just rebased bluetooth-next on top of net-next but it looks like CI is still failing to

Re: [GIT PULL] execve fixes for v6.9-rc2

2024-03-27 Thread pr-tracker-bot
The pull request you sent on Tue, 26 Mar 2024 15:44:18 -0700: > https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git > tags/execve-v6.9-rc2 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f4a432914af728be2c149934295f337351aa774c Thank you! -- Deet-doot-dot

Re: [PATCH v2][next] Bluetooth: L2CAP: Avoid -Wflex-array-member-not-at-end warnings

2024-03-27 Thread Gustavo A. R. Silva
Hi! On 3/27/24 10:55, Luiz Augusto von Dentz wrote: Hi Gustavo, On Wed, Mar 27, 2024 at 12:23 PM 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. Which tree is this base on, I just rebased bluetooth-next on top o

[PATCH v2][next] wifi: wil6210: Annotate a couple of structs with __counted_by()

2024-03-27 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

Re: [PATCH v2][next] wifi: wil6210: Annotate a couple of structs with __counted_by()

2024-03-27 Thread Jeff Johnson
On 3/27/2024 10:43 AM, 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 > array indexing) and CONF

Re: [PATCH v2][next] wifi: wil6210: Annotate a couple of structs with __counted_by()

2024-03-27 Thread Gustavo A. R. Silva
On 3/27/24 12:26, Jeff Johnson wrote: On 3/27/2024 10:43 AM, 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_

Re: [PATCH v2][next] wifi: wil6210: Annotate a couple of structs with __counted_by()

2024-03-27 Thread Gustavo A. R. Silva
  #define WMI_MAX_PNO_SSID_NUM    (16) @@ -3320,7 +3320,7 @@ struct wmi_set_link_monitor_cmd {   u8 rssi_hyst;   u8 reserved[12];   u8 rssi_thresholds_list_size; -    s8 rssi_thresholds_list[]; +    s8 rssi_thresholds_list[] __counted_by(rssi_thresholds_list_size);   } __packed; t

[PATCH][next] wifi: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid -Wfamnae warning

2024-03-27 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). A

Re: [PATCH v2][next] wifi: wil6210: Annotate a couple of structs with __counted_by()

2024-03-27 Thread Gustavo A. R. Silva
Hi all, Please, drop this. The following patches replaces it: https://lore.kernel.org/linux-hardening/ZgRqjGShTl3y5FFB@neat/ Thanks -- Gustavo On 3/27/24 11:43, Gustavo A. R. Silva wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array mem

Re: [PATCH][next] wifi: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid -Wfamnae warning

2024-03-27 Thread Kalle Valo
"Gustavo A. R. Silva" writes: > 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

[PATCH][next] wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning

2024-03-27 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). A

Re: [PATCH][next] wifi: wil6210: Avoid -Wflex-array-member-not-at-end warning

2024-03-27 Thread Gustavo A. R. Silva
Hi all, Please, drop this. The following patch replaces it: https://lore.kernel.org/linux-hardening/ZgRsn72WkHzfCUsa@neat/ Thanks -- Gustavo On 3/26/24 20:29, Gustavo A. R. Silva wrote: Use the `DEFINE_FLEX()` helper for an on-stack definition of a flexible structure where the size of the fl

Re: [PATCH][next] wifi: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid -Wfamnae warning

2024-03-27 Thread Gustavo A. R. Silva
The subject should being with "wifi: wil6210:", I can fix that. (Didn't review the rest yet.) It seems I got it right in a subsequent patch. :) Thanks, Kalle. -- Gustavo

Re: [PATCH][next] wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning

2024-03-27 Thread Jeff Johnson
On 3/27/2024 11:59 AM, 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 array indexing) and CONF

Re: [PATCH][next] wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning

2024-03-27 Thread Gustavo A. R. Silva
That DEFINE_FLEX() macro takes a bit of time to understand! But I finally digested it so... Reviewed-by: Jeff Johnson Thanks for your time and RB tag! -- Gustavo

Re: [PATCH][next] wifi: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid -Wfamnae warning

2024-03-27 Thread Jeff Johnson
On 3/27/2024 11:50 AM, 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 array indexing) and CONF

Re: [PATCH][next] wifi: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid -Wfamnae warning

2024-03-27 Thread Gustavo A. R. Silva
- memset(&cmd, 0, sizeof(cmd)); - cmd.cmd.scan_type = WMI_ACTIVE_SCAN; - cmd.cmd.num_channels = 0; + memset(cmd, 0, sizeof(*cmd)); Isn't this unnecessary since DEFINE_FLEX() logic "{ .obj.COUNTER = COUNT, }" should result in everything else being zeroed? And if that i

[PATCH v2][next] wifi: wil6210: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid some -Wfamnae warnings

2024-03-27 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). A

[PATCH v2][next] wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning

2024-03-27 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). A

Re: [PATCH v2][next] wifi: wil6210: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid some -Wfamnae warnings

2024-03-27 Thread Jeff Johnson
On 3/27/2024 2:30 PM, 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 array indexing) and CONFI

Re: [PATCH v2][next] wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning

2024-03-27 Thread Jeff Johnson
On 3/27/2024 2:43 PM, 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 array indexing) and CONFI

[PATCH 0/3] Add sy7802 flash led driver

2024-03-27 Thread André Apitzsch via B4 Relay
This series introduces a driver for the Silergy SY7802 charge pump used in the BQ Aquaris M5 and X5 smartphones. The implementation is based on information extracted from downstream as the datasheet provided by a distributor of the hardware didn't include any information about the i2c register des

[PATCH 3/3] arm64: dts: qcom: msm8939-longcheer-l9100: Add rear flash

2024-03-27 Thread André Apitzsch via B4 Relay
From: André Apitzsch The phone has a Silergy SY7802 flash LED controller. Signed-off-by: André Apitzsch --- .../boot/dts/qcom/msm8939-longcheer-l9100.dts | 26 ++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939-longcheer-l9100.dts b/arc

[PATCH 1/3] dt-bindings: leds: Add Silergy SY7802 flash LED

2024-03-27 Thread André Apitzsch via B4 Relay
From: André Apitzsch Document Silergy SY7802 flash LED driver devicetree bindings. Signed-off-by: André Apitzsch --- .../devicetree/bindings/leds/silergy,sy7802.yaml | 96 ++ 1 file changed, 96 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/silergy,sy7

[PATCH 2/3] leds: sy7802: Add support for Silergy SY7802 flash LED controller

2024-03-27 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add support for SY7802 flash LED controller. It can support up to 1.8A flash current. Signed-off-by: André Apitzsch --- drivers/leds/flash/Kconfig | 11 + drivers/leds/flash/Makefile | 1 + drivers/leds/flash/leds-sy7802.c | 532 ++

Re: [PATCH 1/3] dt-bindings: leds: Add Silergy SY7802 flash LED

2024-03-27 Thread Rob Herring
ple.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' Documentation/devicetree/bindings/leds/silergy,sy7802.example.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format' doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devic

Re: __randomize_layout;

2024-03-27 Thread Kees Cook
On March 27, 2024 9:21:59 AM MDT, "Luck, Tony" wrote: >This e-mail is to check you on whether that __randomize_layout can shuffle the >fields inside that nested union/structure. I tried some experiments, and in a >few kernel builds I saw the whole block move to different offsets, but the >orde

Re: [PATCH v2][next] Bluetooth: L2CAP: Avoid -Wflex-array-member-not-at-end warnings

2024-03-27 Thread Kees Cook
On March 27, 2024 11:08:33 AM MDT, "Gustavo A. R. Silva" wrote: >Hi! > >On 3/27/24 10:55, Luiz Augusto von Dentz wrote: >> Hi Gustavo, >> >> On Wed, Mar 27, 2024 at 12:23 PM Gustavo A. R. Silva >> wrote: >>> >>> -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting >>> read

Re: [PATCH v2][next] Bluetooth: L2CAP: Avoid -Wflex-array-member-not-at-end warnings

2024-03-27 Thread Gustavo A. R. Silva
On 27/03/24 23:28, Kees Cook wrote: On March 27, 2024 11:08:33 AM MDT, "Gustavo A. R. Silva" wrote: Hi! On 3/27/24 10:55, Luiz Augusto von Dentz wrote: Hi Gustavo, On Wed, Mar 27, 2024 at 12:23 PM Gustavo A. R. Silva wrote: -Wflex-array-member-not-at-end is coming in GCC-14, and we

[PATCH] gcc-plugins/stackleak: Avoid .head.text section

2024-03-27 Thread Ard Biesheuvel
From: Ard Biesheuvel The .head.text section carries the startup code that runs with the MMU off or with a translation of memory that deviates from the ordinary one. So avoid instrumentation with the stackleak plugin, which already avoids .init.text and .noinstr.text entirely. Fixes: 48204aba801f