From: Christophe Saout <christophe@saout.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Alasdair G Kergon <agk@redhat.com>,
herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org,
Stefan Schmidt <stefan@datenfreihafen.org>,
dm-devel@redhat.com, dm-crypt@saout.de,
Andrew Morton <akpm@osdl.org>
Subject: Re: [BUG] dmsetup table output changed from 2.6.18 to 2.6.19-rc3 and breaks yaird.
Date: Mon, 30 Oct 2006 20:39:08 +0100 [thread overview]
Message-ID: <1162237148.9415.7.camel@leto.intern.saout.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0610301053010.25218@g5.osdl.org>
[-- Attachment #1: Type: text/plain, Size: 2526 bytes --]
Am Montag, den 30.10.2006, 11:00 -0800 schrieb Linus Torvalds:
> On Mon, 30 Oct 2006, Alasdair G Kergon wrote:
> >
> > It cannot have been intentional as there was no mention of the change to the
> > userspace interface in the git changelog (and the interface version number
> > was not changed).
> >
> > A new patch is needed to revert the part of the patch that changed the
> > userspace interface.
> >
> > Please don't forget to copy in the appropriate maintainers when you send
> > messages like this one:
> > http://marc.theaimsgroup.com/?l=linux-netdev&m=115547174417490&w=2
> > so they can provide acks:-)
>
> Yeah.
>
> Herbert, the breakage _seems_ to be due to the STATUSTYPE_TABLE case
> change:
>
> - cipher = crypto_tfm_alg_name(cc->tfm);
> + cipher = crypto_blkcipher_name(cc->tfm);
>
> which effectively changes "aes" into "cbc(aes)", which is wrong, since we
> show the chainmode separately.
>
> Please, somebody who knows this area, send me a fix,
>
> (maybe something like this trivial one? Totally untested, but it would
> seem to be the sane approach)
Yes, this works just fine. It can also be cleaned up a little further as
the temporary variables are unnecessary at that point.
----
Fix dm-crypt after the block cipher API changes to correctly return the
backwards compatible cipher-chainmode[-ivmode] format for "dmsetup
table".
Signed-off-by: Christophe Saout <christophe@saout.de>
diff linux-2.6.19-rc3.orig/drivers/md/dm-crypt.c linux-2.6.19-rc3/drivers/md/dm-crypt.c
--- linux-2.6.19-rc3.orig/drivers/md/dm-crypt.c 2006-10-26 13:17:58.000000000 +0200
+++ linux-2.6.19-rc3/drivers/md/dm-crypt.c 2006-10-30 20:26:37.000000000 +0100
@@ -915,8 +915,6 @@ static int crypt_status(struct dm_target
char *result, unsigned int maxlen)
{
struct crypt_config *cc = (struct crypt_config *) ti->private;
- const char *cipher;
- const char *chainmode = NULL;
unsigned int sz = 0;
switch (type) {
@@ -925,14 +923,11 @@ static int crypt_status(struct dm_target
break;
case STATUSTYPE_TABLE:
- cipher = crypto_blkcipher_name(cc->tfm);
-
- chainmode = cc->chainmode;
-
if (cc->iv_mode)
- DMEMIT("%s-%s-%s ", cipher, chainmode, cc->iv_mode);
+ DMEMIT("%s-%s-%s ", cc->cipher, cc->chainmode,
+ cc->iv_mode);
else
- DMEMIT("%s-%s ", cipher, chainmode);
+ DMEMIT("%s-%s ", cc->cipher, cc->chainmode);
if (cc->key_size > 0) {
if ((maxlen - sz) < ((cc->key_size << 1) + 1))
[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-10-30 19:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 15:19 [BUG] dmsetup table output changed from 2.6.18 to 2.6.19-rc3 and breaks yaird Stefan Schmidt
2006-10-30 18:43 ` Alasdair G Kergon
2006-10-30 19:00 ` Linus Torvalds
2006-10-30 19:15 ` Alasdair G Kergon
2006-10-30 19:39 ` Christophe Saout [this message]
2006-10-31 0:56 ` Herbert Xu
2006-10-30 19:52 ` Stefan Schmidt
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=1162237148.9415.7.camel@leto.intern.saout.de \
--to=christophe@saout.de \
--cc=agk@redhat.com \
--cc=akpm@osdl.org \
--cc=dm-crypt@saout.de \
--cc=dm-devel@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=stefan@datenfreihafen.org \
--cc=torvalds@osdl.org \
/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