Re: [PATCH v8 2/4] arm64: dts: qcom: qcs8550: introduce qcs8550 dtsi

2024-05-13 Thread Tengfei Fan
On 5/14/2024 9:21 AM, Aiqun Yu (Maria) wrote: On 5/14/2024 12:37 AM, Trilok Soni wrote: On 5/13/2024 2:07 AM, Tengfei Fan wrote: QCS8550 is derived from SM8550. The differnece between SM8550 and spellcheck s/difference/difference Typos wil be modified. QCS8550 is QCS8550 doesn't ha

Re: [PATCH] hpfs: Annotate struct hpfs_dirent with __counted_by

2024-05-13 Thread Kees Cook
On Mon, May 13, 2024 at 04:45:54PM -0700, Bill Wendling 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 checking > via CONFIG_UBSAN_BOUNDS (for ar

Re: [PATCH v8 2/4] arm64: dts: qcom: qcs8550: introduce qcs8550 dtsi

2024-05-13 Thread Aiqun Yu (Maria)
On 5/14/2024 12:37 AM, Trilok Soni wrote: > On 5/13/2024 2:07 AM, Tengfei Fan wrote: >> QCS8550 is derived from SM8550. The differnece between SM8550 and > > spellcheck s/difference/difference > >> QCS8550 is QCS8550 doesn't have modem RF system. QCS8550 is mainly used >> in IoT scenarios. >

Re: [PATCH] net: prestera: Add flex arrays to some structs

2024-05-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Sun, 12 May 2024 18:10:27 +0200 you wrote: > The "struct prestera_msg_vtcam_rule_add_req" uses a dynamically sized > set of trailing elements. Specifically, it uses an array of structures > of type "prestera_msg_ac

[PATCH] hpfs: Annotate struct hpfs_dirent with __counted_by

2024-05-13 Thread Bill Wendling
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 checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family funct

Re: [PATCH v2] fs: fix unintentional arithmetic wraparound in offset calculation

2024-05-13 Thread Kees Cook
On Mon, May 13, 2024 at 10:06:59PM +, Justin Stitt wrote: > On Mon, May 13, 2024 at 01:01:57PM -0700, Kees Cook wrote: > > On Thu, May 09, 2024 at 11:42:07PM +, Justin Stitt wrote: > > > fs/read_write.c | 18 +++--- > > > fs/remap_range.c | 12 ++-- > > > 2 files chang

Re: [PATCH 0/3] kbuild: remove many tool coverage variables

2024-05-13 Thread Kees Cook
On Tue, May 14, 2024 at 07:39:31AM +0900, Masahiro Yamada wrote: > On Tue, May 14, 2024 at 3:48 AM Kees Cook wrote: > > I am worried about the use of "guess" and "most", though. :) Before, we > > had some clear opt-out situations, and now it's more of a side-effect. I > > think this is okay, but I

Re: [PATCH 0/3] kbuild: remove many tool coverage variables

2024-05-13 Thread Masahiro Yamada
On Tue, May 14, 2024 at 4:55 AM Marco Elver wrote: > > On Mon, 13 May 2024 at 20:48, Kees Cook wrote: > > > > In the future can you CC the various maintainers of the affected > > tooling? :) > > > > On Mon, May 06, 2024 at 10:35:41PM +0900, Masahiro Yamada wrote: > > > > > > This patch set remove

Re: [PATCH 0/3] kbuild: remove many tool coverage variables

2024-05-13 Thread Masahiro Yamada
On Tue, May 14, 2024 at 3:48 AM Kees Cook wrote: > > In the future can you CC the various maintainers of the affected > tooling? :) Sorry, I was too lazy to add CC for treewide changes like this. Anyway, thanks for adding CC. > On Mon, May 06, 2024 at 10:35:41PM +0900, Masahiro Yamada wrote:

Re: [PATCH v2] fs: fix unintentional arithmetic wraparound in offset calculation

2024-05-13 Thread Justin Stitt
On Mon, May 13, 2024 at 01:01:57PM -0700, Kees Cook wrote: > On Thu, May 09, 2024 at 11:42:07PM +, Justin Stitt wrote: > > fs/read_write.c | 18 +++--- > > fs/remap_range.c | 12 ++-- > > 2 files changed, 17 insertions(+), 13 deletions(-) > > > > diff --git a/fs/read_writ

Re: [GIT PULL] hardening updates for 6.10-rc1

2024-05-13 Thread pr-tracker-bot
The pull request you sent on Sat, 11 May 2024 12:42:39 -0700: > https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git > tags/hardening-6.10-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/87caef42200cd44f8b808ec2f8ac2257f3e0a8c1 Thank you! -- Deet-doot-

Re: [PATCH v2] fs: fix unintentional arithmetic wraparound in offset calculation

2024-05-13 Thread Kees Cook
On Thu, May 09, 2024 at 11:42:07PM +, Justin Stitt wrote: > When running syzkaller with the newly reintroduced signed integer > overflow sanitizer we encounter this report: > > [ 67.995501] UBSAN: signed-integer-overflow in ../fs/read_write.c:91:10 > [ 68.67] 9223372036854775807 + 4096

Re: [PATCH 0/3] kbuild: remove many tool coverage variables

2024-05-13 Thread Marco Elver
On Mon, 13 May 2024 at 20:48, Kees Cook wrote: > > In the future can you CC the various maintainers of the affected > tooling? :) > > On Mon, May 06, 2024 at 10:35:41PM +0900, Masahiro Yamada wrote: > > > > This patch set removes many instances of the following variables: > > > > - OBJECT_FILES_

Re: [PATCH v3] perf/ring_buffer: Prefer struct_size over open coded arithmetic

2024-05-13 Thread Kees Cook
On Sat, May 11, 2024 at 03:24:37PM +0200, Erick Archer wrote: > This is an effort to get rid of all multiplications from allocation > functions in order to prevent integer overflows [1][2]. > > As the "rb" variable is a pointer to "struct perf_buffer" and this > structure ends in a flexible array:

Re: [RFC] Mitigating unexpected arithmetic overflow

2024-05-13 Thread Kees Cook
On Sat, May 11, 2024 at 07:19:49PM +0300, Dan Carpenter wrote: > I'm pretty sure we've tried using a sanitizer before and it had too many > false positives. So your solution is to annotate all the false > positives? That was the plan, yes. Based on current feedback, we'll be taking an even more i

Re: [PATCH] net: prestera: Add flex arrays to some structs

2024-05-13 Thread Kees Cook
On Sun, May 12, 2024 at 06:10:27PM +0200, Erick Archer wrote: > The "struct prestera_msg_vtcam_rule_add_req" uses a dynamically sized > set of trailing elements. Specifically, it uses an array of structures > of type "prestera_msg_acl_action actions_msg". > > The "struct prestera_msg_flood_domain_

Re: [PATCH v2] tty: rfcomm: prefer struct_size over open coded arithmetic

2024-05-13 Thread Kees Cook
On Mon, May 13, 2024 at 07:12:57PM +0200, Erick Archer wrote: > Hi Kees, Jiri and Luiz, > First of all, thanks for the reviews. > > On Mon, May 13, 2024 at 12:29:04PM -0400, Luiz Augusto von Dentz wrote: > > Hi Jiri, Eric, > > > > On Mon, May 13, 2024 at 1:07 AM Jiri Slaby wrote: > > > > > > On

Re: [PATCH 0/3] kbuild: remove many tool coverage variables

2024-05-13 Thread Kees Cook
In the future can you CC the various maintainers of the affected tooling? :) On Mon, May 06, 2024 at 10:35:41PM +0900, Masahiro Yamada wrote: > > This patch set removes many instances of the following variables: > > - OBJECT_FILES_NON_STANDARD > - KASAN_SANITIZE > - UBSAN_SANITIZE > - KC

Re: [RFC] Mitigating unexpected arithmetic overflow

2024-05-13 Thread Kees Cook
On Sun, May 12, 2024 at 09:09:08AM -0700, Linus Torvalds wrote: > unsigned char *p; > u32 val; > > p[0] = val; > p[1] = val >> 8; > p[2] = val >> 16; > p[3] = val >> 24; > > kind of code is both traditional and correct, but obviously drops bits > ve

[PATCH v2] fs: remove accidental overflow during wraparound check

2024-05-13 Thread Justin Stitt
Running syzkaller with the newly enabled signed integer overflow sanitizer produces this report: [ 195.401651] [ cut here ] [ 195.404808] UBSAN: signed-integer-overflow in ../fs/open.c:321:15 [ 195.408739] 9223372036854775807 + 562984447377399 cannot be represented in t

Re: [PATCH] Bluetooth: hci_core: Prefer struct_size over open coded arithmetic

2024-05-13 Thread Erick Archer
Hi Kees and Luiz, First of all, thanks for the reviews. On Mon, May 13, 2024 at 12:31:29PM -0400, Luiz Augusto von Dentz wrote: > Hi Eric, > > On Sun, May 12, 2024 at 11:08 PM Kees Cook wrote: > > > > On Sun, May 12, 2024 at 04:17:06PM +0200, Erick Archer wrote: > > > [...] > > > Also remove the

Re: [PATCH v2] tty: rfcomm: prefer struct_size over open coded arithmetic

2024-05-13 Thread Erick Archer
Hi Kees, Jiri and Luiz, First of all, thanks for the reviews. On Mon, May 13, 2024 at 12:29:04PM -0400, Luiz Augusto von Dentz wrote: > Hi Jiri, Eric, > > On Mon, May 13, 2024 at 1:07 AM Jiri Slaby wrote: > > > > On 12. 05. 24, 13:17, Erick Archer wrote: > > > This is an effort to get rid of all

Re: [PATCH v8 2/4] arm64: dts: qcom: qcs8550: introduce qcs8550 dtsi

2024-05-13 Thread Trilok Soni
On 5/13/2024 2:07 AM, Tengfei Fan wrote: > QCS8550 is derived from SM8550. The differnece between SM8550 and spellcheck s/difference/difference > QCS8550 is QCS8550 doesn't have modem RF system. QCS8550 is mainly used > in IoT scenarios. IoT products and not scenarios. > QCS8550 firmware has

Re: [PATCH] Bluetooth: hci_core: Prefer struct_size over open coded arithmetic

2024-05-13 Thread Luiz Augusto von Dentz
Hi Eric, On Sun, May 12, 2024 at 11:08 PM Kees Cook wrote: > > On Sun, May 12, 2024 at 04:17:06PM +0200, Erick Archer wrote: > > This is an effort to get rid of all multiplications from allocation > > functions in order to prevent integer overflows [1][2]. > > > > As the "dl" variable is a pointe

Re: [PATCH v2] tty: rfcomm: prefer struct_size over open coded arithmetic

2024-05-13 Thread Luiz Augusto von Dentz
Hi Jiri, Eric, On Mon, May 13, 2024 at 1:07 AM Jiri Slaby wrote: > > On 12. 05. 24, 13:17, Erick Archer wrote: > > This is an effort to get rid of all multiplications from allocation > > functions in order to prevent integer overflows [1][2]. > > > > As the "dl" variable is a pointer to "struct r

Re: [PATCH] fs: remove accidental overflow during wraparound check

2024-05-13 Thread Jan Kara
On Thu 09-05-24 15:10:07, Justin Stitt wrote: > On Thu, May 9, 2024 at 8:53 AM Jan Kara wrote: > > > @@ -319,8 +320,12 @@ int vfs_fallocate(struct file *file, int mode, > > > loff_t offset, loff_t len) > > > if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode)) > > > return

Re: [PATCH 05/12] dmaengine: Add STM32 DMA3 support

2024-05-13 Thread Amelie Delaunay
Hi Frank, On 5/7/24 22:26, Frank Li wrote: On Tue, May 07, 2024 at 01:33:31PM +0200, Amelie Delaunay wrote: Hi Vinod, Thanks for the review. On 5/4/24 14:40, Vinod Koul wrote: On 23-04-24, 14:32, Amelie Delaunay wrote: STM32 DMA3 driver supports the 3 hardware configurations of the STM32 DM

[PATCH v8 4/4] arm64: dts: qcom: aim300: add AIM300 AIoT

2024-05-13 Thread Tengfei Fan
Add AIM300 AIoT Carrier board DTS support, including usb, UART, PCIe, I2C functions support. Here is a diagram of AIM300 AIoT Carrie Board and SoM +--+ | AIM300 AIOT Carrier Board| |

[PATCH v8 3/4] arm64: dts: qcom: add base AIM300 dtsi

2024-05-13 Thread Tengfei Fan
AIM300 Series is a highly optimized family of modules designed to support AIoT applications. It integrates QCS8550 SoC, UFS and PMIC chip etc. Here is a diagram of AIM300 SoM: ++ |AIM300 SoM | |

[PATCH v8 2/4] arm64: dts: qcom: qcs8550: introduce qcs8550 dtsi

2024-05-13 Thread Tengfei Fan
QCS8550 is derived from SM8550. The differnece between SM8550 and QCS8550 is QCS8550 doesn't have modem RF system. QCS8550 is mainly used in IoT scenarios. QCS8550 firmware has different memory map with SM8550 firmware. The memory map will be runtime added through bootloader. There are 3 types of r

[PATCH v8 1/4] dt-bindings: arm: qcom: Document QCS8550 SoC and the AIM300 AIoT board

2024-05-13 Thread Tengfei Fan
Document QCS8550 SoC and the AIM300 AIoT board bindings. QCS8550 is derived from SM8550. The difference between SM8550 and QCS8550 is QCS8550 doesn't have modem RF system. QCS8550 is mainly used in IoT scenarios. AIM300 Series is a highly optimized family of modules designed to support AIoT applica

[PATCH v8 0/4] arm64: qcom: add AIM300 AIoT board support

2024-05-13 Thread Tengfei Fan
Add AIM300 AIoT support along with usb, ufs, regulators, serial, PCIe, and PMIC functions. AIM300 Series is a highly optimized family of modules designed to support AIoT applications. It integrates QCS8550 SoC, UFS and PMIC chip etc. Here is a diagram of AIM300 AIoT Carrie Board and SoM +-

Re: [PATCH] net: prestera: Add flex arrays to some structs

2024-05-13 Thread Simon Horman
On Sun, May 12, 2024 at 06:10:27PM +0200, Erick Archer wrote: > The "struct prestera_msg_vtcam_rule_add_req" uses a dynamically sized > set of trailing elements. Specifically, it uses an array of structures > of type "prestera_msg_acl_action actions_msg". > > The "struct prestera_msg_flood_domain_