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]
Message-ID: <9c9fda240712130008s227a77dsbd9333c5227d51eb@mail.gmail.com>
Date:	Thu, 13 Dec 2007 17:08:16 +0900
From:	"Kyungmin Park" <kmpark@...radead.org>
To:	"Pierre Ossman" <drzeus-list@...eus.cx>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH][MMC] Fix wrong EXT_CSD_REV handling

On Dec 13, 2007 4:53 PM, Pierre Ossman <drzeus-list@...eus.cx> wrote:
> On Thu, 13 Dec 2007 16:13:11 +0900
> Kyungmin Park <kyungmin.park@...sung.com> wrote:
>
> > It already checked the ext_csd_struct is less than 2,
> > so it doesn't need to check it.
> > Current code only accepts the revision 1.2.
> >
> > Signed-off-by: Kyungmin Park <kyungmin.park@...sung.com>
>
> It wasn't wrong the last time you brought this up, and it still isn't wrong. Those bits aren't defined until version 1.2 of the EXT_CSD register, hence we do not trust them. If you have some broken card that you feel you must have support for, then start working on some quirks system.

Now see the code.

First, it checks the ext_csd_struct.
       ext_csd_struct = ext_csd[EXT_CSD_REV];
        if (ext_csd_struct > 2) {
                printk(KERN_ERR "%s: unrecognised EXT_CSD structure "
                        "version %d\n", mmc_hostname(card->host),
                        ext_csd_struct);
                err = -EINVAL;
                goto out;
        }
        => here possible values are 0, 1, 2

        => It only accepts the ext_csd 2 but my *broken* card has 1.
so it's failed.
        if (ext_csd_struct >= 2) {
                card->ext_csd.sectors =
                        ext_csd[EXT_CSD_SEC_CNT + 0] << 0 |
                        ext_csd[EXT_CSD_SEC_CNT + 1] << 8 |
                        ext_csd[EXT_CSD_SEC_CNT + 2] << 16 |
                        ext_csd[EXT_CSD_SEC_CNT + 3] << 24;
                if (card->ext_csd.sectors)
                        mmc_card_set_blockaddr(card);
        }

In my MMC Spec. (v4.2), there's no problem to read it even though it's
revision 1.1

Anyway how do it handle this one? Do you have any idea?

Thank you,
Kyungmin Park
--
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