diff options
author | Jiri Kosina <jkosina@suse.cz> | 2015-01-09 09:53:21 (GMT) |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-01-09 09:55:10 (GMT) |
commit | b9dfe0bed999d23ee8838d389637dd8aef83fafa (patch) | |
tree | 1e1761aa65759226ca26fe931b1b48de4cf65af9 /kernel/livepatch/core.c | |
parent | 83ac237a950e130c974d0170cce30891dcd8f250 (diff) | |
download | linux-b9dfe0bed999d23ee8838d389637dd8aef83fafa.tar.xz |
livepatch: handle ancient compilers with more grace
We are aborting a build in case when gcc doesn't support fentry on x86_64
(regs->ip modification can't really reliably work with mcount).
This however breaks allmodconfig for people with older gccs that don't
support -mfentry.
Turn the build-time failure into runtime failure, resulting in the whole
infrastructure not being initialized if CC_USING_FENTRY is unset.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'kernel/livepatch/core.c')
-rw-r--r-- | kernel/livepatch/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 6f63879..ce42d3b 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -911,6 +911,12 @@ static int klp_init(void) { int ret; + ret = klp_check_compiler_support(); + if (ret) { + pr_info("Your compiler is too old; turning off.\n"); + return -EINVAL; + } + ret = register_module_notifier(&klp_module_nb); if (ret) return ret; |