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

Aron Xu aron at debian.org
Fri Mar 16 14:53:18 UTC 2018


Hi,

On Sat, Mar 3, 2018 at 2:52 AM, Fabian Grünbichler
<fabian.gruenbichler at student.tuwien.ac.at> wrote:
> 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.
>

I prefer to keep the check because 32-bit kernels are never
first-class citizens in the world of ZFS, even if it builds and works
at most cases.

On conventional hardware (say, x86 workstations and servers),
deliberately using a 32-bit kernel is rare; for other purposes user
should evaluate the risks themselves before deciding on storage
choice.

Regards,
Aron



More information about the Pkg-zfsonlinux-devel mailing list