1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2012 Rabin Vincent <rabin at rab.in>
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
{
24 unsigned long saved_trap_no
;
28 u8 insn
[MAX_UINSN_BYTES
];
29 unsigned long ixol
[2];
30 uprobe_opcode_t bpinsn
;
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
;