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: <20170525192515.GA114788@google.com>
Date:   Thu, 25 May 2017 12:25:15 -0700
From:   Brian Norris <computersforpeace@...il.com>
To:     Andrea Adami <andrea.adami@...il.com>
Cc:     linux-mtd@...ts.infradead.org,
        David Woodhouse <dwmw2@...radead.org>,
        Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Richard Weinberger <richard@....at>,
        Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
        Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-kernel@...r.kernel.org,
        Rafał Miłecki <zajec5@...il.com>
Subject: Re: [PATCH v2 3/3] mtd: nand: tmio_nand.c: prefer sharpslpart MTD
 partition parser

On Sat, Apr 22, 2017 at 01:20:13PM +0200, Andrea Adami wrote:
> This is the specific parser for Sharp SL Series (Zaurus)
> 
> Signed-off-by: Andrea Adami <andrea.adami@...il.com>
> ---
>  drivers/mtd/nand/tmio_nand.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
> index fc5e773..f3612ac 100644
> --- a/drivers/mtd/nand/tmio_nand.c
> +++ b/drivers/mtd/nand/tmio_nand.c
> @@ -357,6 +357,8 @@ static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
>  		cell->disable(dev);
>  }
>  
> +static const char * const probes[] = { "sharpslpart", NULL };

This breaks anyone who might have used (or might want to use) the ofpart
or cmdlinepart parsers. At a minimum, you need to include those in your
array here.

But really, I'd rather not add any more parser listings like this in
drivers. Parser selection should be determined by the platform, not by
the driver. See my last response to Rafal, who is trying to extend
support for device-tree based listing of parsers:

http://lists.infradead.org/pipermail/linux-mtd/2017-April/073729.html

He has some more work posted to the mailing list since then; search the
archives.

I'll take a look at the parser itself, and maybe we can merge that. But
I'm not likely to merge this patch, in any form.

Brian

> +
>  static int tmio_probe(struct platform_device *dev)
>  {
>  	struct tmio_nand_data *data = dev_get_platdata(&dev->dev);
> @@ -440,7 +442,7 @@ static int tmio_probe(struct platform_device *dev)
>  		goto err_irq;
>  
>  	/* Register the partitions */
> -	retval = mtd_device_parse_register(mtd, NULL, NULL,
> +	retval = mtd_device_parse_register(mtd, probes, NULL,
>  					   data ? data->partition : NULL,
>  					   data ? data->num_partitions : 0);
>  	if (!retval)
> -- 
> 2.7.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ