lvm2 - uses internal kernel header

Bug #7075 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
lvm2 (Debian)
Fix Released
Unknown
lvm2 (Ubuntu)
Invalid
High
Unassigned

Bug Description

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

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

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

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

Message-ID: <email address hidden>
Date: Fri, 16 Jul 2004 15:02:43 +0200
From: Bastian Blank <email address hidden>
To: <email address hidden>
Subject: lvm2 - uses internal kernel header

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

Package: lvm2
Version: 2.00.19-2
Severity: grave

lvm2 uses a internal kernel header, asm/byteorder.h. This makes the lvm2
metadata format unusable on s390, as the headers are not correct,
exactly: __cpu_to_le64 is broken.

DON'T raise this issue to linux-kernel-headers, including this headers
in userspace programs is a no-no.

Bastian

--=20
No one can guarantee the actions of another.
  -- Spock, "Day of the Dove", stardate unknown

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

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

iEYEARECAAYFAkD30fMACgkQnw66O/MvCNFWGACgoKCmRJ6ov9Gjla4ESRgm23So
mUoAnjtQX2v/e2tozrawMbn+dShax4po
=k1kx
-----END PGP SIGNATURE-----

--EeQfGwPcQSOJBaQU--

Revision history for this message
In , Patrick Caulfield (patrick-debian) wrote : Re: Bug#259733: lvm2 - uses internal kernel header

On Fri, Jul 16, 2004 at 03:02:43PM +0200, Bastian Blank wrote:
> Package: lvm2
> Version: 2.00.19-2
> Severity: grave
>
> lvm2 uses a internal kernel header, asm/byteorder.h. This makes the lvm2
> metadata format unusable on s390, as the headers are not correct,
> exactly: __cpu_to_le64 is broken.
>
> DON'T raise this issue to linux-kernel-headers, including this headers
> in userspace programs is a no-no.
>

So lets get this straight.

lvm is using a package that's installed on the system but that no-one is allowed
to use. And this package has a bug in it that no-one is allowed to report.

Is that correct ?

--

patrick

Revision history for this message
In , Matt Zimmerman (mdz) wrote :

tags 259733 patch
thanks

The kernel headers are present for glibc's use. lvm2 should not include
them. The fact that it does is a bug.

If there is a problem with the kernel headers which only affects a userland
program trying to include them, then that is not a bug in
linux-kernel-headers, since they are being used incorrectly.

Here's a patch:

http://www.no-name-yet.com/patches/lvm2.259733.diff

--
 - mdz

Revision history for this message
Matt Zimmerman (mdz) wrote :

This is wrong, but it is not a policy violation, and doesn't break the build on
any warty architectures, so NOTWARTY

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

On Fri, Jul 16, 2004 at 08:02:22PM +0100, Patrick Caulfield wrote:
> Could I ask you to try Matt's patch (I knew he'd respond, if I rattled his cage
> hard enough!) please. And also see if it fixes the other s390-related LVM bugs
> you have outstanding in the BTS.

I attached a patch which uses the optimized routines provided by
byteswap.h. It seems to fix any of the remaining issues.

Another problem: names which begins with an underscore and a capital
letter are reserved for the implementation. Many of the includes defines
a name which begins with "_LVM_".

Bastian

--
I'm a soldier, not a diplomat. I can only tell the truth.
  -- Kirk, "Errand of Mercy", stardate 3198.9

Revision history for this message
In , Patrick Caulfield (patrick-debian) wrote :

On Sat, Jul 17, 2004 at 02:19:49PM +0200, Bastian Blank wrote:
> On Fri, Jul 16, 2004 at 08:02:22PM +0100, Patrick Caulfield wrote:
> > Could I ask you to try Matt's patch (I knew he'd respond, if I rattled his cage
> > hard enough!) please. And also see if it fixes the other s390-related LVM bugs
> > you have outstanding in the BTS.
>
> I attached a patch which uses the optimized routines provided by
> byteswap.h. It seems to fix any of the remaining issues.

That's great thanks a lot. I'll see what I can get pushed upstream, though
Alasdair is away at OLS for a week now.

patrick

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

Message-ID: <email address hidden>
Date: Fri, 16 Jul 2004 16:13:43 +0100
From: Patrick Caulfield <email address hidden>
To: Bastian Blank <email address hidden>, <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#259733: lvm2 - uses internal kernel header

On Fri, Jul 16, 2004 at 03:02:43PM +0200, Bastian Blank wrote:
> Package: lvm2
> Version: 2.00.19-2
> Severity: grave
>
> lvm2 uses a internal kernel header, asm/byteorder.h. This makes the lvm2
> metadata format unusable on s390, as the headers are not correct,
> exactly: __cpu_to_le64 is broken.
>
> DON'T raise this issue to linux-kernel-headers, including this headers
> in userspace programs is a no-no.
>

So lets get this straight.

lvm is using a package that's installed on the system but that no-one is allowed
to use. And this package has a bug in it that no-one is allowed to report.

Is that correct ?

--

patrick

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

Message-ID: <email address hidden>
Date: Fri, 16 Jul 2004 10:56:43 -0700
From: Matt Zimmerman <email address hidden>
To: <email address hidden>
Subject: Re: Bug#259733: lvm2 - uses internal kernel header

tags 259733 patch
thanks

The kernel headers are present for glibc's use. lvm2 should not include
them. The fact that it does is a bug.

If there is a problem with the kernel headers which only affects a userland
program trying to include them, then that is not a bug in
linux-kernel-headers, since they are being used incorrectly.

Here's a patch:

http://www.no-name-yet.com/patches/lvm2.259733.diff

--
 - mdz

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (4.4 KiB)

Message-ID: <email address hidden>
Date: Sat, 17 Jul 2004 14:19:49 +0200
From: Bastian Blank <email address hidden>
To: Patrick Caulfield <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#259733: lvm2 - uses internal kernel header

--76DTJ5CE0DCVQemd
Content-Type: multipart/mixed; boundary="8X7/QrJGcKSMr1RN"
Content-Disposition: inline

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

On Fri, Jul 16, 2004 at 08:02:22PM +0100, Patrick Caulfield wrote:
> Could I ask you to try Matt's patch (I knew he'd respond, if I rattled hi=
s cage
> hard enough!) please. And also see if it fixes the other s390-related LVM=
 bugs
> you have outstanding in the BTS.

I attached a patch which uses the optimized routines provided by
byteswap.h. It seems to fix any of the remaining issues.

Another problem: names which begins with an underscore and a capital
letter are reserved for the implementation. Many of the includes defines
a name which begins with "_LVM_".

Bastian

--=20
I'm a soldier, not a diplomat. I can only tell the truth.
  -- Kirk, "Errand of Mercy", stardate 3198.9

--8X7/QrJGcKSMr1RN
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename=diff
Content-Transfer-Encoding: quoted-printable

diff -u lvm2-2.00.19/debian/changelog lvm2-2.00.19/debian/changelog
--- lvm2-2.00.19/debian/changelog
+++ lvm2-2.00.19/debian/changelog
@@ -1,3 +1,9 @@
+lvm2 (2.00.19-2.1) unstable; urgency=3Dlow
+
+ * Don't use linux kernel header.
+
+ -- Bastian Blank <email address hidden> Sat, 17 Jul 2004 12:11:35 +0200
+
 lvm2 (2.00.19-2) unstable; urgency=3Dlow
=20
   * Switch to debconf-gettext templates
only in patch2:
unchanged:
--- lvm2-2.00.19.orig/lib/mm/xlate.h
+++ lvm2-2.00.19/lib/mm/xlate.h
@@ -13,52 +13,28 @@
  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
=20
-#ifndef _LVM_XLATE_H
-#define _LVM_XLATE_H
+#ifndef LVM_XLATE_H
+#define LVM_XLATE_H
=20
-#ifdef linux
-# include <asm/byteorder.h>
-# define xlate16(x) __cpu_to_le16((x))
-# define xlate32(x) __cpu_to_le32((x))
-# define xlate64(x) __cpu_to_le64((x))
-# define xlate16_be(x) __cpu_to_be16((x))
-# define xlate32_be(x) __cpu_to_be32((x))
-# define xlate64_be(x) __cpu_to_be64((x))
+#include <byteswap.h>
+#include <endian.h>
+
+#if BYTE_ORDER =3D=3D LITTLE_ENDIAN
+# define xlate16(x) (x)
+# define xlate32(x) (x)
+# define xlate64(x) (x)
+# define xlate16_be(x) bswap_16(x)
+# define xlate32_be(x) bswap_32(x)
+# define xlate64_be(x) bswap_64(x)
+#elif BYTE_ORDER =3D=3D BIG_ENDIAN
+# define xlate16(x) bswap_16(x)
+# define xlate32(x) bswap_32(x)
+# define xlate64(x) bswap_64(x)
+# define xlate16_be(x) (x)
+# define xlate32_be(x) (x)
+# define xlate64_be(x) (x)
 #else
-# include <machine/endian.h>
-# if !defined(BYTE_ORDER) || \
- (BYTE_ORDER !=3D BIG_ENDIAN && BYTE_ORDER !=3D LITTLE_ENDIAN)
-# error "Undefined or unrecognised BYTE_ORDER";
-# endif
-# define __xlate16(x) (((x) & 0x00ffU) << 8 | \
- ((x) & 0xff00U) >> 8)
-# define __xlate32(x) (((x) & 0x000000ffU) << 24 | \
- ((x) & 0xff000000U) >> 24 | \
- ((x) ...

Read more...

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

Message-ID: <email address hidden>
Date: Sat, 17 Jul 2004 15:24:00 +0100
From: Patrick Caulfield <email address hidden>
To: Bastian Blank <email address hidden>, <email address hidden>
Subject: Re: Bug#259733: lvm2 - uses internal kernel header

On Sat, Jul 17, 2004 at 02:19:49PM +0200, Bastian Blank wrote:
> On Fri, Jul 16, 2004 at 08:02:22PM +0100, Patrick Caulfield wrote:
> > Could I ask you to try Matt's patch (I knew he'd respond, if I rattled his cage
> > hard enough!) please. And also see if it fixes the other s390-related LVM bugs
> > you have outstanding in the BTS.
>
> I attached a patch which uses the optimized routines provided by
> byteswap.h. It seems to fix any of the remaining issues.

That's great thanks a lot. I'll see what I can get pushed upstream, though
Alasdair is away at OLS for a week now.

patrick

Revision history for this message
In , Patrick Caulfield (patrick-debian) wrote : Bug#259733: fixed in lvm2 2.00.19-3

Source: lvm2
Source-Version: 2.00.19-3

We believe that the bug you reported is fixed in the latest version of
lvm2, which is due to be installed in the Debian FTP archive:

lvm2-udeb_2.00.19-3_i386.udeb
  to pool/main/l/lvm2/lvm2-udeb_2.00.19-3_i386.udeb
lvm2_2.00.19-3.diff.gz
  to pool/main/l/lvm2/lvm2_2.00.19-3.diff.gz
lvm2_2.00.19-3.dsc
  to pool/main/l/lvm2/lvm2_2.00.19-3.dsc
lvm2_2.00.19-3_i386.deb
  to pool/main/l/lvm2/lvm2_2.00.19-3_i386.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Patrick Caulfield <email address hidden> (supplier of updated lvm2 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

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

Format: 1.7
Date: Mon, 2 Aug 2004 11:37:15 +0100
Source: lvm2
Binary: lvm2-udeb lvm2
Architecture: source i386
Version: 2.00.19-3
Distribution: unstable
Urgency: low
Maintainer: Patrick Caulfield <email address hidden>
Changed-By: Patrick Caulfield <email address hidden>
Description:
 lvm2 - The Linux Logical Volume Manager
 lvm2-udeb - The Linux Logical Volume Manager (udeb)
Closes: 259733 260700
Changes:
 lvm2 (2.00.19-3) unstable; urgency=low
 .
   * Use libc byteswap functions.
     Closes: #259733
   * Add French debconfg translation
     Closes: #260700
Files:
 7569b681d309e649cd88dc5631d29c50 658 admin optional lvm2_2.00.19-3.dsc
 d2847517f3f113fd3fc64d9c4ad49a6c 7941 admin optional lvm2_2.00.19-3.diff.gz
 7f0f4b583abfebc9a5f7cadf6e3cb667 243324 admin optional lvm2_2.00.19-3_i386.deb
 79da0f130993a0dc85ea73e6bd852244 192862 debian-installer optional lvm2-udeb_2.00.19-3_i386.udeb

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

iD8DBQFBDhndhej7/PCycRMRAu+MAJsE3zZoSFUm0GLeRL+jXiLFVaKU0ACeLjme
AltUf1sXLRoJK1s0hTPH8vM=
=Crox
-----END PGP SIGNATURE-----

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

Message-Id: <email address hidden>
Date: Mon, 02 Aug 2004 07:47:27 -0400
From: Patrick Caulfield <email address hidden>
To: <email address hidden>
Subject: Bug#259733: fixed in lvm2 2.00.19-3

Source: lvm2
Source-Version: 2.00.19-3

We believe that the bug you reported is fixed in the latest version of
lvm2, which is due to be installed in the Debian FTP archive:

lvm2-udeb_2.00.19-3_i386.udeb
  to pool/main/l/lvm2/lvm2-udeb_2.00.19-3_i386.udeb
lvm2_2.00.19-3.diff.gz
  to pool/main/l/lvm2/lvm2_2.00.19-3.diff.gz
lvm2_2.00.19-3.dsc
  to pool/main/l/lvm2/lvm2_2.00.19-3.dsc
lvm2_2.00.19-3_i386.deb
  to pool/main/l/lvm2/lvm2_2.00.19-3_i386.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Patrick Caulfield <email address hidden> (supplier of updated lvm2 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

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

Format: 1.7
Date: Mon, 2 Aug 2004 11:37:15 +0100
Source: lvm2
Binary: lvm2-udeb lvm2
Architecture: source i386
Version: 2.00.19-3
Distribution: unstable
Urgency: low
Maintainer: Patrick Caulfield <email address hidden>
Changed-By: Patrick Caulfield <email address hidden>
Description:
 lvm2 - The Linux Logical Volume Manager
 lvm2-udeb - The Linux Logical Volume Manager (udeb)
Closes: 259733 260700
Changes:
 lvm2 (2.00.19-3) unstable; urgency=low
 .
   * Use libc byteswap functions.
     Closes: #259733
   * Add French debconfg translation
     Closes: #260700
Files:
 7569b681d309e649cd88dc5631d29c50 658 admin optional lvm2_2.00.19-3.dsc
 d2847517f3f113fd3fc64d9c4ad49a6c 7941 admin optional lvm2_2.00.19-3.diff.gz
 7f0f4b583abfebc9a5f7cadf6e3cb667 243324 admin optional lvm2_2.00.19-3_i386.deb
 79da0f130993a0dc85ea73e6bd852244 192862 debian-installer optional lvm2-udeb_2.00.19-3_i386.udeb

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

iD8DBQFBDhndhej7/PCycRMRAu+MAJsE3zZoSFUm0GLeRL+jXiLFVaKU0ACeLjme
AltUf1sXLRoJK1s0hTPH8vM=
=Crox
-----END PGP SIGNATURE-----

Changed in lvm2:
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.