Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 860dba45 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Martin Schwidefsky
Browse files

[S390] add kprobes annotations



Add kprobes annotations to get the massive 'probe kernel.function("*") {}'
stress test working.

Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 4a188635
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -188,6 +188,8 @@ STACK_SIZE = 1 << STACK_SHIFT
	ssm	__SF_EMPTY(%r15)
	.endm

	.section .kprobes.text, "ax"

/*
 * Scheduler resume function, called by switch_to
 *  gpr2 = (task_struct *) prev
@@ -861,6 +863,8 @@ restart_crash:
restart_go:
#endif

	.section .kprobes.text, "ax"

#ifdef CONFIG_CHECK_STACK
/*
 * The synchronous or the asynchronous stack overflowed. We are dead.
+4 −0
Original line number Diff line number Diff line
@@ -197,6 +197,8 @@ _TIF_SYSCALL = (_TIF_SYSCALL_TRACE>>8 | _TIF_SYSCALL_AUDIT>>8 | \
	ssm	__SF_EMPTY(%r15)
	.endm

	.section .kprobes.text, "ax"

/*
 * Scheduler resume function, called by switch_to
 *  gpr2 = (task_struct *) prev
@@ -868,6 +870,8 @@ restart_crash:
restart_go:
#endif

	.section .kprobes.text, "ax"

#ifdef CONFIG_CHECK_STACK
/*
 * The synchronous or the asynchronous stack overflowed. We are dead.
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@

#include <asm/asm-offsets.h>

	.section .kprobes.text, "ax"

	.globl ftrace_stub
ftrace_stub:
	br	%r14
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@

#include <asm/asm-offsets.h>

	.section .kprobes.text, "ax"

	.globl ftrace_stub
ftrace_stub:
	br	%r14
+6 −3
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include <linux/kernel_stat.h>
#include <linux/syscalls.h>
#include <linux/compat.h>
#include <linux/kprobes.h>
#include <asm/compat.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -116,15 +117,17 @@ void cpu_idle(void)
	}
}

extern void kernel_thread_starter(void);
extern void __kprobes kernel_thread_starter(void);

asm(
	".align 4\n"
	".section .kprobes.text, \"ax\"\n"
	".global kernel_thread_starter\n"
	"kernel_thread_starter:\n"
	"    la    2,0(10)\n"
	"    basr  14,9\n"
	"    la    2,0\n"
	"    br    11\n");
	"    br    11\n"
	".previous\n");

int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
{
Loading