Re: [PATCH] dmaengine: stm32-dma3: Set lli_size after allocation

2024-08-05 Thread Vinod Koul
On Tue, 16 Jul 2024 14:38:33 -0700, Kees Cook wrote: > With the new __counted_by annotation, the "lli_size" variable needs to > valid for accesses to the "lli" array. This requirement is not met in > stm32_dma3_chan_desc_alloc(), since "lli_size" starts at "0", so "lli" > index "0" will not be co

Re: [PATCH] dmaengine: stm32-dma3: Set lli_size after allocation

2024-07-16 Thread Gustavo A. R. Silva
On 16/07/24 15:38, Kees Cook wrote: With the new __counted_by annotation, the "lli_size" variable needs to valid for accesses to the "lli" array. This requirement is not met in stm32_dma3_chan_desc_alloc(), since "lli_size" starts at "0", so "lli" index "0" will not be considered valid during

[PATCH] dmaengine: stm32-dma3: Set lli_size after allocation

2024-07-16 Thread Kees Cook
With the new __counted_by annotation, the "lli_size" variable needs to valid for accesses to the "lli" array. This requirement is not met in stm32_dma3_chan_desc_alloc(), since "lli_size" starts at "0", so "lli" index "0" will not be considered valid during the initialization for loop. Fix this by