DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Roman Schlegel <lists@ione.ch>, dm-crypt@saout.de
Subject: Re: [dm-crypt] Initializing dm-crypt on Android results in "device lookup failed"
Date: Mon, 23 May 2016 11:04:02 +0200	[thread overview]
Message-ID: <5742C782.8090505@gmail.com> (raw)
In-Reply-To: <57417C65.1080309@ione.ch>

On 05/22/2016 11:31 AM, Roman Schlegel wrote:
> Hello,
> 
> I am currently trying to track down an issue with dm-crypt on an Android
> device (more specifically, I am building a CM 12.1 ROM), where
> initializing device encryption fails with an error.

...

> 01-01 03:20:03.592 I/Cryptfs (  254): load_crypto_mapping_table:
> crypt_params = aes-cbc-essiv:sha256 0A66F89B0D3DFC0B05D9BD23B3453A70 0
> /dev/block/platform/mtk-msdc.0/by-name/userdata 0 1 allow_discards 0

I really hope Android does not log volume key such a way to system log...

> 
> 01-01 03:20:08.619 E/Cryptfs (  254): Cannot load dm-crypt mapping table.
> 
> 
> at the same time, the kernel log prints the following messages:
> 
> <3>[  138.163773] (5)[327:vold]device-mapper: table: 253:0: crypt:
> Device lookup failed

This message seems to indicate that problem is with device specification:
/dev/block/platform/mtk-msdc.0/by-name/userdata

Can you check, that such device node exists before calling this activation?

You can try to use "major:minor" pair instead (of the device above),
but it can sause problem if it is dynamic (it shouldn't be in this
environment though).

Milan
p.s.

> Unfortunately, the device I am testing this with has not had the kernel
> sources released, so I only have a prebuilt kernel (3.10.61) that I
> cannot recompile. However, another ROM using the same kernel (IIRC) can
> successfully encrypt the device, so I don't think it is anything
> inherent in the kernel itself. But I am at a loss what else could be the
> problem.

The situation in Android world is really not good. Some major vendors even
reimplemented dm-crypt with hardcoded algorithms to speed up on their crappy hw.
Obviously without contact mainline kernel developers, and breaking all other
interfaces as a side effect etc.
So do not be surprised that we will ignore any support questions if someone
is doing such things, nobody really know what source code was used to compile
the kernel.

  parent reply	other threads:[~2016-05-23  9:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-22  9:31 [dm-crypt] Initializing dm-crypt on Android results in "device lookup failed" Roman Schlegel
2016-05-23  8:17 ` Ondrej Kozina
2016-05-23 18:47   ` Roman Schlegel
2016-05-23  9:04 ` Milan Broz [this message]
2016-05-23 19:17   ` Roman Schlegel
2016-05-23 19:50     ` Roman Schlegel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5742C782.8090505@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=lists@ione.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox