mtd_info->size again (lengthy)
joern at logfs.org
Tue Jun 10 07:46:29 EDT 2008
On Tue, 10 June 2008 11:56:48 +0100, Jamie Lokier wrote:
> I just don't see any advantage to assuming "nobody will ever use 4GiB
> erase blocks", when changing the API with larger sizes.
I use u64 for the number of eraseblocks because it doesn't take a lot of
imagination to see u32 overflow before I retire. It didn't take a lot
of imagination to see the u32 size problem coming either. Relying on "a
good reason that I haven't thought of" is a bit of a stretch.
Let me put it this way: if you spend the time and create all the
patches, you can use u128 for all I care.
> I have a particularly crappy one where erase blocks the CPU if the CPU
> reads from the chip during the erase - so the cfi_cmdset_0002.c file
> needs a patch to avoid polling the status register for this board.
> This is topic for another post, though.
Nothing can prevent bad drivers. At least they are easy to fix.
"Security vulnerabilities are here to stay."
-- Scott Culp, Manager of the Microsoft Security Response Center, 2001
More information about the linux-mtd