Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 850199

Summary: sys-kernel/gentoo-sources-5.4.197: switch_root: failed to execute /sbin/init: Exec format error
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Distribution Kernel Project <dist-kernel>
Status: RESOLVED INVALID    
Severity: normal CC: dist-kernel, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-06-07 03:27:48 UTC
While testing 5.4.197, I've noticed that it fails to boot our test image (the process is found in kernel-install.eclass).  The boot fails with:

  switch_root: failed to execute /sbin/init: Exec format error

Following sam's suggestion I've attempted to revert the following commit:

https://github.com/gregkh/linux/commit/1fe82bfd9e4ce93399d815ca458b58505191c3e8

  commit 1fe82bfd9e4ce93399d815ca458b58505191c3e8
  Author: Kees Cook <keescook@chromium.org>
  Date:   Mon Jan 31 16:09:47 2022 -0800

      exec: Force single empty string when argv is empty

After reverting it, the kernel booted successfully.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-06-07 04:32:28 UTC
I'm sorry, it seems to have been an unfortunate quirk that just happened simultaneously in all builds.  After retrying, both amd64 and x86 pass without the revert.
Comment 2 Mike Pagano gentoo-dev 2022-06-07 10:27:58 UTC
Reassigning properly so that it can be found more easily if someone else stumbles upon this during the dist-kernel process since it is not a gentoo-sources issue.