kumquat-buildroot/package/busybox
Romain Naour f3fa74a8f7 package/busybox: disable stack optimization for i386 target
The toolchain-builder project reported an issue with Qemu 7.2.0 for
x86-core2--glibc--bleeding-edge toolchain [1]:

  Run /sbin/init as init process
  random: fast init done
  EXT4-fs (vda): warning: mounting unchecked fs, running e2fsck is recommended
  EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled.
  Starting syslogd: OK
  traps: syslogd[52] general protection fault ip:b7e21465 sp:bfe59e6c error:0 in libc.so.6[b7d9b000+123000]
  Starting klogd: OK
  traps: klogd[56] general protection fault ip:b7e94465 sp:bf8f069c error:0 in libc.so.6[b7e0e000+123000]
  Running sysctl: traps: logger[62] general protection fault ip:b7e48b6c sp:bfd7d194 error:0 in libc.so.6[b7e05000+123000]
  Segmentation fault
  traps: logger[64] general protection fault ip:b7dd3b6c sp:bf9b8604 error:0 in libc.so.6[b7d90000+123000]
  Segmentation fault

  (Followed by a kernel panic.)

Testing with the pevious Qemu release (7.1.0) allows to boot the system without any problem.

Building qemu sources between 7.1.0 and 7.2.0 allows to identify the first "bad" commit [2] and
report to the Qemu project [3].

Thanks to Qemu maintainers review, several issues was noticed:

  "The default i386 busybox build config does not respect glibc's requirements around stack alignment
  (see [4] for previous discussions and a workaround)."

Disabling CONFIG_STACK_OPTIMIZATION_386 option (as suggested in the Gentoo bug report) fixed the issue!

This option has been added and enabled by default in buxybox 1_29_0, so it was used since then the for
Buildroot's qemu defconfig.

Note: The x86-i686--glibc--bleeding-edge (generic x86) doesn't trigger the issue with
CONFIG_STACK_OPTIMIZATION_386 enabled.

Fixes:
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/3731683337

[1] https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/3731683337
[2] 958e1dd130
[3] https://gitlab.com/qemu-project/qemu/-/issues/1478
[4] https://bugs.gentoo.org/725674

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-05-11 22:41:37 +02:00
..
0001-networking-libiproute-use-linux-if_packet.h-instead-.patch
0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch
0003-libbb-sockaddr2str-ensure-only-printable-characters-.patch package/busybox: update to 1.36.0 2023-02-07 14:30:56 +01:00
0004-nslookup-sanitize-all-printed-strings-with-printable.patch package/busybox: update to 1.36.0 2023-02-07 14:30:56 +01:00
0005-seedrng-fix-for-glibc-2.24-not-providing-getrandom.patch package: busybox: backport fix for missing getrandom() 2023-05-09 20:44:55 +02:00
0006-seedrng-fix-for-glibc-2.24-not-providing-random-head.patch package: busybox: backport fix for missing getrandom() 2023-05-09 20:44:55 +02:00
0007-seedrng-fix-getrandom-detection-for-non-glibc-libc.patch package: busybox: backport fix for missing getrandom() 2023-05-09 20:44:55 +02:00
busybox-minimal.config package/busybox: disable stack optimization for i386 target 2023-05-11 22:41:37 +02:00
busybox.config package/busybox: disable stack optimization for i386 target 2023-05-11 22:41:37 +02:00
busybox.hash package/busybox: update to 1.36.0 2023-02-07 14:30:56 +01:00
busybox.mk package/busybox: disable sha1/sha256 hwaccel with x86 2023-05-07 15:01:28 +02:00
Config.in
inittab
mdev.conf
S01syslogd
S02klogd
S02sysctl
S10mdev
S15watchdog
S50telnet
telnetd.service
udhcpc.script