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-next>] [day] [month] [year] [list]
Date:	Wed, 11 May 2011 11:25:22 -0500
From:	Nitin Garg <nitingarg98@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Bug in MTD NAND ONFI chipsize detection

Hi All,

The nand_flash_detect_onfi function in mtd/nand detects the NAND flash
device size using the ONFI parameters:
	chip->chipsize = (uint64_t)le32_to_cpu(p->blocks_per_lun) * mtd->erasesize;

The lun_count is not taken into consideration due to which we detect
wrong size for Micron MT29F8G08ADADAH4 as it has 2 logical units.

We should change the chipsize calculation to:
	chip->chipsize = (uint64_t)le32_to_cpu(p->blocks_per_lun) *
(uint64_t)le32_to_cpu(p->lun_count) * mtd->erasesize;

Pls suggest.

Regards,
Nitin Garg
--
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