Bug#850447: systemd backport sections only 4K aligned, won't boot with arm64 64K kernel
James Morse
james.morse at arm.com
Fri Jan 6 16:06:07 GMT 2017
Package: systemd
Version: 230-7~bpo8+2
Severity: normal
Hi,
This version of systemd won't boot on arm64 when the kernel is configured for
64K pages:
> Starting init: /etc/init exists but couldn't execute it (error -13)
> Starting init: /bin/sh exists but couldn't execute it (error -14)
> Kernel panic - not syncing: No working init found. Try passing init= option
to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
> CPU: 3 PID: 1 Comm: init Not tainted 4.10.0-rc2-00036-g5a4dd5f49931 #6712
> Hardware name: ARM Juno development board (r1) (DT)
> Call trace:
> [<ffff000008088f44>] dump_backtrace+0x0/0x25c
> [<ffff0000080891c0>] show_stack+0x20/0x28
> [<ffff0000084940b4>] dump_stack+0x94/0xb4
> [<ffff0000081af874>] panic+0x134/0x2a4
> [<ffff0000089ad834>] kernel_init+0xf4/0x104
> [<ffff000008083370>] ret_from_fork+0x10/0x20
Booting with init=/bin/bash and interrogating the linker:
> root@(none):/lib/systemd# /lib/ld-linux-aarch64.so.1 --list /sbin/init
> /sbin/init: error while loading shared libraries: /sbin/init: ELF load command
alignment not page-aligned
Comparing sytemd's LOAD sections with bash's:
> root@(none):/lib/systemd# readelf -a /sbin/init | grep -A 1 LOAD
> LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000
> 0x00000000000bc56c 0x00000000000bc56c R E 1000
> LOAD 0x00000000000bc7a8 0x00000000000bd7a8 0x00000000000bd7a8
> 0x0000000000020a88 0x0000000000020b7d RW 1000
> root@(none):/lib/systemd# readelf -a /bin/bash | grep -A 1 LOAD
> LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000
> 0x00000000000d49f4 0x00000000000d49f4 R E 10000
> LOAD 0x00000000000d4db0 0x00000000004e4db0 0x00000000004e4db0
> 0x0000000000008ae8 0x000000000000e728 RW 10000
(The key to these tables is:)
> Program Headers:
> Type Offset VirtAddr PhysAddr
> FileSiz MemSiz Flags Align
The Align value for each of systemd's LOAD sections is 4K aligned, not 64K, so
the runtime linker can't load it when the kernel is built with a page-size
other than 4K.
This was reported by Basil Eljuse who was using a filesystem from Linaro.
Sanity check whether this should be reported to debian by poking around in
the original deb file:
> readlink sbin/init
> /lib/systemd/systemd
> wget
http://ftp.uk.debian.org/debian/pool/main/s/systemd/systemd_230-7~bpo8+2_arm64.deb
> ar x systemd_230-7~bpo8+2_arm64.deb
> tar xf data.tar.xz
> readelf -a lib/systemd/systemd | grep -A 1 LOAD
> LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000
> 0x00000000000bc56c 0x00000000000bc56c R E 1000
> LOAD 0x00000000000bc7a8 0x00000000000bd7a8 0x00000000000bd7a8
> 0x0000000000020a88 0x0000000000020b7d RW 1000
This is potentially a wider issue affecting anything else built with the same
linker that built this 'bpo' package.
Thanks,
James
-- Package-specific info:
-- System Information:
Debian Release: 8.6
APT prefers vivid
APT policy: (500, 'vivid'), (500, 'stable-updates'), (500, 'stable')
Architecture: arm64 (aarch64)
Kernel: Linux 4.10.0-rc2-00036-g5a4dd5f49931 (SMP w/6 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages systemd depends on:
ii adduser 3.113+nmu3
ii libacl1 2.2.52-2
ii libapparmor1 2.10.95-4~bpo8+2
ii libaudit1 1:2.4-1+b1
ii libblkid1 2.27.1-1.linarojessie.1
ii libc6 2.19-18+deb8u6
ii libcap2 1:2.24-8
ii libcap2-bin 1:2.24-8
ii libcryptsetup4 2:1.6.6-5
ii libgcrypt20 1.6.3-2+deb8u2
ii libgpg-error0 1.17-3
ii libidn11 1.29-1+deb8u2
ii libkmod2 18-3
ii liblzma5 5.1.1alpha+20120614-2+b3
ii libmount1 2.27.1-1.linarojessie.1
ii libpam0g 1.1.8-3.1+deb8u1+b1
ii libseccomp2 2.2.3-3~bpo8+1
ii libselinux1 2.3-2
ii libsystemd0 230-7~bpo8+2
ii mount 2.27.1-1.linarojessie.1
ii util-linux 2.27.1-1.linarojessie.1
Versions of packages systemd recommends:
ii dbus 1.8.20-0+deb8u1
ii libpam-systemd 230-7~bpo8+2
Versions of packages systemd suggests:
ii policykit-1 0.105-15~deb8u2
pn systemd-container <none>
pn systemd-ui <none>
Versions of packages systemd is related to:
ii udev 230-7~bpo8+2
-- Configuration Files:
/etc/systemd/system.conf changed:
[Manager]
LogLevel=warning
LogTarget=journal
-- no debconf information
More information about the Pkg-systemd-maintainers
mailing list