mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-08 23:55:14 +00:00
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>
This commit is contained in:
parent
83ac237a95
commit
b9dfe0bed9
2 changed files with 11 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue