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: <CY5PR11MB63661044DCB37577A12B5DF9EDAA2@CY5PR11MB6366.namprd11.prod.outlook.com>
Date: Mon, 7 Apr 2025 12:47:07 +0000
From: "Usyskin, Alexander" <alexander.usyskin@...el.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
CC: Richard Weinberger <richard@....at>, Vignesh Raghavendra
	<vigneshr@...com>, "De Marchi, Lucas" <lucas.demarchi@...el.com>,
	Thomas Hellström <thomas.hellstrom@...ux.intel.com>,
	"Vivi, Rodrigo" <rodrigo.vivi@...el.com>, Maarten Lankhorst
	<maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
	Simona Vetter <simona@...ll.ch>, Jani Nikula <jani.nikula@...ux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>, Tvrtko Ursulin
	<tursulin@...ulin.net>, "Poosa, Karthik" <karthik.poosa@...el.com>, "Abliyev,
 Reuven" <reuven.abliyev@...el.com>, "Weil, Oren jer"
	<oren.jer.weil@...el.com>, "linux-mtd@...ts.infradead.org"
	<linux-mtd@...ts.infradead.org>, "dri-devel@...ts.freedesktop.org"
	<dri-devel@...ts.freedesktop.org>, "intel-gfx@...ts.freedesktop.org"
	<intel-gfx@...ts.freedesktop.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v7 01/12] mtd: core: always create master device

> On 26/03/2025 at 17:26:12 +02, Alexander Usyskin
> <alexander.usyskin@...el.com> wrote:
> 
> > Create master device without partition when
> > CONFIG_MTD_PARTITIONED_MASTER flag is unset.
> >
> > This streamlines device tree and allows to anchor
> > runtime power management on master device in all cases.
> >
> > Signed-off-by: Alexander Usyskin <alexander.usyskin@...el.com>
> 
> I successfully tested it, this patch will be applied at -rc1 to the
> mtd/next tree.
> 
> I was wondering, do you think it would be possible to keep the creation
> of mtd_master and make it a symbolic link to mtdx when
> MTD_PARTITIONED_MASTER=y or when there is no partition? In short, always
> having mtd_masterx, because I fear at some point we'll have problems
> otherwise :-)
> 
> Right now we have:
> 
> - Without partition:
> mtd0 (mtd0ro mtdblock0)
> - With partition and MTD_PARTITIONED_MASTER=n
> mtd0 (mtd0ro mtdblock0)
> mtd_master0
> - With partition and MTD_PARTITIONED_MASTER=y
> mtd0 (mtd0ro mtdblock0) [this is the master]
> mtd1 (mtd1ro mtdblock1)
> 
> I am suggesting:
> - Without partition:
> mtd0 (mtd0ro mtdblock0)
> mtd_master0 -> link to mtd0
> - With partition and MTD_PARTITIONED_MASTER=n
> mtd0 (mtd0ro mtdblock0)
> mtd_master0
> - With partition and MTD_PARTITIONED_MASTER=y
> mtd0 (mtd0ro mtdblock0) [this is the master]
> mtd1 (mtd1ro mtdblock1)
> mtd_master0 -> link to mtd0
> 
> What do you think? Or maybe even always mtd_master in the first place.
> 
> Richard, your point of view on this?
> 
> Thanks,
> Miquèl

The mtd_master is completely different class to avoid mtd tree disturbances.
It is real kernel device object, I'm not sure how we can do 'link to' magic here.

About MTD_PARTITIONED_MASTER - we can treat it as another partition and 
create master device plus whole device partition as it's child with all other
partitions as children of master device.
For unpartitioned device this mean that we create master device and partition
regardless of MTD_PARTITIONED_MASTER flag.

We also can always add master device and add whole device partition as it's child,
while adding real partition as children of this whole device.
This will create three layers of devices and sounds too complicated.

- - 
Thanks,
Sasha


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ