diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-12-04 17:43:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-01 09:34:53 +0000 |
commit | dd350f3918be4b2bb298647cd9d467beeaf2c22a (patch) | |
tree | 7dba4c3de56cbacb680cf1ee281d5ab5e8f7341f /init/Kconfig | |
parent | a775f67b4b6110d07bea24fcd3303ca53fcb0ecf (diff) | |
download | linux-stable-dd350f3918be4b2bb298647cd9d467beeaf2c22a.tar.gz linux-stable-dd350f3918be4b2bb298647cd9d467beeaf2c22a.tar.bz2 linux-stable-dd350f3918be4b2bb298647cd9d467beeaf2c22a.zip |
Revert "um: Enable CONFIG_CONSTRUCTORS"
commit 87c9366e17259040a9118e06b6dc8de986e5d3d1 upstream.
This reverts commit 786b2384bf1c ("um: Enable CONFIG_CONSTRUCTORS").
There are two issues with this commit, uncovered by Anton in tests
on some (Debian) systems:
1) I completely forgot to call any constructors if CONFIG_CONSTRUCTORS
isn't set. Don't recall now if it just wasn't needed on my system, or
if I never tested this case.
2) With that fixed, it works - with CONFIG_CONSTRUCTORS *unset*. If I
set CONFIG_CONSTRUCTORS, it fails again, which isn't totally
unexpected since whatever wanted to run is likely to have to run
before the kernel init etc. that calls the constructors in this case.
Basically, some constructors that gcc emits (libc has?) need to run
very early during init; the failure mode otherwise was that the ptrace
fork test already failed:
----------------------
$ ./linux mem=512M
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...check_ptrace : child exited with exitcode 6, while expecting 0; status 0x67f
Aborted
----------------------
Thinking more about this, it's clear that we simply cannot support
CONFIG_CONSTRUCTORS in UML. All the cases we need now (gcov, kasan)
involve not use of the __attribute__((constructor)), but instead
some constructor code/entry generated by gcc. Therefore, we cannot
distinguish between kernel constructors and system constructors.
Thus, revert this commit.
Cc: stable@vger.kernel.org [5.4+]
Fixes: 786b2384bf1c ("um: Enable CONFIG_CONSTRUCTORS")
Reported-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'init/Kconfig')
-rw-r--r-- | init/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig index b4daad2bac23..0328b53d09ad 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -54,6 +54,7 @@ config CC_DISABLE_WARN_MAYBE_UNINITIALIZED config CONSTRUCTORS bool + depends on !UML config IRQ_WORK bool |