Re: [patch 0/5] Add MMC password protection (lock/unlock) support

Russell King
2005-12-29T21:38:06Z

On Thu, Dec 29, 2005 at 05:23:52PM -0400, Anderson Lizardo wrote:
> On 12/29/05, Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> > On Thu, Dec 29, 2005 at 03:06:15PM -0400, Anderson Lizardo wrote:
> > > The MMC specification v4.1 is clear in one thing: the SET_BLOCKLEN
> > > command should be issued prior to the actual LOCK_UNLOCK command with
> > > *exactly* the password length + 2 bytes (which contains the operation
> > > mode bits and the password length in bytes). The MMC password
> > > unlocking (and other password operations, FWIW) doesn't work on the
> > > OMAP host if the SET_BLOCKLEN command argument and the block size of
> > > the data transfer itself do not match.
> >
> > Since passwords are limited to a maximum of 16 characters, this means
> > that only passwords of length 2, 6, and 14 are possible with MMCI.
> > All other passwords are invalid and/or impossible with this host.
>
> What do you suggest in this case?

Well, we seem to have an increasing number of silly limitations in
MMC host implementations. In this particular case, I guess the
easiest solution would be to supply a capability flag from the host
to say "only supports power of two block sizes" - and disable
password support if this flag is set.

Yes, this means that password-locked cards become non-functional
with such restricted hosts, but I think that's realistically
unavoidable.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core