mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
livepatch: Remove klp_check_compiler_support()
The only purpose of klp_check_compiler_support() is to make sure that we are not using ftrace on x86 via mcount (because that's executed only after prologue has already happened, and that's too late for livepatching purposes). Now that mcount is not supported by ftrace any more, there is no need for klp_check_compiler_support() either. Link: http://lkml.kernel.org/r/nycvar.YFH.7.76.1905102346100.17054@cbobk.fhfr.pm Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
parent
562e14f722
commit
56e33afd77
@ -24,11 +24,6 @@
|
||||
#include <linux/sched/task_stack.h>
|
||||
|
||||
#ifdef CONFIG_LIVEPATCH
|
||||
static inline int klp_check_compiler_support(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip)
|
||||
{
|
||||
regs->nip = ip;
|
||||
|
@ -13,11 +13,6 @@
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
static inline int klp_check_compiler_support(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip)
|
||||
{
|
||||
regs->psw.addr = ip;
|
||||
|
@ -24,11 +24,6 @@
|
||||
#include <asm/setup.h>
|
||||
#include <linux/ftrace.h>
|
||||
|
||||
static inline int klp_check_compiler_support(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip)
|
||||
{
|
||||
regs->ip = ip;
|
||||
|
@ -1220,14 +1220,6 @@ void klp_module_going(struct module *mod)
|
||||
|
||||
static int __init klp_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = klp_check_compiler_support();
|
||||
if (ret) {
|
||||
pr_info("Your compiler is too old; turning off.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
klp_root_kobj = kobject_create_and_add("livepatch", kernel_kobj);
|
||||
if (!klp_root_kobj)
|
||||
return -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user