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]
Date:	Thu, 13 Nov 2008 09:51:01 -0500
From:	"Mike Frysinger" <vapier.adi@...il.com>
To:	"Atsushi Nemoto" <anemo@....ocn.ne.jp>
Cc:	vapier@...too.org, linux-mtd@...ts.infradead.org,
	dwmw2@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: unify mtd partition/device registration

On Thu, Nov 13, 2008 at 09:28, Atsushi Nemoto wrote:
> On Thu, 13 Nov 2008 22:43:50 +0900 (JST), Atsushi Nemoto wrote:
>> On Wed, 12 Nov 2008 18:38:53 -0500, Mike Frysinger wrote:
>> > Rather than having every map/mtd driver doing the same sequence of
>> > registering partitions and/or devices, implement common parse_mtd().
>> >
>> > Signed-off-by: Mike Frysinger <vapier@...too.org>
>> > ---
>> >  drivers/mtd/mtdcore.c   |   37 +++++++++++++++++++++++++++++++++++++
>> >  include/linux/mtd/mtd.h |    3 +++
>> >  2 files changed, 40 insertions(+), 0 deletions(-)
>>
>> I like this idea.
>
> Some drivers call both add_mtd_device() and add_mtd_partitions().  The
> mtd_device is used to access whole flash area (like /dev/hda).  How do
> you think of these usage patterns?
>
> maps/edb7312.c
> maps/mbx860.c
> maps/plat-ram.c
> nand/cafe_nand.c
> nand/diskonchip.c
> nand/ndfc.c
>
> Automatic fallback to mtd_device in parse_mtd() is convenient but
> somewhat unflexible...

we could just have it do it all the time.  i dont see a problem with
exposing the entire block device the whole time ?  i know for the
driver or two of mine, i'm fine with it.

...
       ret = parse_mtd_partitions(mtd, probe_types, &parts, 0);
       if (ret > 0) {
               ret = add_mtd_partitions(mtd, parts, ret);
               kfree(parts);
       } else if (nr_parts)
               ret = add_mtd_partitions(mtd, parts, nr_parts);
       if (ret)
               return ret;
#endif

       return add_mtd_device(mtd);
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ