From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from s48mx.cyon.ch (s48mx.cyon.ch [194.126.200.158]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Mon, 23 May 2016 20:47:42 +0200 (CEST) References: <57417C65.1080309@ione.ch> <9edd7e4d-2eaf-64be-0576-585d5bde7478@redhat.com> From: Roman Schlegel Message-ID: <5743504D.9070005@ione.ch> Date: Mon, 23 May 2016 20:47:41 +0200 MIME-Version: 1.0 In-Reply-To: <9edd7e4d-2eaf-64be-0576-585d5bde7478@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Initializing dm-crypt on Android results in "device lookup failed" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ondrej Kozina , dm-crypt@saout.de Hi Ondrej, Thanks a lot for your reply. On 23.05.2016 10:17, Ondrej Kozina wrote: > Hello Roman, > > I'm no Android developer, so just according to what I can see in your logs: > > On 05/22/2016 11:31 AM, Roman Schlegel wrote: >> >> 01-01 03:20:03.592 I/Cryptfs ( 254): load_crypto_mapping_table: >> crypt_params = aes-cbc-essiv:sha256 0A66F89B0D3DFC0B05D9BD23B3453A70 0 > > Don't post your volume key publicly! If it was just a test device it's > not so big deal but it's generally good rule to follow so that you don't > post your VK for real device accidentally. > > > I was aware that the log contained the volume key (it is a test device), but you're of course right that I should not get in the habit of posting it :-). >> /dev/block/platform/mtk-msdc.0/by-name/userdata 0 1 allow_discards 0 >> >> 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 > > The kernel driver complaints that it can't access a block device > referenced by path /dev/block/platform/mtk-msdc.0/by-name/userdata. Is > it block device? If it's supposed to be a symlink does a referenced > block device exist? > > The thing is kernel accepts only limited set of paths as device > identifier in DM table. Usually major:minor numbers, kernel path, > part_uuid. The translation from arbitrary path ' > /dev/block/platform/mtk-msdc.0/by-name/userdata' to something DM driver > is able to parse should be done in userspace. Usually, it's libdevmapper > library what does that. Given that kernel complaints, it seems userspace > haven't done the translation properly or there was a race maybe. Could > you pass major:minor for /dev/block/platform/mtk-msdc.0/by-name/userdata > directly in userspace utility that's supposed to establish device > encryption? > The device /dev/block/platform/mtk-msdc.0/by-name/userdata is actually a symbolic link to another block device, but it seems to exist at the time of encryption. What exactly do you mean with that there might be a race? Thanks and best regards, Roman