Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mtd: rawnand: sunxi: harden protected OOB handling
@ 2026-08-11  6:01 James Hilliard
  2026-08-11  6:01 ` [PATCH 1/3] mtd: rawnand: sunxi: propagate user-data allocation errors James Hilliard
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: James Hilliard @ 2026-08-11  6:01 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Richard Genoud
  Cc: linux-mtd, linux-arm-kernel, linux-sunxi, linux-kernel,
	James Hilliard

The H6/H616 variable protected-OOB implementation has three related
failure cases around its per-step user-data lengths.

First, propagate failures while allocating the per-step length array.
Then reserve an encodable four-byte first section for the bad block
marker and reject layouts which cannot provide it. Finally, replace the
per-write heap allocation used for BBM compensation with the
controller's bounded 32-byte stack buffer.

These fixes keep the calculated, advertised and programmed OOB layouts
consistent and prevent zero-sized sections from reaching the BBM path.

Assisted-by: OpenAI Codex (gpt-5.6-sol, max)
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
James Hilliard (3):
      mtd: rawnand: sunxi: propagate user-data allocation errors
      mtd: rawnand: sunxi: reserve a full user-data word for BBM
      mtd: rawnand: sunxi: use a stack buffer for BBM randomization

 drivers/mtd/nand/raw/sunxi_nand.c | 32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)
---
base-commit: 15a3cbce32994141252bb4ecfe3ff3a5d22d0b4f
change-id: 20260810-sunxi-nand-protected-oob-fixes-15db4368a8ae

Best regards,
--  
James Hilliard <james.hilliard1@gmail.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-04 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11  6:01 [PATCH 0/3] mtd: rawnand: sunxi: harden protected OOB handling James Hilliard
2026-08-11  6:01 ` [PATCH 1/3] mtd: rawnand: sunxi: propagate user-data allocation errors James Hilliard
2026-08-11  6:02 ` [PATCH 2/3] mtd: rawnand: sunxi: reserve a full user-data word for BBM James Hilliard
2026-08-11  6:02 ` [PATCH 3/3] mtd: rawnand: sunxi: use a stack buffer for BBM randomization James Hilliard
2026-09-04 18:08 ` [PATCH 0/3] mtd: rawnand: sunxi: harden protected OOB handling Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox