Re: [WARNING] memcpy: detected field-spanning write (size 1005) of single field "&out_cmd->cmd.payload" at drivers/net/wireless/intel/iwlegacy/common.c:3173 (size 320)

2024-05-20 Thread Stanislaw Gruszka
On Sat, May 18, 2024 at 10:48:08AM -0700, Kees Cook wrote: > On Sat, May 18, 2024 at 11:29:39AM +0200, Stanislaw Gruszka wrote: > > Hi > > > > On Fri, Apr 12, 2024 at 07:48:39PM +0200, Xose Vazquez Perez wrote: > > > Hi, > > > > > > In Fedora kernel 6.8.5-301.fc40.x86_64, dmesg shows: > > > > >

Re: [WARNING] memcpy: detected field-spanning write (size 1005) of single field "&out_cmd->cmd.payload" at drivers/net/wireless/intel/iwlegacy/common.c:3173 (size 320)

2024-05-20 Thread Johannes Berg
> +++ b/drivers/net/wireless/intel/iwlegacy/commands.h > @@ -201,9 +201,6 @@ struct il_cmd_header { >* 15 unsolicited RX or uCode-originated notification >*/ > __le16 sequence; > - > - /* command or response/notification data follows immediately */ > - u8 d

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

2024-05-20 Thread Jan Kara
On Fri 17-05-24 00:29:06, Justin Stitt wrote: > When running syzkaller with the newly reintroduced signed integer > overflow sanitizer we encounter this report: > > UBSAN: signed-integer-overflow in ../fs/read_write.c:91:10 > 9223372036854775807 + 4096 cannot be represented in type 'loff_t' (aka '

Re: [PATCH 1/2] exec: Add KUnit test for bprm_stack_limits()

2024-05-20 Thread kernel test robot
Hi Kees, kernel test robot noticed the following build errors: [auto build test ERROR on kees/for-next/execve] [also build test ERROR on kees/for-next/pstore kees/for-next/kspp brauner-vfs/vfs.all linus/master v6.9 next-20240520] [If your patch is applied to the wrong git tree, kindly drop us a

RE: [PATCH] RDMA/irdma: Annotate flexible array with __counted_by() in struct irdma_qvlist_info

2024-05-20 Thread Saleem, Shiraz
> Subject: [PATCH] RDMA/irdma: Annotate flexible array with __counted_by() in > struct irdma_qvlist_info > > 'num_vectors' is used to count the number of elements in the 'qv_info' > flexible array in "struct irdma_qvlist_info". > > So annotate it with __counted_by() to make it explicit and enable

Re: [WARNING] memcpy: detected field-spanning write (size 1005) of single field "&out_cmd->cmd.payload" at drivers/net/wireless/intel/iwlegacy/common.c:3173 (size 320)

2024-05-20 Thread Stanislaw Gruszka
On Mon, May 20, 2024 at 01:45:37PM +0200, Johannes Berg wrote: > > > +++ b/drivers/net/wireless/intel/iwlegacy/commands.h > > @@ -201,9 +201,6 @@ struct il_cmd_header { > > * 15 unsolicited RX or uCode-originated notification > > */ > > __le16 sequence; > > - > > - /* com

Re: [WARNING] memcpy: detected field-spanning write (size 1005) of single field "&out_cmd->cmd.payload" at drivers/net/wireless/intel/iwlegacy/common.c:3173 (size 320)

2024-05-20 Thread Johannes Berg
On Mon, 2024-05-20 at 17:08 +0200, Stanislaw Gruszka wrote: > > > > I don't think this is right, now the raw comes after > > DEF_CMD_PAYLOAD_SIZE? You want it to be a union with payload, I'd think. > > Not sure if I understand. I think we have union with payload with > the patch. The structure l

Re: [PATCH 1/2] exec: Add KUnit test for bprm_stack_limits()

2024-05-20 Thread kernel test robot
Hi Kees, kernel test robot noticed the following build errors: [auto build test ERROR on kees/for-next/execve] [also build test ERROR on kees/for-next/pstore kees/for-next/kspp brauner-vfs/vfs.all linus/master vfs-idmapping/for-next v6.9 next-20240520] [If your patch is applied to the wrong git

[PATCH v3 00/12] Introduce STM32 DMA3 support

2024-05-20 Thread Amelie Delaunay
STM32 DMA3 is a direct memory access controller with different features depending on its hardware configuration. It is either called LPDMA (Low Power), GPDMA (General Purpose) or HPDMA (High Performance), and it can be found in new STM32 MCUs and MPUs. In STM32MP25 SoC [1], 3 HPDMAs and 1 LPDMA ar

[PATCH v3 03/12] MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation

2024-05-20 Thread Amelie Delaunay
Add an entry to make myself a maintainer of STM32 DMA controllers drivers and documentation. Signed-off-by: Amelie Delaunay --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index cfc11cc17564..0462e61ea488 100644 --- a/MAINTAINERS +++ b/MAINT

[PATCH v3 02/12] dmaengine: stm32: New directory for STM32 DMA controllers drivers

2024-05-20 Thread Amelie Delaunay
Gather the STM32 DMA controllers under drivers/dma/stm32/ Signed-off-by: Amelie Delaunay --- drivers/dma/Kconfig| 34 ++- drivers/dma/Makefile | 4 +-- drivers/dma/stm32/Kconfig | 37 ++ drivers/dma/s

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

2024-05-20 Thread Amelie Delaunay
On 5/17/24 16:57, Frank Li wrote: On Fri, May 17, 2024 at 11:42:17AM +0200, Amelie Delaunay wrote: On 5/16/24 19:09, Frank Li wrote: On Thu, May 16, 2024 at 05:25:58PM +0200, Amelie Delaunay wrote: On 5/15/24 20:56, Frank Li wrote: On Tue, Apr 23, 2024 at 02:32:55PM +0200, Amelie Delaunay

[PATCH v3 01/12] dt-bindings: dma: New directory for STM32 DMA controllers bindings

2024-05-20 Thread Amelie Delaunay
Gather the STM32 DMA controllers bindings under ./dma/stm32/. Then fix reference to old path in spi/st,stm32-spi.yaml: update the dmas property description by referring to all STM32 DMA controllers bindings. Acked-by: Rob Herring (Arm) Signed-off-by: Amelie Delaunay --- v3: - add Rob's Acked-by

Re: [PATCH v3 00/12] Introduce STM32 DMA3 support

2024-05-20 Thread Amelie Delaunay
Drop this incomplete series, issue with mail server. On 5/20/24 17:42, Amelie Delaunay wrote: STM32 DMA3 is a direct memory access controller with different features depending on its hardware configuration. It is either called LPDMA (Low Power), GPDMA (General Purpose) or HPDMA (High Performance

[PATCH v3 03/12] MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation

2024-05-20 Thread Amelie Delaunay
Add an entry to make myself a maintainer of STM32 DMA controllers drivers and documentation. Signed-off-by: Amelie Delaunay --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index cfc11cc17564..0462e61ea488 100644 --- a/MAINTAINERS +++ b/MAINT

[PATCH v3 00/12] Introduce STM32 DMA3 support

2024-05-20 Thread Amelie Delaunay
STM32 DMA3 is a direct memory access controller with different features depending on its hardware configuration. It is either called LPDMA (Low Power), GPDMA (General Purpose) or HPDMA (High Performance), and it can be found in new STM32 MCUs and MPUs. In STM32MP25 SoC [1], 3 HPDMAs and 1 LPDMA ar

[PATCH v3 02/12] dmaengine: stm32: New directory for STM32 DMA controllers drivers

2024-05-20 Thread Amelie Delaunay
Gather the STM32 DMA controllers under drivers/dma/stm32/ Signed-off-by: Amelie Delaunay --- drivers/dma/Kconfig| 34 ++- drivers/dma/Makefile | 4 +-- drivers/dma/stm32/Kconfig | 37 ++ drivers/dma/s

[PATCH v3 04/12] dt-bindings: dma: Document STM32 DMA3 controller bindings

2024-05-20 Thread Amelie Delaunay
The STM32 DMA3 is a Direct Memory Access controller with different features depending on its hardware configuration. The channels have not the same capabilities, some have a larger FIFO, so their performance is higher. This patch describes STM32 DMA3 bindings, used to select a channel that fits cli

[PATCH v3 01/12] dt-bindings: dma: New directory for STM32 DMA controllers bindings

2024-05-20 Thread Amelie Delaunay
Gather the STM32 DMA controllers bindings under ./dma/stm32/. Then fix reference to old path in spi/st,stm32-spi.yaml: update the dmas property description by referring to all STM32 DMA controllers bindings. Acked-by: Rob Herring (Arm) Signed-off-by: Amelie Delaunay --- v3: - add Rob's Acked-by

[PATCH v3 08/12] dmaengine: stm32-dma3: add device_pause and device_resume ops

2024-05-20 Thread Amelie Delaunay
STM32 DMA3 controller is able to suspend an ongoing transfer (the transfer is suspended after the ongoing burst is flushed to the destination) and resume it from the point it was suspended. No need to reconfigure any register. Signed-off-by: Amelie Delaunay --- drivers/dma/stm32/stm32-dma3.c | 3

[PATCH v3 06/12] dmaengine: stm32-dma3: add DMA_CYCLIC capability

2024-05-20 Thread Amelie Delaunay
Add DMA_CYCLIC capability and relative device_prep_dma_cyclic ops with stm32_dma3_prep_dma_cyclic(). It reuses stm32_dma3_chan_prep_hw() and stm32_dma3_chan_prep_hwdesc() helpers. Signed-off-by: Amelie Delaunay --- drivers/dma/stm32/stm32-dma3.c | 77 ++ 1 file ch

[PATCH v3 07/12] dmaengine: stm32-dma3: add DMA_MEMCPY capability

2024-05-20 Thread Amelie Delaunay
Add DMA_MEMCPY capability and relative device_prep_dma_memcpy ops with stm32_dma3_prep_dma_memcpy(). It reuses stm32_dma3_chan_prep_hw() and stm32_dma3_prep_hwdesc() helpers. As this driver relies on both device_config and of_xlate ops to pre-configure the channel for transfer, add a new helper (st

[PATCH v3 09/12] dmaengine: stm32-dma3: improve residue granularity

2024-05-20 Thread Amelie Delaunay
Implement own device_tx_status ops to compute the residue with a finer granularity, up to bytes. STM32 DMA3 has a bitfield, BNDT, in CxTR1 register which reflects the number of bytes read from the source. It also has a bitfield, FIFOL, in CxSR register which reflects the FIFO level in units of prog

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

2024-05-20 Thread Amelie Delaunay
STM32 DMA3 driver supports the 3 hardware configurations of the STM32 DMA3 controller: - LPDMA (Low Power): 4 channels, no FIFO - GPDMA (General Purpose): 16 channels, FIFO from 8 to 32 bytes - HPDMA (High Performance): 16 channels, FIFO from 8 to 256 bytes Hardware configuration of the channels is

[PATCH v3 12/12] arm64: dts: st: add HPDMA nodes on stm32mp251

2024-05-20 Thread Amelie Delaunay
The High Performance Direct Memory Access (HPDMA) controller is used to perform programmable data transfers between memory-mapped peripherals and memories (or between memories) via linked-lists. There are 3 instances of HPDMA on stm32mp251, using stm32-dma3 driver, with 16 channels per instance an

[PATCH v3 11/12] dmaengine: stm32-dma3: defer channel registration to specify channel name

2024-05-20 Thread Amelie Delaunay
On STM32 DMA3, channels can be reserved, so they are non available for Linux. This non-availability creates a mismatch between dma_chan id and DMA3 channel id. Use dma_async_device_channel_register() to register the channels after controller registration and change the default channel name, so tha

[PATCH v3 10/12] dmaengine: add channel device name to channel registration

2024-05-20 Thread Amelie Delaunay
Channel device name is used for sysfs, but also by dmatest filter function. With dynamic channel registration, channels can be registered after dma controller registration. Users may want to have specific channel names. If name is NULL, the channel name relies on previous implementation, dmachan.

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

2024-05-20 Thread Frank Li
On Mon, May 20, 2024 at 05:49:41PM +0200, Amelie Delaunay wrote: > STM32 DMA3 driver supports the 3 hardware configurations of the STM32 DMA3 > controller: > - LPDMA (Low Power): 4 channels, no FIFO > - GPDMA (General Purpose): 16 channels, FIFO from 8 to 32 bytes > - HPDMA (High Performance): 16 c

Re: [PATCH v3 06/12] dmaengine: stm32-dma3: add DMA_CYCLIC capability

2024-05-20 Thread Frank Li
On Mon, May 20, 2024 at 05:49:42PM +0200, Amelie Delaunay wrote: > Add DMA_CYCLIC capability and relative device_prep_dma_cyclic ops with > stm32_dma3_prep_dma_cyclic(). It reuses stm32_dma3_chan_prep_hw() and > stm32_dma3_chan_prep_hwdesc() helpers. > > Signed-off-by: Amelie Delaunay > --- > dr

Re: [PATCH v2 0/2] Bluetooth: hci_core: Refactor hci_get_dev_list() function

2024-05-20 Thread patchwork-bot+bluetooth
Hello: This series was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz : On Sat, 18 May 2024 10:30:37 +0200 you 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" variab

Re: [PATCH v3 0/2] tty: rfcomm: refactor rfcomm_get_dev_list() function

2024-05-20 Thread patchwork-bot+bluetooth
Hello: This series was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz : On Fri, 17 May 2024 19:21:48 +0200 you 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" variab

Re: [PATCH v2] scsi: sr: fix unintentional arithmetic wraparound

2024-05-20 Thread Martin K. Petersen
On Wed, 08 May 2024 17:22:51 +, Justin Stitt wrote: > Running syzkaller with the newly reintroduced signed integer overflow > sanitizer produces this report: > > [ 65.194362] [ cut here ] > [ 65.197752] UBSAN: signed-integer-overflow in > ../drivers/scsi/sr_ioctl.