lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241226135623.43098-5-mmkurbanov@salutedevices.com>
Date: Thu, 26 Dec 2024 16:55:49 +0300
From: Martin Kurbanov <mmkurbanov@...utedevices.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>, Richard Weinberger
	<richard@....at>, Vignesh Raghavendra <vigneshr@...com>, Ezra Buehler
	<ezra.buehler@...qvarnagroup.com>, Alexey Romanov
	<avromanov@...utedevices.com>, Frieder Schrempf <frieder.schrempf@...tron.de>
CC: <linux-kernel@...r.kernel.org>, <linux-mtd@...ts.infradead.org>,
	<kernel@...utedevices.com>, Martin Kurbanov <mmkurbanov@...utedevices.com>
Subject: [PATCH v3 4/7] mtd: spinand: add start_page to otp layout

The OTP area is divided into two parts: the factory and the user.
In SPI-NAND, it is usually this one OTP region: the first few pages are
allocated to the factory area. Therefore, enter the start_page field,
which indicates from which page the custom OTP region starts.

Signed-off-by: Martin Kurbanov <mmkurbanov@...utedevices.com>
---
 include/linux/mtd/spinand.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
index 19d76057c0444..d6dbb85094283 100644
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -325,9 +325,11 @@ struct spinand_ondie_ecc_conf {
 /**
  * struct spinand_otp_layout - structure to describe the SPI NAND OTP area
  * @npages: number of pages in the OTP
+ * @start_page: start page of the user OTP area.
  */
 struct spinand_otp_layout {
 	unsigned int npages;
+	unsigned int start_page;
 };
 
 /**
@@ -417,10 +419,11 @@ struct spinand_info {
 #define SPINAND_SELECT_TARGET(__func)					\
 	.select_target = __func,
 
-#define SPINAND_OTP_INFO(__npages, __ops)				\
+#define SPINAND_OTP_INFO(__npages, __start_page, __ops)			\
 	.otp = {							\
 		.layout = {						\
 			.npages = __npages,				\
+			.start_page = __start_page,			\
 		},							\
 		.ops = __ops,						\
 	}
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ