All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Tvrtko Ursulin <tvrtko@ursulin.net>
Cc: dm-crypt@saout.de, okozina@redhat.com,
	linux-rt-users@vger.kernel.org, Milan Broz <gmazyland@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [dm-crypt] cryptsetup not working under 3.6 - RT patch set seem to break it
Date: Tue, 30 Oct 2012 00:51:03 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.02.1210300040000.2756@ionos> (raw)
In-Reply-To: <508EEAF2.4090506@ursulin.net>

On Mon, 29 Oct 2012, Tvrtko Ursulin wrote:
> On 29/10/12 20:14, Tvrtko Ursulin wrote:
> > Unless RT patchset is the culprit. Hm.. that would be unexpected, but I
> > guess it is worth a shot. I'll let you know what happens without -rt.
> 
> Ha, this is exciting, vanilla 3.6.4 works, with -rt10 patch it does not.
> 
> Copying in linux-rt-users.
> 
> To recap, 3.6 RT seems to break dm-crypt. Try it like this:
> 
> cryptsetup --debug --key-file=- luksOpen /some/luks/formatted/file any-label
> 
> And kernel will fail like this:
> 
> Kernel says this:
>      device-mapper: table: 252:1: crypt: Error allocating crypto tfm
>      device-mapper: ioctl: error adding target to table
> 
> I think crypto modules are not getting auto loaded for some reason, but even
> if I load them manually before hand and still breaks in the same way.

I don't think it's a module problem. That code is not very helpful due
to _NOT_ showing the error number so it's hard to decode what actually
fails.

I put this on my todo list, but TBH it's low on my radar. If you are
interested then try to capture the failure with the function
tracer. Put a tracing_off() call into the failure code path, i.e.:

        ret = crypt_alloc_tfms(cc, cipher_api);
        if (ret < 0) {
+	   	tracing_off();
                ti->error = "Error allocating crypto tfm";
		        goto bad;
	}

Enable the function tracer before doing the cryptsetup invocation and
after that read out the trace, compress it and put it somewhere to
download or send it to me in private mail if you don't have a place to
put it.

I can decode the trace, but I don't have the capacity at the moment to
setup all the necessary stuff here and do the debugging myself.

Thanks,

	tglx

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Tvrtko Ursulin <tvrtko@ursulin.net>
Cc: Milan Broz <gmazyland@gmail.com>,
	dm-crypt@saout.de, linux-kernel@vger.kernel.org,
	okozina@redhat.com, linux-rt-users@vger.kernel.org
Subject: Re: [dm-crypt] cryptsetup not working under 3.6 - RT patch set seem to break it
Date: Tue, 30 Oct 2012 00:51:03 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.02.1210300040000.2756@ionos> (raw)
In-Reply-To: <508EEAF2.4090506@ursulin.net>

On Mon, 29 Oct 2012, Tvrtko Ursulin wrote:
> On 29/10/12 20:14, Tvrtko Ursulin wrote:
> > Unless RT patchset is the culprit. Hm.. that would be unexpected, but I
> > guess it is worth a shot. I'll let you know what happens without -rt.
> 
> Ha, this is exciting, vanilla 3.6.4 works, with -rt10 patch it does not.
> 
> Copying in linux-rt-users.
> 
> To recap, 3.6 RT seems to break dm-crypt. Try it like this:
> 
> cryptsetup --debug --key-file=- luksOpen /some/luks/formatted/file any-label
> 
> And kernel will fail like this:
> 
> Kernel says this:
>      device-mapper: table: 252:1: crypt: Error allocating crypto tfm
>      device-mapper: ioctl: error adding target to table
> 
> I think crypto modules are not getting auto loaded for some reason, but even
> if I load them manually before hand and still breaks in the same way.

I don't think it's a module problem. That code is not very helpful due
to _NOT_ showing the error number so it's hard to decode what actually
fails.

I put this on my todo list, but TBH it's low on my radar. If you are
interested then try to capture the failure with the function
tracer. Put a tracing_off() call into the failure code path, i.e.:

        ret = crypt_alloc_tfms(cc, cipher_api);
        if (ret < 0) {
+	   	tracing_off();
                ti->error = "Error allocating crypto tfm";
		        goto bad;
	}

Enable the function tracer before doing the cryptsetup invocation and
after that read out the trace, compress it and put it somewhere to
download or send it to me in private mail if you don't have a place to
put it.

I can decode the trace, but I don't have the capacity at the moment to
setup all the necessary stuff here and do the debugging myself.

Thanks,

	tglx


  reply	other threads:[~2012-10-30  0:28 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20 20:44 [dm-crypt] cryptsetup not working under 3.6 - regression from 3.4? Tvrtko Ursulin
2012-10-20 20:44 ` Tvrtko Ursulin
2012-10-21  9:53 ` [dm-crypt] " Milan Broz
2012-10-21 12:03   ` Tvrtko Ursulin
2012-10-21 12:20     ` Zdenek Kaspar
2012-10-21 12:36       ` Tvrtko Ursulin
2012-10-21 12:36         ` Tvrtko Ursulin
2012-10-21 19:29         ` [dm-crypt] " Milan Broz
2012-10-21 19:29           ` Milan Broz
2012-10-21 20:03           ` [dm-crypt] " Tvrtko Ursulin
2012-10-21 20:03             ` Tvrtko Ursulin
2012-10-22 14:27             ` [dm-crypt] " Ondrej Kozina
2012-10-29 19:31             ` Tvrtko Ursulin
2012-10-29 19:31               ` Tvrtko Ursulin
2012-10-29 19:47               ` [dm-crypt] " Milan Broz
2012-10-29 19:47                 ` Milan Broz
2012-10-29 20:14                 ` Tvrtko Ursulin
2012-10-29 20:14                   ` Tvrtko Ursulin
2012-10-29 20:45                   ` [dm-crypt] cryptsetup not working under 3.6 - RT patch set seem to break it Tvrtko Ursulin
2012-10-29 20:45                     ` Tvrtko Ursulin
2012-10-29 20:45                     ` Tvrtko Ursulin
2012-10-29 23:51                     ` Thomas Gleixner [this message]
2012-10-29 23:51                       ` [dm-crypt] " Thomas Gleixner
2012-10-30  9:40                     ` Uwe Kleine-König
2012-10-30  9:40                       ` Uwe Kleine-König
2012-10-30  9:55                       ` Milan Broz
2012-10-30  9:55                         ` Milan Broz
2012-10-30  9:55                         ` Milan Broz
2012-10-30 15:27                         ` [dm-crypt] [PATCH] Fix crypto api init for 3.6.4-rt10 Milan Broz
2012-10-30 15:27                           ` Milan Broz
2012-10-30 17:57                           ` [dm-crypt] " Thomas Gleixner
2012-10-30 17:57                             ` Thomas Gleixner
2012-10-30 20:35                             ` [dm-crypt] " Uwe Kleine-König
2012-10-30 20:35                               ` Uwe Kleine-König
2012-10-30 20:35                               ` Uwe Kleine-König
2012-10-30 18:24                           ` [dm-crypt] " Tvrtko Ursulin
2012-10-30 18:24                             ` Tvrtko Ursulin
2012-10-29 20:48                   ` [dm-crypt] cryptsetup not working under 3.6 - regression from 3.4? Milan Broz
2012-10-29 20:48                     ` Milan Broz
2012-10-21 10:00 ` Heinz Diehl

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=alpine.LFD.2.02.1210300040000.2756@ionos \
    --to=tglx@linutronix.de \
    --cc=dm-crypt@saout.de \
    --cc=gmazyland@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=okozina@redhat.com \
    --cc=tvrtko@ursulin.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.