Message ID | 20190823130557.15870-1-johannes@sipsolutions.net |
---|---|
State | Superseded |
Headers | show |
Series | arch: um: enable CONFIG_CONSTRUCTORS | expand |
On Fri, 2019-08-23 at 15:05 +0200, Johannes Berg wrote: > > -#ifdef CONFIG_CONSTRUCTORS > +#if defined(CONFIG_CONSTRUCTORS) && !defined(CONFIG_UML) > ctor_fn_t *fn = (ctor_fn_t *) __ctors_start; Hmm, no, this doesn't work. I was trying to do this for KASAN, but libc calls this stuff WAY too early, and so KASAN just crashes. It *does* get called (only once), but much too early. Let's see if I can come up with a fix. johannes
diff --git a/init/Kconfig b/init/Kconfig index bd7d650d4a99..81293d78a6ad 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -48,7 +48,6 @@ config CC_DISABLE_WARN_MAYBE_UNINITIALIZED config CONSTRUCTORS bool - depends on !UML config IRQ_WORK bool diff --git a/init/main.c b/init/main.c index 96f8d5af52d6..1e670be141c8 100644 --- a/init/main.c +++ b/init/main.c @@ -788,7 +788,7 @@ asmlinkage __visible void __init start_kernel(void) /* Call all constructor functions linked into the kernel. */ static void __init do_ctors(void) { -#ifdef CONFIG_CONSTRUCTORS +#if defined(CONFIG_CONSTRUCTORS) && !defined(CONFIG_UML) ctor_fn_t *fn = (ctor_fn_t *) __ctors_start; for (; fn < (ctor_fn_t *) __ctors_end; fn++) diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index 3941a9c48f83..060e8e726755 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig @@ -4,7 +4,7 @@ menu "GCOV-based kernel profiling" config GCOV_KERNEL bool "Enable gcov-based kernel profiling" depends on DEBUG_FS - select CONSTRUCTORS if !UML + select CONSTRUCTORS default n ---help--- This option enables gcov-based code profiling (e.g. for code coverage