mount - losetup uses not available /proc/crypto/cipher

Bug #11144 reported by Debian Bug Importer
6
Affects Status Importance Assigned to Milestone
util-linux (Debian)
Fix Released
Unknown
util-linux (Ubuntu)
Fix Released
High
LaMont Jones

Bug Description

Automatically imported from Debian bug report #285353 http://bugs.debian.org/285353

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #285353 http://bugs.debian.org/285353

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 12 Dec 2004 19:46:19 +0100
From: Bastian Blank <email address hidden>
To: <email address hidden>
Subject: mount - losetup uses not available /proc/crypto/cipher

--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: mount
Version: 2.13j-3
Severity: grave

This version of losetup begins to use /proc/crypto/cipher which does not
exist on any official (upstream and debian) kernel release. This breaks
any cryptoloop partition.

Bastian

--=20
A princess should not be afraid -- not with a brave knight to protect her.
  -- McCoy, "Shore Leave", stardate 3025.3

--HcAYCG3uE/tztfnV
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iEYEARECAAYFAkG8kfsACgkQnw66O/MvCNERagCeLfUmSg05eYqv3IlHCDDASt1Y
HXMAoIZYKdrk8nJwKEj95cZ5V40qhjfZ
=tebo
-----END PGP SIGNATURE-----

--HcAYCG3uE/tztfnV--

Revision history for this message
In , LaMont Jones (lamont) wrote : Re: Bug#285353: mount - losetup uses not available /proc/crypto/cipher

severity 285353 serious
--

On Sun, Dec 12, 2004 at 07:46:19PM +0100, Bastian Blank wrote:
> This version of losetup begins to use /proc/crypto/cipher which does not
> exist on any official (upstream and debian) kernel release. This breaks
> any cryptoloop partition.

Actually, that code dates back to the 2.11n-2 release, to detect
kerneli implementations.

Before any progress can be made on this bug, I'll need some actual
details of what kind of kernel, what cryptoloop system your using,
what losetup/mount command you're using, etc.

FWIW, my cryptoloop device works just fine with the 2.6 cryptoloop
backport in debian 2.4 kernels, as well as 2.6 kernels.

lamont

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 12 Dec 2004 13:47:30 -0700
From: LaMont Jones <email address hidden>
To: Bastian Blank <email address hidden>, <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#285353: mount - losetup uses not available /proc/crypto/cipher

severity 285353 serious
--

On Sun, Dec 12, 2004 at 07:46:19PM +0100, Bastian Blank wrote:
> This version of losetup begins to use /proc/crypto/cipher which does not
> exist on any official (upstream and debian) kernel release. This breaks
> any cryptoloop partition.

Actually, that code dates back to the 2.11n-2 release, to detect
kerneli implementations.

Before any progress can be made on this bug, I'll need some actual
details of what kind of kernel, what cryptoloop system your using,
what losetup/mount command you're using, etc.

FWIW, my cryptoloop device works just fine with the 2.6 cryptoloop
backport in debian 2.4 kernels, as well as 2.6 kernels.

lamont

Revision history for this message
In , Bastian Blank (waldi) wrote :

On Sun, Dec 12, 2004 at 01:47:30PM -0700, LaMont Jones wrote:
> Before any progress can be made on this bug, I'll need some actual
> details of what kind of kernel, what cryptoloop system your using,
> what losetup/mount command you're using, etc.

Kernel: 2.6.9, vanilla, included cryptoloop on ppc.
losetup call: losetup -p 0 -e aes -k 256 /dev/loop0 file

It works after I hacked that piece of code to see /proc/crypto or loose
the -e aes.

Bastian

--
There are always alternatives.
  -- Spock, "The Galileo Seven", stardate 2822.3

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 13 Dec 2004 12:17:03 +0100
From: Bastian Blank <email address hidden>
To: LaMont Jones <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#285353: mount - losetup uses not available /proc/crypto/cipher

--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Dec 12, 2004 at 01:47:30PM -0700, LaMont Jones wrote:
> Before any progress can be made on this bug, I'll need some actual
> details of what kind of kernel, what cryptoloop system your using,
> what losetup/mount command you're using, etc.

Kernel: 2.6.9, vanilla, included cryptoloop on ppc.
losetup call: losetup -p 0 -e aes -k 256 /dev/loop0 file

It works after I hacked that piece of code to see /proc/crypto or loose
the -e aes.

Bastian

--=20
There are always alternatives.
  -- Spock, "The Galileo Seven", stardate 2822.3

--fUYQa+Pmc3FrFX/N
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iEYEARECAAYFAkG9ei8ACgkQnw66O/MvCNHZcwCcD85m1H+Qpz6EHPYUyNMi7kqi
MgIAnjzyIDf9XSxnIdpcEOCb/2EUA0xc
=rPPo
-----END PGP SIGNATURE-----

--fUYQa+Pmc3FrFX/N--

Revision history for this message
In , LaMont Jones (lamont) wrote :

On Mon, Dec 13, 2004 at 12:17:03PM +0100, Bastian Blank wrote:
> On Sun, Dec 12, 2004 at 01:47:30PM -0700, LaMont Jones wrote:
> Kernel: 2.6.9, vanilla, included cryptoloop on ppc.
> losetup call: losetup -p 0 -e aes -k 256 /dev/loop0 file
>
> It works after I hacked that piece of code to see /proc/crypto or loose
> the -e aes.

Which version of mount? There was a bug in 2.12j-1 that was fixed in
2.12j-2, specifically related to crypto devices.

I'm using a 2.6.9 kernel, 2.12j-3 mount, and a command line of:
    losetup -e aes /dev/loop0 file
without any issues. /dev/crypto access is accomplished by passing the
name to the kernel.

lamont

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 13 Dec 2004 07:15:42 -0700
From: LaMont Jones <email address hidden>
To: Bastian Blank <email address hidden>
Cc: LaMont Jones <email address hidden>, <email address hidden>
Subject: Re: Bug#285353: mount - losetup uses not available /proc/crypto/cipher

On Mon, Dec 13, 2004 at 12:17:03PM +0100, Bastian Blank wrote:
> On Sun, Dec 12, 2004 at 01:47:30PM -0700, LaMont Jones wrote:
> Kernel: 2.6.9, vanilla, included cryptoloop on ppc.
> losetup call: losetup -p 0 -e aes -k 256 /dev/loop0 file
>
> It works after I hacked that piece of code to see /proc/crypto or loose
> the -e aes.

Which version of mount? There was a bug in 2.12j-1 that was fixed in
2.12j-2, specifically related to crypto devices.

I'm using a 2.6.9 kernel, 2.12j-3 mount, and a command line of:
    losetup -e aes /dev/loop0 file
without any issues. /dev/crypto access is accomplished by passing the
name to the kernel.

lamont

Revision history for this message
In , Bastian Kleineidam (calvin) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I suggest that the code to detect kerneli uses stat(2) instead of
open(2). Currently it uses:
int kerneli = open("/proc/crypto/cipher");
if (kerneli >= 0) {
    close(kerneli);
    kerneli=1;
}
else kerneli=0;

It should use:
struct stat stbuf;
int kerneli = (stat("/proc/crypto/cipher", &stbuf) == 0);

Regards,
  Bastian
- --
  ,''`. Bastian Kleineidam
 : :' : GnuPG Schlüssel
 `. `' gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
   `-

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBwGsJeBwlBDLsbz4RAlQfAJ9TYFVIc7Z86MM9c4jj6Hp7q4FPxACfeITM
kZbgaEOxhRHCqfynms1mBFg=
=i7S6
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20041215164913.GA10491@treasure>
Date: Wed, 15 Dec 2004 17:49:13 +0100
From: Bastian Kleineidam <email address hidden>
To: <email address hidden>, <email address hidden>
Subject: Re: mount - losetup uses not available /proc/crypto/cipher

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I suggest that the code to detect kerneli uses stat(2) instead of
open(2). Currently it uses:
int kerneli = open("/proc/crypto/cipher");
if (kerneli >= 0) {
    close(kerneli);
    kerneli=1;
}
else kerneli=0;

It should use:
struct stat stbuf;
int kerneli = (stat("/proc/crypto/cipher", &stbuf) == 0);

Regards,
  Bastian
- --
  ,''`. Bastian Kleineidam
 : :' : GnuPG Schlüssel
 `. `' gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
   `-

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBwGsJeBwlBDLsbz4RAlQfAJ9TYFVIc7Z86MM9c4jj6Hp7q4FPxACfeITM
kZbgaEOxhRHCqfynms1mBFg=
=i7S6
-----END PGP SIGNATURE-----

Revision history for this message
In , Thomas Hood (jdthood-aglu) wrote : Forwarded Debian bug report #285353: "mount - losetup uses not available /proc/crypto/cipher"

forwarded 285353 Andries Brouwer <email address hidden>
thanks

Is there any bug here?

(Note: The user reported using "2.13j-3" but very probably meant
2.12j-3.)

--- Forwarded bug report ---

Date: Sun, 12 Dec 2004 19:46:19 +0100
From: Bastian Blank <email address hidden>
Subject: mount - losetup uses not available /proc/crypto/cipher

Package: mount
Version: 2.13j-3
Severity: grave

This version of losetup begins to use /proc/crypto/cipher which does not
exist on any official (upstream and debian) kernel release. This breaks
any cryptoloop partition.

[later ...]

Kernel: 2.6.9, vanilla, included cryptoloop on ppc.
losetup call: losetup -p 0 -e aes -k 256 /dev/loop0 file

It works after I hacked that piece of code to see /proc/crypto or loose
the -e aes.

--- Lamont Jones's reply ---

I'm using a 2.6.9 kernel, 2.12j-3 mount, and a command line of:
    losetup -e aes /dev/loop0 file
without any issues. /dev/crypto access is accomplished by passing the
name to the kernel.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <1103456623.22112.838.camel@thanatos>
Date: Sun, 19 Dec 2004 12:43:43 +0100
From: Thomas Hood <email address hidden>
To: Andries Brouwer <email address hidden>
Subject: Forwarded Debian bug report #285353: "mount - losetup uses not
 available /proc/crypto/cipher"

forwarded 285353 Andries Brouwer <email address hidden>
thanks

Is there any bug here?

(Note: The user reported using "2.13j-3" but very probably meant
2.12j-3.)

--- Forwarded bug report ---

Date: Sun, 12 Dec 2004 19:46:19 +0100
From: Bastian Blank <email address hidden>
Subject: mount - losetup uses not available /proc/crypto/cipher

Package: mount
Version: 2.13j-3
Severity: grave

This version of losetup begins to use /proc/crypto/cipher which does not
exist on any official (upstream and debian) kernel release. This breaks
any cryptoloop partition.

[later ...]

Kernel: 2.6.9, vanilla, included cryptoloop on ppc.
losetup call: losetup -p 0 -e aes -k 256 /dev/loop0 file

It works after I hacked that piece of code to see /proc/crypto or loose
the -e aes.

--- Lamont Jones's reply ---

I'm using a 2.6.9 kernel, 2.12j-3 mount, and a command line of:
    losetup -e aes /dev/loop0 file
without any issues. /dev/crypto access is accomplished by passing the
name to the kernel.

Revision history for this message
In , Thomas Hood (jdthood-aglu) wrote :

notforwarded 285353
thanks

On Sun, 2004-12-19 at 13:47, Andries Brouwer wrote:
> On Sun, Dec 19, 2004 at 12:43:43PM +0100, Thomas Hood wrote:
>
> > forwarded 285353 Andries Brouwer <email address hidden>
> > thanks
> >
> > Is there any bug here?
> >
> > (Note: The user reported using "2.13j-3" but very probably meant
> > 2.12j-3.)
> >
> > --- Forwarded bug report ---
> >
> > Date: Sun, 12 Dec 2004 19:46:19 +0100
> > From: Bastian Blank <email address hidden>
> > Subject: mount - losetup uses not available /proc/crypto/cipher
> >
> > Package: mount
> > Version: 2.13j-3
> > Severity: grave
> >
> > This version of losetup begins to use /proc/crypto/cipher which does not
> > exist on any official (upstream and debian) kernel release. This breaks
> > any cryptoloop partition.
>
> The util-linux source does not contain the string crypto or cipher.
> Thus, it sounds like this is a debian change.
>
> Andries

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <1103460261.2065.53.camel@thanatos>
Date: Sun, 19 Dec 2004 13:44:22 +0100
From: Thomas Hood <email address hidden>
To: <email address hidden>
Subject: Re: Forwarded Debian bug report #285353: "mount - losetup uses not
 available /proc/crypto/cipher"

notforwarded 285353
thanks

On Sun, 2004-12-19 at 13:47, Andries Brouwer wrote:
> On Sun, Dec 19, 2004 at 12:43:43PM +0100, Thomas Hood wrote:
>
> > forwarded 285353 Andries Brouwer <email address hidden>
> > thanks
> >
> > Is there any bug here?
> >
> > (Note: The user reported using "2.13j-3" but very probably meant
> > 2.12j-3.)
> >
> > --- Forwarded bug report ---
> >
> > Date: Sun, 12 Dec 2004 19:46:19 +0100
> > From: Bastian Blank <email address hidden>
> > Subject: mount - losetup uses not available /proc/crypto/cipher
> >
> > Package: mount
> > Version: 2.13j-3
> > Severity: grave
> >
> > This version of losetup begins to use /proc/crypto/cipher which does not
> > exist on any official (upstream and debian) kernel release. This breaks
> > any cryptoloop partition.
>
> The util-linux source does not contain the string crypto or cipher.
> Thus, it sounds like this is a debian change.
>
> Andries

Revision history for this message
In , Thomas Hood (jdthood-aglu) wrote : in the Debian part

This bug is in the Debian diff.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <1103473934.28796.46.camel@thanatos>
Date: Sun, 19 Dec 2004 17:32:14 +0100
From: Thomas Hood <email address hidden>
To: <email address hidden>
Subject: in the Debian part

This bug is in the Debian diff.

Revision history for this message
In , Thomas Hood (jdthood-aglu) wrote : Re: #285353: Use stat instead of open in losetup

FYI:
> util-linux (2.12k-2) unstable; urgency=lo
> [...]
> * Use stat instead of open in losetup. (From #285353)

What's your opinion about this bug?

--
Thomas Hood

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <1103619732.28796.489.camel@thanatos>
Date: Tue, 21 Dec 2004 10:02:12 +0100
From: Thomas Hood <email address hidden>
To: Bastian Kleineidam <email address hidden>
Cc: <email address hidden>
Subject: Re: #285353: Use stat instead of open in losetup

FYI:
> util-linux (2.12k-2) unstable; urgency=lo
> [...]
> * Use stat instead of open in losetup. (From #285353)

What's your opinion about this bug?

--
Thomas Hood

Revision history for this message
In , Bastian Kleineidam (calvin) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Thomas and Bastian,

On Tue, Dec 21, 2004 at 10:02:12AM +0100, Thomas Hood wrote:
> FYI:
> > util-linux (2.12k-2) unstable; urgency=lo
> > [...]
> > * Use stat instead of open in losetup. (From #285353)
>
>
> What's your opinion about this bug?

I think it can be closed. I did not have however any problems,
so it is up to Bastian Blank (the other Bastian ;) to say it is
ok to close.

Regards,
  Bastian

- --
  ,''`. Bastian Kleineidam
 : :' : GnuPG Schlüssel
 `. `' gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
   `-

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFByAUIeBwlBDLsbz4RAjiGAJ0cFN9MIly0jp7tfgFUJ7mblW1n3QCfSNql
wMQY9IID9DTeBD+DZ0j9Fa4=
=4Z7m
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20041221111209.GA2137@treasure>
Date: Tue, 21 Dec 2004 12:12:09 +0100
From: Bastian Kleineidam <email address hidden>
To: Thomas Hood <email address hidden>, <email address hidden>
Cc: <email address hidden>
Subject: Re: #285353: Use stat instead of open in losetup

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Thomas and Bastian,

On Tue, Dec 21, 2004 at 10:02:12AM +0100, Thomas Hood wrote:
> FYI:
> > util-linux (2.12k-2) unstable; urgency=lo
> > [...]
> > * Use stat instead of open in losetup. (From #285353)
>
>
> What's your opinion about this bug?

I think it can be closed. I did not have however any problems,
so it is up to Bastian Blank (the other Bastian ;) to say it is
ok to close.

Regards,
  Bastian

- --
  ,''`. Bastian Kleineidam
 : :' : GnuPG Schlüssel
 `. `' gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
   `-

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFByAUIeBwlBDLsbz4RAjiGAJ0cFN9MIly0jp7tfgFUJ7mblW1n3QCfSNql
wMQY9IID9DTeBD+DZ0j9Fa4=
=4Z7m
-----END PGP SIGNATURE-----

Revision history for this message
In , Bastian Blank (waldi) wrote :

On Tue, Dec 21, 2004 at 12:12:09PM +0100, Bastian Kleineidam wrote:
> I think it can be closed. I did not have however any problems,
> so it is up to Bastian Blank (the other Bastian ;) to say it is
> ok to close.

It seems to work, so I'm closing the report.

Bastian

--
If I can have honesty, it's easier to overlook mistakes.
  -- Kirk, "Space Seed", stardate 3141.9

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 21 Dec 2004 15:07:02 +0100
From: Bastian Blank <email address hidden>
To: Bastian Kleineidam <email address hidden>
Cc: Thomas Hood <email address hidden>, <email address hidden>
Subject: Re: #285353: Use stat instead of open in losetup

On Tue, Dec 21, 2004 at 12:12:09PM +0100, Bastian Kleineidam wrote:
> I think it can be closed. I did not have however any problems,
> so it is up to Bastian Blank (the other Bastian ;) to say it is
> ok to close.

It seems to work, so I'm closing the report.

Bastian

--=20
If I can have honesty, it's easier to overlook mistakes.
  -- Kirk, "Space Seed", stardate 3141.9

Revision history for this message
LaMont Jones (lamont) wrote :

Fixed in 2.12m or so.

Changed in util-linux:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.