[PATCH 0/2] spi: spi-qpic-snand: avoid memory corruption

Gabor Juhos posted 2 patches 6 months, 3 weeks ago
There is a newer version of this series
drivers/mtd/nand/qpic_common.c       | 28 ++++++++++++++++++++++++----
drivers/spi/spi-qpic-snand.c         | 16 ++++++++++++++++
include/linux/mtd/nand-qpic-common.h |  8 ++++++++
3 files changed, 48 insertions(+), 4 deletions(-)
[PATCH 0/2] spi: spi-qpic-snand: avoid memory corruption
Posted by Gabor Juhos 6 months, 3 weeks ago
The 'spi-qpic-nand' driver may cause memory corruption under some
circumstances. The first patch in the series changes the driver to
avoid that, whereas the second adds some sanity checks to the common
QPIC code in order to make detecting such errors easier in the future.

Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
Gabor Juhos (2):
      spi: spi-qpic-snand: reallocate BAM transactions
      mtd: nand: qpic_common: prevent out of bounds access of BAM arrays

 drivers/mtd/nand/qpic_common.c       | 28 ++++++++++++++++++++++++----
 drivers/spi/spi-qpic-snand.c         | 16 ++++++++++++++++
 include/linux/mtd/nand-qpic-common.h |  8 ++++++++
 3 files changed, 48 insertions(+), 4 deletions(-)
---
base-commit: b00d6864a4c948529dc6ddd2df76bf175bf27c63
change-id: 20250523-qpic-snand-avoid-mem-corruption-301afabeb0eb

Best regards,
-- 
Gabor Juhos <j4g8y7@gmail.com>
Re: [PATCH 0/2] spi: spi-qpic-snand: avoid memory corruption
Posted by Miquel Raynal 6 months, 3 weeks ago
Hi Gabor,

On 25/05/2025 at 19:05:34 +02, Gabor Juhos <j4g8y7@gmail.com> wrote:

> The 'spi-qpic-nand' driver may cause memory corruption under some
> circumstances. The first patch in the series changes the driver to
> avoid that, whereas the second adds some sanity checks to the common
> QPIC code in order to make detecting such errors easier in the future.
>
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> ---
> Gabor Juhos (2):
>       spi: spi-qpic-snand: reallocate BAM transactions
>       mtd: nand: qpic_common: prevent out of bounds access of BAM
> arrays

Are these two paches related somehow? Or can we apply them in
two different trees? If yes, please send the patches separately, which
eases our work.

Thanks,
Miquèl