RE: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-06-11 Thread Paweł Kochanowski
Hi Horia and Gaurav, I would like to come back to this topic and check how we can proceed. In my opinion the simple patch I have sent at the beginning is solving a real memory corruption bug, so I would propose to merge it as is. Please let me know if you have other ideas how to solve it (potent

RE: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-04-13 Thread Paweł Kochanowski
Hi, > From: Horia Geanta > Sent: Friday, April 11, 2025 2:29 PM > > On 4/9/2025 7:46 PM, Horia Geanta wrote: > > On 4/9/2025 9:19 AM, Gaurav Jain wrote: > >> Hi Pawel > >> > >>> From: Paweł Kochanowski > >>> > >> 5. The loop in > >>> caam_rng_read is called second time, this time the `priv->des

RE: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-04-11 Thread Paweł Kochanowski
Hi Horia, > From: Horia Geanta > Sent: Wednesday, April 9, 2025 6:47 PM > > On 4/9/2025 9:19 AM, Gaurav Jain wrote: > > Hi Pawel > > > >> From: Paweł Kochanowski > >> > >> Hi Gaurav, > >> > >> What we see is that the jr_enqueue() called by run_descriptor_jr() > >> swaps the endianness of the de

Re: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-04-11 Thread Horia Geanta
On 4/9/2025 7:46 PM, Horia Geanta wrote: > On 4/9/2025 9:19 AM, Gaurav Jain wrote: >> Hi Pawel >> >>> From: Paweł Kochanowski >>> >> 5. The loop in >>> caam_rng_read is called second time, this time the `priv->desc` contain >>> swapped >>> data. >>> >>> Interesting thing is that the job still suc

Re: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-04-09 Thread Horia Geanta
On 4/9/2025 9:19 AM, Gaurav Jain wrote: > Hi Pawel > >> From: Paweł Kochanowski >> >> Hi Gaurav, >> >> What we see is that the jr_enqueue() called by run_descriptor_jr() swaps the >> endianness of the descriptor in place (by modifying the data pointed by >> desc_add): >> >> /* The descrip

RE: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-04-09 Thread Gaurav Jain
Hi Pawel > -Original Message- > From: Paweł Kochanowski > Sent: Tuesday, April 8, 2025 4:30 PM > To: Gaurav Jain ; u-boot@lists.denx.de > Cc: Priyanka Jain ; Gabriel Nesteruk > ; Pankaj Gupta ; Horia Geanta > > Subject: RE: [EXT] [PATCH] crypto: fsl - Fix RN

RE: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-04-09 Thread Paweł Kochanowski
; Gabriel Nesteruk > > ; Pankaj Gupta ; Horia Geanta > > > > Subject: RE: [EXT] [PATCH] crypto: fsl - Fix RNG generation for > > lengths greater than 16 bytes > > > > [You don't often get email from pkochanow...@sii.pl. Learn why this is > > important a

RE: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-04-08 Thread Gaurav Jain
; Gabriel Nesteruk ; Paweł Kochanowski > Subject: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater > than 16 > bytes > > [You don't often get email from pkochanow...@sii.pl. Learn why this is > important > at https://aka.ms/LearnAboutSenderIdentificati

RE: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-04-08 Thread Paweł Kochanowski
- > > From: Pawel Kochanowski > > Sent: Monday, April 7, 2025 6:17 PM > > To: u-boot@lists.denx.de > > Cc: Priyanka Jain ; Gaurav Jain > > ; Gabriel Nesteruk ; Paweł > > Kochanowski > > Subject: [EXT] [PATCH] crypto: fsl - Fix RNG generation for lengths >

[PATCH] crypto: fsl - Fix RNG generation for lengths greater than 16 bytes

2025-04-07 Thread Pawel Kochanowski
From: Gabriel Nesteruk Reinitialize the descriptor for each RNG job, as it may be modified by run_descriptor_jr(). Failing to do so can result in memory corruption when dm_rng_read() is called a second time on NXP devices with CONFIG_SYS_FSL_SEC_BE enabled. Signed-off-by: Gabriel Nesteruk Signe