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: <78709125.231818577.1736980238251.JavaMail.zimbra@nod.at>
Date: Wed, 15 Jan 2025 23:30:38 +0100 (CET)
From: Richard Weinberger <richard@....at>
To: Alexander Usyskin <alexander.usyskin@...el.com>
Cc: Miquel Raynal <miquel.raynal@...tlin.com>, 
	Vignesh Raghavendra <vigneshr@...com>, 
	Lucas De Marchi <lucas.demarchi@...el.com>, 
	Thomas Hellström <thomas.hellstrom@...ux.intel.com>, 
	Rodrigo Vivi <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>, 
	Karthik Poosa <karthik.poosa@...el.com>, 
	Reuven Abliyev <reuven.abliyev@...el.com>, 
	Oren Weil <oren.jer.weil@...el.com>, 
	linux-mtd <linux-mtd@...ts.infradead.org>, 
	DRI mailing list <dri-devel@...ts.freedesktop.org>, 
	intel-gfx <intel-gfx@...ts.freedesktop.org>, 
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 01/11] mtd: core: always create master device

Alexander,

----- Ursprüngliche Mail -----
> Von: "Alexander Usyskin" <alexander.usyskin@...el.com>
> 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.

Please explain in more detail why this is needed.
If this change makes the overall situation better and breaks
no userspace, I'm happy. :-)

>From skimming over the patch I think the mtd_master device completely
useless for userspace, right?

> int add_mtd_device(struct mtd_info *mtd)
> {
> 	struct device_node *np = mtd_get_of_node(mtd);
> 	struct mtd_info *master = mtd_get_master(mtd);
> 	struct mtd_notifier *not;
> +	bool partitioned = true;
> 	int i, error, ofidx;
> 
> 	/*
> @@ -655,6 +678,11 @@ int add_mtd_device(struct mtd_info *mtd)
> 	if (WARN_ONCE(mtd->dev.type, "MTD already registered\n"))
> 		return -EEXIST;
> 
> +	if ((master == mtd) && !IS_ENABLED(CONFIG_MTD_PARTITIONED_MASTER)) {
> +		partitioned = false;
> +		pr_debug("mtd: unpartitioned master %s\n", mtd->name);
> +	}

So, when CONFIG_MTD_PARTITIONED_MASTER is not set and a driver like MTDRAM
does mtd_device_register(mtd, NULL, 0) we end up here with partitioned = false,
and allocate just a master device but no real mtd because with zero
parts the mtd_device_parse_register() function will not call add_mtd_device(). :-(

Thanks,
//richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ