2003-07-11 12:54:19

by bert hubert

[permalink] [raw]
Subject: what is needed to test the in-kernel crypto loop?

Andries,

You mentioned:

[util-linux is waiting for this; when 2.6 comes out, or the
first mount/losetup comes out that uses struct loop_info64,
whichever comes first, struct loop_info64 must be considered
frozen: a stable kernel must not change API and user space
ABI must remain constant. This means that if cryptoloop is
added later, some backwards compatibility is lost.]

Is a newer losetup/mount needed to test the in-kernel crypto loop driver?
The crypto-loop code is present in the bk repository, now.

Thanks.

--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO


2003-07-11 13:32:15

by Andries E. Brouwer

[permalink] [raw]
Subject: Re: what is needed to test the in-kernel crypto loop?

> Is a newer losetup/mount needed to test the in-kernel crypto loop driver?

Yes.

[Or at least: a nonstandard losetup/mount. The patches distributed
for jari-loop or kerneli-loop also contain a patched losetup.]

Try util-linux 2.12, available in 60 hours.

Andries

2003-07-15 18:15:02

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: what is needed to test the in-kernel crypto loop?

On Fri, 11 Jul 2003 15:46:55 +0200, [email protected] said:

> Try util-linux 2.12, available in 60 hours.

(using this version from ftp.kernel.org/pub/linux/utils/util-linux:
-rw-r--r-- 1 korg korg 1285674 Jul 13 22:09 util-linux-2.12pre.tar.bz2

Umm.. OK... I'll bite. How do I get 2.12pre to actually use cryptoloop?

losetup -e aes /dev/loop yadd yadda says 'Unknown encryption type aes',
mostly because of this code in lomount.c:

struct crypt_type_struct {
int id;
char *name;
} crypt_type_tbl[] = {
{ LO_CRYPT_NONE, "no" },
{ LO_CRYPT_NONE, "none" },
{ LO_CRYPT_XOR, "xor" },
{ LO_CRYPT_DES, "DES" },
{ -1, NULL }
};

static int
crypt_type (const char *name) {
int i;

if (name) {
for (i = 0; crypt_type_tbl[i].id != -1; i++)
if (!strcasecmp (name, crypt_type_tbl[i].name))
return crypt_type_tbl[i].id;
}
return -1;
}

none, xor, DES. Those are the choices - and yes, aes.o is built and in-kernel.


Attachments:
(No filename) (226.00 B)

2003-07-16 23:17:08

by Andries E. Brouwer

[permalink] [raw]
Subject: Re: what is needed to test the in-kernel crypto loop?

From [email protected] Tue Jul 15 20:29:45 2003

On Fri, 11 Jul 2003 15:46:55 +0200, [email protected] said:

> Try util-linux 2.12, available in 60 hours.

(using this version from ftp.kernel.org/pub/linux/utils/util-linux:
-rw-r--r-- 1 korg korg 1285674 Jul 13 22:09 util-linux-2.12pre.tar.bz2

Umm.. OK... I'll bite. How do I get 2.12pre to actually use cryptoloop?

Ah, 2.12pre is not 2.12.

(2.12pre is a solid version, I hope, nothing wrong with it,
but no new loop stuff; someone was willing to test it and
did not come back with complaints, so maybe it isnt too bad.)

(On the other hand, concerning 2.12 I hesitated for a long time.
Jari came with code that works perfectly, but is such a lot of
cruft. Did I really want to maintain that? Lots of cryptoalgorithms
built into mount? On ftp.cwi.nl under /pub/aeb/util-linux there
was a util-linux-2.12-wip.tar.gz for a month or so, but I removed it
and replaced it by util-linux-2.12.tar.gz.
This new losetup/mount is minimal instead of maximal, smaller than
the older versions. Good for playing, but people who really have
their filesystems on loop-aes or cryptoloop had better wait before
rushing and installing this.)

A main reason for discrepancy is that no knowledge about cryptoalgorithms
is built into mount/losetup. With a -p option these programs are willing
to read a possibly encrypted passphrase from a given file descriptor.
All passphrase handling can now be external to mount, I hope.
No doubt more polishing is needed.

Nothing has been tested. (But it compiles here.)

Please test and report.

Andries