[PATCH] ext4: Annotate struct ext4_xattr_inode_array with __counted_by()

2024-07-29 Thread Thorsten Blum
Add the __counted_by compiler attribute to the flexible array member inodes to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Remove the now obsolete comment on the count field. Signed-off-by: Thorsten Blum --- fs/ext4/xattr.h | 4 ++-- 1 file changed, 2 inser

Re: [PATCH AUTOSEL 6.10 02/16] fs: remove accidental overflow during wraparound check

2024-07-29 Thread Jan Kara
On Sat 27-07-24 20:47:19, Sasha Levin wrote: > From: Justin Stitt > > [ Upstream commit 23cc6ef6fd453b13502caae23130844e7d6ed0fe ] Sasha, this commit is only about silencing false-positive UBSAN warning. Not sure if it is really a stable material...

Re: [PATCH] x86/alternatives: Make FineIBT mode Kconfig selectable

2024-07-29 Thread jvoisin
> Since FineIBT performs checking at the destination, it is weaker against > attacks that can construct arbitrary executable memory contents. As such, > some system builders want to run with FineIBT disabled by default. Allow > the "cfi=kcfi" boot param mode to be selectable through Kconfig via the

Re: [drivers/gpio] Question about `ljca_gpio_config`: misuse of __counted_by

2024-07-29 Thread Gustavo A. R. Silva
Hi all, On 26/07/24 14:07, Linus Walleij wrote: Hi Haoyu, On Wed, Jul 24, 2024 at 11:12 AM Haoyu Li wrote: Dear Linux Developers for GPIO SUBSYSTEM, We are curious about the use of `struct ljca_gpio_packet *packet` in the function `ljca_gpio_config` (https://elixir.bootlin.com/linux/v6.10

Re: [PATCH] ext4: Annotate struct ext4_xattr_inode_array with __counted_by()

2024-07-29 Thread Gustavo A. R. Silva
On 29/07/24 05:04, Thorsten Blum wrote: Add the __counted_by compiler attribute to the flexible array member inodes to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. This change seems to be incomplete. The relationship between `count` and accesses to `inode

[PATCH 02/11] soc: qcom: socinfo: Add Soc IDs for SM7325 family

2024-07-29 Thread Danila Tikhonov
Add Soc ID table entries for Qualcomm SM7325 family. Signed-off-by: Danila Tikhonov --- drivers/soc/qcom/socinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index d7359a235e3c..f4e5f7a62206 100644 --- a/drivers/soc/qcom/socinfo.

[PATCH 00/11] Add Nothing Phone (1) support

2024-07-29 Thread Danila Tikhonov
This series of patches adds support for the Nothing Phone (1), identified as nothing,spacewar. The Nothing Phone (1) is built on the Qualcomm Snapdragon 778G+ (SM7325-AE, also known as yupik). SM7325 is identical to SC7280 just as SM7125 is identical to SC7180, so SM7325 devicetree imports SC7280

[PATCH 03/11] cpufreq: Add SM7325 to cpufreq-dt-platdev blocklist

2024-07-29 Thread Danila Tikhonov
The Qualcomm SM7325 platform uses the qcom-cpufreq-hw driver, so add it to the cpufreq-dt-platdev driver's blocklist. Signed-off-by: Danila Tikhonov --- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufre

[PATCH 04/11] soc: qcom: pd_mapper: Add SM7325 compatible

2024-07-29 Thread Danila Tikhonov
The Qualcomm SM7325 platform is identical to SC7280, so add compatibility leading to SC7280. Signed-off-by: Danila Tikhonov --- drivers/soc/qcom/qcom_pd_mapper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/qcom/qcom_pd_mapper.c b/drivers/soc/qcom/qcom_pd_mapper.c index a4c00

[PATCH 05/11] dt-bindings: soc: qcom: qcom,pmic-glink: Document SM7325 compatible

2024-07-29 Thread Danila Tikhonov
Document the SM7325 compatible used to describe the pmic glink on this platform. Signed-off-by: Danila Tikhonov --- Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml

[PATCH 07/11] dt-bindings: arm: cpus: Add qcom kryo670 compatible

2024-07-29 Thread Danila Tikhonov
The Qualcomm Snapdragon 778G/778G+/780G/782G uses CPUs named Kryo 670. Add the compatible string in the documentation. Signed-off-by: Danila Tikhonov --- Documentation/devicetree/bindings/arm/cpus.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/cpus

[PATCH 09/11] dt-bindings: vendor-prefixes: Add Nothing Technology Limited

2024-07-29 Thread Danila Tikhonov
Add entry for Nothing Technology Limited (https://nl.nothing.tech/) Signed-off-by: Danila Tikhonov --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/b

[PATCH 08/11] arm64: dts: qcom: Add SM7325 device tree

2024-07-29 Thread Danila Tikhonov
From: Eugene Lepshy The Snapdragon 778G (SM7325) / 778G+ (SM7325-AE) / 782G (SM7325-AF) is software-wise very similar to the Snapdragon 7c+ Gen 3 (SC7280). It uses the Kryo670. Signed-off-by: Eugene Lepshy Co-developed-by: Danila Tikhonov Signed-off-by: Danila Tikhonov --- arch/arm64/boot/d

[PATCH 10/11] dt-bindings: arm: qcom: Add SM7325 Nothing Phone 1

2024-07-29 Thread Danila Tikhonov
Nothing Phone 1 (nothing,spacewar) is a smartphone based on the SM7325 SoC. Signed-off-by: Danila Tikhonov --- Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bin

[PATCH 11/11] arm64: dts: qcom: sm7325: Add device-tree for Nothing Phone 1

2024-07-29 Thread Danila Tikhonov
From: Eugene Lepshy Add device tree for the Nothing Phone 1 (nothing,spacewar) smartphone which is based on the SM7325 SoC. Supported features are, as of now: * USB & UFS * Debug UART * Display via SimpleFB * Power & volume buttons * PMIC GLink * Remoteprocs (ADSP, CDSP, MPSS, WPSS) * WiFi & Blu

[PATCH 06/11] usb: typec: ucsi: Add qcom,sm7325-pmic-glink as needing PDOS quirk

2024-07-29 Thread Danila Tikhonov
The SM7325 Linux Android firmware needs this workaround as well. Add it to the list. Signed-off-by: Danila Tikhonov --- drivers/usb/typec/ucsi/ucsi_glink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c index 16c3284

[PATCH 01/11] dt-bindings: arm: qcom,ids: Add IDs for SM7325 family

2024-07-29 Thread Danila Tikhonov
Add Qualcomm SM7325/SM7325P (yupik) SoC IDs. Signed-off-by: Danila Tikhonov --- include/dt-bindings/arm/qcom,ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dt-bindings/arm/qcom,ids.h b/include/dt-bindings/arm/qcom,ids.h index d6c9e9472121..a4315872049e 100644 --- a/include/

[PATCH RESEND v6] arm64: dts: qcom: msm8939-longcheer-l9100: Add rear flash

2024-07-29 Thread André Apitzsch via B4 Relay
From: André Apitzsch The phone has a Silergy SY7802 flash LED controller. Reviewed-by: Konrad Dybcio Signed-off-by: André Apitzsch --- 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 ex

Re: [PATCH 06/11] usb: typec: ucsi: Add qcom,sm7325-pmic-glink as needing PDOS quirk

2024-07-29 Thread Dmitry Baryshkov
On Mon, Jul 29, 2024 at 11:18:13PM GMT, Danila Tikhonov wrote: > The SM7325 Linux Android firmware needs this workaround as well. Add it > to the list. Which one? quirk_sc8280xp enables two workardounds: one for the firmware crash on GET_PDOS command and another one for the empty PDOs being return

Re: [PATCH 03/11] cpufreq: Add SM7325 to cpufreq-dt-platdev blocklist

2024-07-29 Thread Dmitry Baryshkov
On Mon, Jul 29, 2024 at 11:18:10PM GMT, Danila Tikhonov wrote: > The Qualcomm SM7325 platform uses the qcom-cpufreq-hw driver, so add > it to the cpufreq-dt-platdev driver's blocklist. > > Signed-off-by: Danila Tikhonov > --- > drivers/cpufreq/cpufreq-dt-platdev.c | 1 + > 1 file changed, 1 inse

Re: [PATCH 04/11] soc: qcom: pd_mapper: Add SM7325 compatible

2024-07-29 Thread Dmitry Baryshkov
On Mon, Jul 29, 2024 at 11:18:11PM GMT, Danila Tikhonov wrote: > The Qualcomm SM7325 platform is identical to SC7280, so add > compatibility leading to SC7280. > > Signed-off-by: Danila Tikhonov > --- > drivers/soc/qcom/qcom_pd_mapper.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Dmitr

Re: [PATCH 08/11] arm64: dts: qcom: Add SM7325 device tree

2024-07-29 Thread Dmitry Baryshkov
On Mon, Jul 29, 2024 at 11:18:15PM GMT, Danila Tikhonov wrote: > From: Eugene Lepshy > > The Snapdragon 778G (SM7325) / 778G+ (SM7325-AE) / 782G (SM7325-AF) > is software-wise very similar to the Snapdragon 7c+ Gen 3 (SC7280). > > It uses the Kryo670. > > Signed-off-by: Eugene Lepshy > Co-deve

Re: [PATCH] x86/alternatives: Make FineIBT mode Kconfig selectable

2024-07-29 Thread Kees Cook
On Mon, Jul 29, 2024 at 02:35:02PM +0200, jvoisin wrote: > > Since FineIBT performs checking at the destination, it is weaker against > > attacks that can construct arbitrary executable memory contents. As such, > > some system builders want to run with FineIBT disabled by default. Allow > > the "c

Re: [PATCH] ext4: Annotate struct ext4_xattr_inode_array with __counted_by()

2024-07-29 Thread yebin (H)
On 2024/7/29 19:04, Thorsten Blum wrote: Add the __counted_by compiler attribute to the flexible array member inodes to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Remove the now obsolete comment on the count field. Signed-off-by: Thorsten Blum --- fs