[Pkg-zfsonlinux-devel] Bug#891936: zfs-dkms: 32/64-bit detection via /proc/kallsyms is a bad idea

Fabian Grünbichler fabian.gruenbichler at student.tuwien.ac.at
Fri Mar 2 18:52:14 UTC 2018


Package: zfs-dkms
Version: 0.7.6-1
Severity: normal

the zfs-dkms package tries to detect whether the (running) kernel is a
32-bit or 64-bit one with the following stanza (in zfs-dkms.config /
zfs-dkms.postinst):

$ head -1 /proc/kallsyms|awk '{print $1}'|wc -c

and checking the length of the resulting string.

if the check fails or reports a 32-bit kernel, the user is prompted via
debconf whether the build should be aborted.

both the check and the resulting actions is wrong and should likely be
dropped altogether:
- kallsyms recently got more restrictive and does not print address for
  all entries. the recent 4.15 kernel uploaded to sid has two lines
  starting with "          (null)" at the top, which breaks the check
- kallsyms might be disabled (in a custom kernel build)
- the running kernel is not necessarily the (only) one that dkms builds for
- ZFS supports 32-bit (although with a footnote about potential
  address space related stability problems)

if this check is still desired, it should probably be fixed and made
more smart and check the actual kernel sources that dkms will build
with.

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.15.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages zfs-dkms depends on:
ii  debconf [debconf-2.0]  1.5.66
ii  dkms                   2.3-3
ii  lsb-release            9.20170808
ii  spl-dkms               0.7.6-1

Versions of packages zfs-dkms recommends:
ii  linux-libc-dev  4.15.4-1
ii  zfs-zed         0.7.6-1
ii  zfsutils-linux  0.7.6-1

zfs-dkms suggests no packages.

-- debconf information excluded
To: submit at bugs.debian.org
Cc: 
Bcc: 
Subject: 
Reply-To: 



More information about the Pkg-zfsonlinux-devel mailing list