2017-11-24 15:00:38 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2015-03-26 10:10:17 +01:00
|
|
|
/*
|
|
|
|
* livepatch.h - s390-specific Kernel Live Patching Core
|
|
|
|
*
|
|
|
|
* Copyright (c) 2013-2015 SUSE
|
|
|
|
* Authors: Jiri Kosina
|
|
|
|
* Vojtech Pavlik
|
|
|
|
* Jiri Slaby
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ASM_LIVEPATCH_H
|
|
|
|
#define ASM_LIVEPATCH_H
|
|
|
|
|
2020-10-28 17:15:27 -04:00
|
|
|
#include <linux/ftrace.h>
|
2017-02-09 15:20:25 -05:00
|
|
|
#include <asm/ptrace.h>
|
2015-03-26 10:10:17 +01:00
|
|
|
|
2020-10-28 17:15:27 -04:00
|
|
|
static inline void klp_arch_set_pc(struct ftrace_regs *fregs, unsigned long ip)
|
2015-03-26 10:10:17 +01:00
|
|
|
{
|
2020-10-28 17:15:27 -04:00
|
|
|
struct pt_regs *regs = ftrace_get_regs(fregs);
|
|
|
|
|
2015-03-26 10:10:17 +01:00
|
|
|
regs->psw.addr = ip;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|