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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Nov 2009 11:40:27 +0100
From:	Jörn Engel <joern@...fs.org>
To:	Maxim Levitsky <maximlevitsky@...il.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Alex Dubov <oakad@...oo.com>, arnd@...db.de, tglx@...utronix.de
Subject: Re: Plan for adding XD support in mtd layer

On Wed, 25 November 2009 01:50:10 +0200, Maxim Levitsky wrote:
> 
> Chip driver:
> 
> no problems with that, in fact ricoh controller I reverse engineered is
> very similar conceptually
> to jmicron.
> I can take original jmicron driver almost verbatim.
> This will live in new sub folder of mtd and call into base XD driver

Ok.  Is the code available somewhere or can you send it?  And what
devices would one have to buy to test it?

> Base XD mtd driver:
> 
> * No way to tell that readsize = 512, but write & erase size isn't.
> Not such a big deal, since higher level FTL driver can hardcode that
> assumption, and access via mtdblk isn't necessary, since FTL will
> replace it for XD, and the raw access will be done through mtdchar.
> 
> * it is possible to export 'extra' via oob. FTL will use that, and will
> be available to user via char device
> 
> * No need to export CIF block, it will be available for user via char
> device by scanning the device (using a new utility)
> 
> 
> -> I need new mtd_info member for at least for card identification, and
> will be nice to have zone/block/page size
> This will be used by FTL and mtdchar to be exported to user space

Block and page size already exist as mtd->erasesize and mtd->writesize
respectively.  I'm not sure whether the zone size should become part of
the mtd interface - it looks more like a property of the ftl.

> FTL driver:
> 
> I will write new XD/smartmedia FTL driver.
> 
> * Will read ID/type from device and do all the work based on that,
> (figure page size/zone count/block size, etc...) or will get that info
> from mtd driver 
> 
> * Will cache read/writes (this will overlap with mtdblk)
> 
> * Will provide normal block level access to filesystems, and user.
> (using common block device of course)
> 
> * No debugging information or/and device specific ioctls.
> 
> 
> Char driver:
> 
> * Already exists, and I will need to modify it, so I could read ID/media
> type
> Also would be nice to pass info about sizes (zones/pages/blocks) to
> userspace 
> If not, I will put translation table to userspace utility based on media
> ID

What userspace programs would need this information?  I can imagine some
sort of xd_format or mkxd in case the card has been corrupted or used
raw.  Anything else?

> Userspace utility:
> * Will allow user to read FTL maps (based on oob), Media ID, CIF, all
> using char device

What would this be needed for?

> * Will also allow low level format.

Jörn

-- 
Beware of bugs in the above code; I have only proved it correct, but
not tried it.
-- Donald Knuth
--
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