livepatch: handle ancient compilers with more grace
authorJiri Kosina <jkosina@suse.cz>
Fri, 9 Jan 2015 09:53:21 +0000 (10:53 +0100)
committerJiri Kosina <jkosina@suse.cz>
Fri, 9 Jan 2015 09:55:10 +0000 (10:55 +0100)
commitb9dfe0bed999d23ee8838d389637dd8aef83fafa
tree1e1761aa65759226ca26fe931b1b48de4cf65af9
parent83ac237a950e130c974d0170cce30891dcd8f250
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>
arch/x86/include/asm/livepatch.h
kernel/livepatch/core.c