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:	Mon, 4 Mar 2013 16:57:51 +0800
From:	Huang Shijie <b32955@...escale.com>
To:	<dedekind1@...il.com>
CC:	Huang Shijie <shijie8@...il.com>, <dwmw2@...radead.org>,
	<computersforpeace@...il.com>, <linux-mtd@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V3 1/3] mtd: add new fields to nand_flash_dev{}

于 2013年03月04日 16:37, Artem Bityutskiy 写道:
> On Mon, 2013-03-04 at 16:08 +0800, Huang Shijie wrote:
>> 于 2013年03月04日 15:50, Artem Bityutskiy 写道:
>>> On Mon, 2013-03-04 at 13:57 +0800, Huang Shijie wrote:
>>>> The current code uses the @id to store the device id(byte 1).
>>>> But if we use the 8 bytes id data as the keyword, and expand the @id
>>>> field to 8byte array,
>>>> the device id is the second byte now. All the added zeros are for the
>>> I do not think you need to store the full array of ID's. Device ID's for
>>> all the 4 of above chips are different, which is enough to distinguish
>>> between them.
>>>
>>> The only thing you need to add is the OOB size field to 'struct
>>> nand_flash_dev'.
>>>
>> If i only add the oob size field. There will be two items with the same
>> Device ID in nand_flash_ids table,
>> one has oob_size, one does not have. such as:
>>
>>      {"NAND 8GIB 3,3V 8-bit", 0xDE, 0, 8192, 0, LP_OPTIONS},
> OK, I guess for this one:
>
> {"NAND 8GIB 3,3V 8-bit", 0xDE, 0, 8192, 0, LP_OPTIONS, 0},
>
> nand_decode_ext_id() will calculate the OOB size.
>
>>      {"NAND 8GIB 3,3V 8-bit", 0xDE, 0, 8192, 0, LP_OPTIONS, 640},   //OOB
>> size is 640.
> And for this one 'nand_decode_ext_id()' will calculate it too, but
> _afterwards_ we change OOB size to 640.
>
> Does this sound sane?
>
I think not.

The problem is : we can not know which nand_flash_dev item we should use 
when the same Device ID occurs.
When we meet a nand whose Device ID is 0xDE, the current code will 
select the first one:
    {"NAND 8GIB 3,3V 8-bit", 0xDE, 0, 8192, 0, LP_OPTIONS, 0}

Could you tell me how can we choose the seconde one? The second same 
device-id item is
   {"NAND 8GIB 3,3V 8-bit", 0xDE, 0, 8192, 0, LP_OPTIONS, 640}

thanks
Huang Shijie









--
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