[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grub2 plain dm-crypt support

From: John Lane
Subject: Re: Grub2 plain dm-crypt support
Date: Mon, 10 Nov 2014 11:43:02 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

On 09/11/14 19:31, Andrei Borzenkov wrote:
> Only the last commit which adds plain dm-crypt support is relevant.
> And it is pretty much independent of the rest of grub. 
I checked it out and tried unsuccessfully to build due to errors. I
tried building branch merged into master and then I tried building
"peter/devmapper" (I needed to cherry-pick commit
fd0df6d098b1e6a4f60275c48a3ec88d15ba1fbb into the branch). Both builds
ultimately failed with the same errors shown below.

disk/devmapper.c: In function ‘grub_cmd_devmap’:
disk/devmapper.c:159:22: warning: initialization discards ‘const’
qualifier from pointer target type
   char *passphrase = "";
disk/devmapper.c:162:36: error: ‘struct grub_extcmd’ has no member named
   struct grub_arg_list *state = cmd->state;
disk/devmapper.c:221:26: error: ‘GRUB_ERR_CIPHER_NOT_FOUND’ undeclared
(first use in this function)
       return grub_error (GRUB_ERR_CIPHER_NOT_FOUND, "Unknown cipher
%s", hash);
disk/devmapper.c:221:26: note: each undeclared identifier is reported
only once for each function it appears in
disk/devmapper.c: In function ‘grub_crypto_open’:
disk/devmapper.c:322:7: error: ‘struct grub_disk’ has no member named
   disk->has_partitions = dev->has_partitions;
disk/devmapper.c: In function ‘grub_crypto_read’:
disk/devmapper.c:357:7: warning: variable length array ‘iv’ is used [-Wvla]
       grub_uint8_t iv[cipher->cipher->blocksize];
disk/devmapper.c: At top level:
disk/devmapper.c:389:3: warning: initialization from incompatible
pointer type
   .iterate = grub_crypto_iterate,
disk/devmapper.c:389:3: warning: (near initialization for
disk/devmapper.c: In function ‘grub_mod_init’:
disk/devmapper.c:403:58: error: ‘GRUB_COMMAND_FLAG_BOTH’ undeclared
(first use in this function)
   cmd = grub_register_extcmd ("devmap", grub_cmd_devmap,
disk/devmapper.c:403:41: warning: passing argument 2 of
‘grub_register_extcmd’ from incompatible pointer type
   cmd = grub_register_extcmd ("devmap", grub_cmd_devmap,
In file included from ../include/grub/misc.h:25:0,
                 from disk/devmapper.c:26:
../include/grub/extcmd.h:58:27: note: expected ‘grub_extcmd_func_t’ but
argument is of type ‘enum grub_err_t (*)(struct grub_extcmd *, int, 
char **)’
 grub_extcmd_t EXPORT_FUNC(grub_register_extcmd) (const char *name,
../include/grub/symbol.h:68:25: note: in definition of macro ‘EXPORT_FUNC’
 # define EXPORT_FUNC(x) x
Makefile:29158: recipe for target
'disk/crypto_devmapper_module-devmapper.o' failed

It looks to me like the code in devmapper.c expects some definitions
that don't exist in the source. If there's any chance of a version that
builds I will be pleased to test it.
> But the main problem as I see it is to identify disk that is needed.
> LUKS is self identifying (you have UUID to find LUKS partition). But
> how do you propose to search for partition containing plain dm-crypt?
I haven't got to the point where I've given this any thought beyond the
fact that I know that (hd1,1) needs unlocking by plain dm-crypt.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]