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]
Message-ID: <CAD=FV=Va=V4xGqQM9kMFFdQDyYNWDEh_cXJW=b3iYGRrJiH9DQ@mail.gmail.com>
Date:	Wed, 6 Aug 2014 12:50:31 -0700
From:	Doug Anderson <dianders@...omium.org>
To:	stefan@...er.ch, Chris Ball <chris@...ntf.net>,
	Ulf Hansson <ulf.hansson@...aro.org>
Cc:	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	Russell King <linux@....linux.org.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Stephen Warren <swarren@...dotorg.org>,
	Heiko Stübner <heiko@...ech.de>,
	Addy Ke <addy.ke@...k-chips.com>,
	Olof Johansson <olof@...om.net>,
	Andrew Bresticker <abrestic@...omium.org>
Subject: Re: [RFC 2/2] mmc: use SD/MMC host ID for block device name ID

Stefan,

On Tue, Apr 1, 2014 at 1:35 PM,  <stefan@...er.ch> wrote:
> From: Stefan Agner <stefan@...er.ch>
>
> By using the SD/MMC host device ID as a starting point for block
> device numbering, one can reliably predict the first block device
> name (at least for the first controller). This is especially useful
> for SoCs with multiple SD/MMC host controller, where the controller
> with index 0 is connected to a eMMC device.
>
> Usually the first controller gets the first block device name ID,
> however this is not guaranteed. Also if the first controller is
> aliased as second controller and visa-versa (using device tree
> aliases), the block device name ID assignation is not ordered by
> the SD/MMC host device ID (since mmc_rescan is called in order of
> the memory mapped pheripherial addresses).
>
> Signed-off-by: Stefan Agner <stefan@...er.ch>
> ---
>  drivers/mmc/card/block.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

As Stephen points out, "mmcblk" IDs for SD cards are not actually
guaranteed.  Also UUID is a better API for things to use.

That being said, your patch helps me a lot when doing development.  As
you said, I'm guaranteed that if eMMC is no-removable and enumerated
at boot that it will be a predictable ID and I can use it in my
scripts.  Also this helps keep me from having to do lots of extra
thinking to figure out whether I happened to have an SD card plugged
in at boot or I didn't.

I'd love to see this land.

Reviewed-by: Doug Anderson <dianders@...omium.org>
Tested-by: Doug Anderson <dianders@...omium.org>
--
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