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

2024-07-30 Thread Krzysztof Kozlowski
On 29/07/2024 22:18, Danila Tikhonov wrote: > Add Soc ID table entries for Qualcomm SM7325 family. > > Signed-off-by: Danila Tikhonov > --- Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

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

2024-07-30 Thread Krzysztof Kozlowski
On 29/07/2024 22:18, Danila Tikhonov wrote: > 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(+) Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

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

2024-07-30 Thread Krzysztof Kozlowski
On 29/07/2024 22:18, Danila Tikhonov wrote: > 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/ucs

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

2024-07-30 Thread Krzysztof Kozlowski
On 29/07/2024 22:18, Danila Tikhonov wrote: > 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 + Acked-by: Krzysztof Kozlowski

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

2024-07-30 Thread Krzysztof Kozlowski
On 29/07/2024 22:18, Danila Tikhonov wrote: > Add entry for Nothing Technology Limited (https://nl.nothing.tech/) > > Signed-off-by: Danila Tikhonov > --- Acked-by: Krzysztof Kozlowski Best regards, Krzysztof

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

2024-07-30 Thread Krzysztof Kozlowski
On 29/07/2024 22:18, Danila Tikhonov wrote: > From: Eugene Lepshy > > Add device tree for the Nothing Phone 1 (nothing,spacewar) smartphone > which is based on the SM7325 SoC. ... > + > +&i2c2 { > + clock-frequency = <10>; > + status = "okay"; > + > + /* nxp,tfa9873 (EAR speaker

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

2024-07-30 Thread Krzysztof Kozlowski
On 29/07/2024 22:18, Danila Tikhonov wrote: > Nothing Phone 1 (nothing,spacewar) is a smartphone based on the SM7325 > SoC. > > Signed-off-by: Danila Tikhonov Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Unexpected Heap Randomization Behavior in Kernel Version 5.10.216

2024-07-30 Thread Prithivi Raj.S
I have been testing Address Space Layout Randomization (ASLR) functionalities with the kernel.randomize_va_space sysctl parameter. According to the kernel documentation: 0 disables randomization. 1 randomizes the address of mmap base, stack, and VDSO page. 2 randomizes the heap address. However,

[PATCH v4] proc: add config & param to block forcing mem writes

2024-07-30 Thread Adrian Ratiu
This adds a Kconfig option and boot param to allow removing the FOLL_FORCE flag from /proc/pid/mem write calls because it can be abused. The traditional forcing behavior is kept as default because it can break GDB and some other use cases. Previously we tried a more sophisticated approach allowin

[PATCH] net: core: use __counted_by for trailing VLA of struct sock_reuseport

2024-07-30 Thread Dmitry Antipov
According to '__reuseport_alloc()', annotate trailing VLA 'sock' of 'struct sock_reuseport' with '__counted_by()' and use convenient 'struct_size()' to simplify the math used in 'kzalloc()'. Signed-off-by: Dmitry Antipov --- include/net/sock_reuseport.h | 2 +- net/core/sock_reuseport.c| 7 +

Re: Unexpected Heap Randomization Behavior in Kernel Version 5.10.216

2024-07-30 Thread Kees Cook
On Tue, Jul 30, 2024 at 04:45:29PM +0530, Prithivi Raj.S wrote: > I have been testing Address Space Layout Randomization (ASLR) > functionalities with the kernel.randomize_va_space sysctl parameter. > According to the kernel documentation: > > 0 disables randomization. > 1 randomizes the address o

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

2024-07-30 Thread Thorsten Blum
On 29. Jul 2024, at 16:09, Gustavo A. R. Silva wrote: > 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 inc

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

2024-07-30 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. Refactor ext4_expand_inode_array() by assigning count before copying any data using

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

2024-07-30 Thread Kees Cook
On Tue, Jul 30, 2024 at 07:23:04PM +0200, 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. > > Refacto

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

2024-07-30 Thread Gustavo A. R. Silva
On 30/07/24 11:23, 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. Refactor ext4_expand_inode_array() by a

Re: [PATCH] net: core: use __counted_by for trailing VLA of struct sock_reuseport

2024-07-30 Thread Gustavo A. R. Silva
On 30/07/24 10:04, Dmitry Antipov wrote: According to '__reuseport_alloc()', annotate trailing VLA 'sock' of `socks` is a flexible-array member[1], not a VLA[2]. 'struct sock_reuseport' with '__counted_by()' and use convenient 'struct_size()' to simplify the math used in 'kzalloc()'. > Sig

Re: [PATCH] net: core: use __counted_by for trailing VLA of struct sock_reuseport

2024-07-30 Thread Kuniyuki Iwashima
From: Dmitry Antipov Date: Tue, 30 Jul 2024 19:04:49 +0300 > According to '__reuseport_alloc()', annotate trailing VLA 'sock' of > 'struct sock_reuseport' with '__counted_by()' and use convenient > 'struct_size()' to simplify the math used in 'kzalloc()'. > > Signed-off-by: Dmitry Antipov Revie

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

2024-07-30 Thread Rob Herring
On Mon, Jul 29, 2024 at 11:18:07PM +0300, Danila Tikhonov wrote: > 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). Your email header has this: Conte

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

2024-07-30 Thread Thorsten Blum
On 30. Jul 2024, at 20:12, Gustavo A. R. Silva wrote: > On 30/07/24 11:23, 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 comme

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

2024-07-30 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. Refactor ext4_expand_inode_array() by assigning count before copying any data using

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

2024-07-30 Thread Gustavo A. R. Silva
On 30/07/24 14:55, 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. Refactor ext4_expand_inode_array() by a

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

2024-07-30 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. In ext4_expand_inode_array(), use struct_size() instead of offsetof() and remove the

Re: [PATCH v4] proc: add config & param to block forcing mem writes

2024-07-30 Thread Jeff Xu
On Tue, Jul 30, 2024 at 6:25 AM Adrian Ratiu wrote: > > This adds a Kconfig option and boot param to allow removing > the FOLL_FORCE flag from /proc/pid/mem write calls because > it can be abused. > > The traditional forcing behavior is kept as default because > it can break GDB and some other use

Re: [PATCH v4] proc: add config & param to block forcing mem writes

2024-07-30 Thread Linus Torvalds
On Tue, 30 Jul 2024 at 16:09, Jeff Xu wrote: > > > + task = get_proc_task(file_inode(file)); > > + if (task) { > > + ptrace_active = task->ptrace && task->mm == mm && > > task->parent == current; > > Do we need to call "read_lock(&tasklist_lock);"

Re: [PATCH] net: core: use __counted_by for trailing VLA of struct sock_reuseport

2024-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2024 19:04:49 +0300 Dmitry Antipov wrote: > - unsigned int size = sizeof(struct sock_reuseport) + > - sizeof(struct sock *) * max_socks; > - struct sock_reuseport *reuse = kzalloc(size, GFP_ATOMIC); > + struct sock_reuseport *reuse = > + kzal

[PATCH v2] net: core: annotate socks of struct sock_reuseport with __counted_by

2024-07-30 Thread Dmitry Antipov
According to '__reuseport_alloc()', annotate flexible array member 'sock' of 'struct sock_reuseport' with '__counted_by()' and use convenient 'struct_size()' to simplify the math used in 'kzalloc()'. Signed-off-by: Dmitry Antipov --- v2: style (Jakub), title and commit message (Gustavo) adjustmen