Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 850199 - sys-kernel/gentoo-sources-5.4.197: switch_root: failed to execute /sbin/init: Exec format error
Summary: sys-kernel/gentoo-sources-5.4.197: switch_root: failed to execute /sbin/init:...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-07 03:27 UTC by Michał Górny
Modified: 2022-06-07 10:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.