Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / arm / include / asm / uprobes.h
blob6a61b28749265af37127600f61fb8184059fba24
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2012 Rabin Vincent <rabin at rab.in>
4 */
6 #ifndef _ASM_UPROBES_H
7 #define _ASM_UPROBES_H
9 #include <asm/probes.h>
10 #include <asm/opcodes.h>
12 typedef u32 uprobe_opcode_t;
14 #define MAX_UINSN_BYTES 4
15 #define UPROBE_XOL_SLOT_BYTES 64
17 #define UPROBE_SWBP_ARM_INSN 0xe7f001f9
18 #define UPROBE_SS_ARM_INSN 0xe7f001fa
19 #define UPROBE_SWBP_INSN __opcode_to_mem_arm(UPROBE_SWBP_ARM_INSN)
20 #define UPROBE_SWBP_INSN_SIZE 4
22 struct arch_uprobe_task {
23 u32 backup;
24 unsigned long saved_trap_no;
27 struct arch_uprobe {
28 u8 insn[MAX_UINSN_BYTES];
29 unsigned long ixol[2];
30 uprobe_opcode_t bpinsn;
31 bool simulate;
32 u32 pcreg;
33 void (*prehandler)(struct arch_uprobe *auprobe,
34 struct arch_uprobe_task *autask,
35 struct pt_regs *regs);
36 void (*posthandler)(struct arch_uprobe *auprobe,
37 struct arch_uprobe_task *autask,
38 struct pt_regs *regs);
39 struct arch_probes_insn asi;
42 #endif