xref: /openbmc/linux/arch/arm/probes/decode.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
11802d0beSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2fca08f32SWang Nan /*
3fca08f32SWang Nan  * arch/arm/probes/decode.h
4fca08f32SWang Nan  *
5fca08f32SWang Nan  * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>.
6fca08f32SWang Nan  *
7fca08f32SWang Nan  * Some contents moved here from arch/arm/include/asm/kprobes.h which is
8fca08f32SWang Nan  * Copyright (C) 2006, 2007 Motorola Inc.
9fca08f32SWang Nan  */
10fca08f32SWang Nan 
11fca08f32SWang Nan #ifndef _ARM_KERNEL_PROBES_H
12fca08f32SWang Nan #define  _ARM_KERNEL_PROBES_H
13fca08f32SWang Nan 
14fca08f32SWang Nan #include <linux/types.h>
15fca08f32SWang Nan #include <linux/stddef.h>
16fca08f32SWang Nan #include <asm/probes.h>
17*e5c46fdeSArd Biesheuvel #include <asm/ptrace.h>
187d134b2cSLuis R. Rodriguez #include <asm/kprobes.h>
19fca08f32SWang Nan 
20fca08f32SWang Nan void __init arm_probes_decode_init(void);
21fca08f32SWang Nan 
22fca08f32SWang Nan extern probes_check_cc * const probes_condition_checks[16];
23fca08f32SWang Nan 
24fca08f32SWang Nan #if __LINUX_ARM_ARCH__ >= 7
25fca08f32SWang Nan 
26fca08f32SWang Nan /* str_pc_offset is architecturally defined from ARMv7 onwards */
27fca08f32SWang Nan #define str_pc_offset 8
28fca08f32SWang Nan #define find_str_pc_offset()
29fca08f32SWang Nan 
30fca08f32SWang Nan #else /* __LINUX_ARM_ARCH__ < 7 */
31fca08f32SWang Nan 
32fca08f32SWang Nan /* We need a run-time check to determine str_pc_offset */
33fca08f32SWang Nan extern int str_pc_offset;
34fca08f32SWang Nan void __init find_str_pc_offset(void);
35fca08f32SWang Nan 
36fca08f32SWang Nan #endif
37fca08f32SWang Nan 
38fca08f32SWang Nan 
bx_write_pc(long pcv,struct pt_regs * regs)39fca08f32SWang Nan static inline void __kprobes bx_write_pc(long pcv, struct pt_regs *regs)
40fca08f32SWang Nan {
41fca08f32SWang Nan 	long cpsr = regs->ARM_cpsr;
42fca08f32SWang Nan 	if (pcv & 0x1) {
43fca08f32SWang Nan 		cpsr |= PSR_T_BIT;
44fca08f32SWang Nan 		pcv &= ~0x1;
45fca08f32SWang Nan 	} else {
46fca08f32SWang Nan 		cpsr &= ~PSR_T_BIT;
47fca08f32SWang Nan 		pcv &= ~0x2;	/* Avoid UNPREDICTABLE address allignment */
48fca08f32SWang Nan 	}
49fca08f32SWang Nan 	regs->ARM_cpsr = cpsr;
50fca08f32SWang Nan 	regs->ARM_pc = pcv;
51fca08f32SWang Nan }
52fca08f32SWang Nan 
53fca08f32SWang Nan 
54fca08f32SWang Nan #if __LINUX_ARM_ARCH__ >= 6
55fca08f32SWang Nan 
56fca08f32SWang Nan /* Kernels built for >= ARMv6 should never run on <= ARMv5 hardware, so... */
57fca08f32SWang Nan #define load_write_pc_interworks true
58fca08f32SWang Nan #define test_load_write_pc_interworking()
59fca08f32SWang Nan 
60fca08f32SWang Nan #else /* __LINUX_ARM_ARCH__ < 6 */
61fca08f32SWang Nan 
62fca08f32SWang Nan /* We need run-time testing to determine if load_write_pc() should interwork. */
63fca08f32SWang Nan extern bool load_write_pc_interworks;
64fca08f32SWang Nan void __init test_load_write_pc_interworking(void);
65fca08f32SWang Nan 
66fca08f32SWang Nan #endif
67fca08f32SWang Nan 
load_write_pc(long pcv,struct pt_regs * regs)68fca08f32SWang Nan static inline void __kprobes load_write_pc(long pcv, struct pt_regs *regs)
69fca08f32SWang Nan {
70fca08f32SWang Nan 	if (load_write_pc_interworks)
71fca08f32SWang Nan 		bx_write_pc(pcv, regs);
72fca08f32SWang Nan 	else
73fca08f32SWang Nan 		regs->ARM_pc = pcv;
74fca08f32SWang Nan }
75fca08f32SWang Nan 
76fca08f32SWang Nan 
77fca08f32SWang Nan #if __LINUX_ARM_ARCH__ >= 7
78fca08f32SWang Nan 
79fca08f32SWang Nan #define alu_write_pc_interworks true
80fca08f32SWang Nan #define test_alu_write_pc_interworking()
81fca08f32SWang Nan 
82fca08f32SWang Nan #elif __LINUX_ARM_ARCH__ <= 5
83fca08f32SWang Nan 
84fca08f32SWang Nan /* Kernels built for <= ARMv5 should never run on >= ARMv6 hardware, so... */
85fca08f32SWang Nan #define alu_write_pc_interworks false
86fca08f32SWang Nan #define test_alu_write_pc_interworking()
87fca08f32SWang Nan 
88fca08f32SWang Nan #else /* __LINUX_ARM_ARCH__ == 6 */
89fca08f32SWang Nan 
90fca08f32SWang Nan /* We could be an ARMv6 binary on ARMv7 hardware so we need a run-time check. */
91fca08f32SWang Nan extern bool alu_write_pc_interworks;
92fca08f32SWang Nan void __init test_alu_write_pc_interworking(void);
93fca08f32SWang Nan 
94fca08f32SWang Nan #endif /* __LINUX_ARM_ARCH__ == 6 */
95fca08f32SWang Nan 
alu_write_pc(long pcv,struct pt_regs * regs)96fca08f32SWang Nan static inline void __kprobes alu_write_pc(long pcv, struct pt_regs *regs)
97fca08f32SWang Nan {
98fca08f32SWang Nan 	if (alu_write_pc_interworks)
99fca08f32SWang Nan 		bx_write_pc(pcv, regs);
100fca08f32SWang Nan 	else
101fca08f32SWang Nan 		regs->ARM_pc = pcv;
102fca08f32SWang Nan }
103fca08f32SWang Nan 
104fca08f32SWang Nan 
105fca08f32SWang Nan /*
106fca08f32SWang Nan  * Test if load/store instructions writeback the address register.
107fca08f32SWang Nan  * if P (bit 24) == 0 or W (bit 21) == 1
108fca08f32SWang Nan  */
109fca08f32SWang Nan #define is_writeback(insn) ((insn ^ 0x01000000) & 0x01200000)
110fca08f32SWang Nan 
111fca08f32SWang Nan /*
112fca08f32SWang Nan  * The following definitions and macros are used to build instruction
113fca08f32SWang Nan  * decoding tables for use by probes_decode_insn.
114fca08f32SWang Nan  *
115fca08f32SWang Nan  * These tables are a concatenation of entries each of which consist of one of
116fca08f32SWang Nan  * the decode_* structs. All of the fields in every type of decode structure
117fca08f32SWang Nan  * are of the union type decode_item, therefore the entire decode table can be
118fca08f32SWang Nan  * viewed as an array of these and declared like:
119fca08f32SWang Nan  *
120fca08f32SWang Nan  *	static const union decode_item table_name[] = {};
121fca08f32SWang Nan  *
122fca08f32SWang Nan  * In order to construct each entry in the table, macros are used to
123fca08f32SWang Nan  * initialise a number of sequential decode_item values in a layout which
124fca08f32SWang Nan  * matches the relevant struct. E.g. DECODE_SIMULATE initialise a struct
125fca08f32SWang Nan  * decode_simulate by initialising four decode_item objects like this...
126fca08f32SWang Nan  *
127fca08f32SWang Nan  *	{.bits = _type},
128fca08f32SWang Nan  *	{.bits = _mask},
129fca08f32SWang Nan  *	{.bits = _value},
130fca08f32SWang Nan  *	{.action = _handler},
131fca08f32SWang Nan  *
132fca08f32SWang Nan  * Initialising a specified member of the union means that the compiler
133fca08f32SWang Nan  * will produce a warning if the argument is of an incorrect type.
134fca08f32SWang Nan  *
135fca08f32SWang Nan  * Below is a list of each of the macros used to initialise entries and a
136fca08f32SWang Nan  * description of the action performed when that entry is matched to an
137fca08f32SWang Nan  * instruction. A match is found when (instruction & mask) == value.
138fca08f32SWang Nan  *
139fca08f32SWang Nan  * DECODE_TABLE(mask, value, table)
140fca08f32SWang Nan  *	Instruction decoding jumps to parsing the new sub-table 'table'.
141fca08f32SWang Nan  *
142fca08f32SWang Nan  * DECODE_CUSTOM(mask, value, decoder)
143fca08f32SWang Nan  *	The value of 'decoder' is used as an index into the array of
144fca08f32SWang Nan  *	action functions, and the retrieved decoder function is invoked
145fca08f32SWang Nan  *	to complete decoding of the instruction.
146fca08f32SWang Nan  *
147fca08f32SWang Nan  * DECODE_SIMULATE(mask, value, handler)
148fca08f32SWang Nan  *	The probes instruction handler is set to the value found by
149fca08f32SWang Nan  *	indexing into the action array using the value of 'handler'. This
150fca08f32SWang Nan  *	will be used to simulate the instruction when the probe is hit.
151fca08f32SWang Nan  *	Decoding returns with INSN_GOOD_NO_SLOT.
152fca08f32SWang Nan  *
153fca08f32SWang Nan  * DECODE_EMULATE(mask, value, handler)
154fca08f32SWang Nan  *	The probes instruction handler is set to the value found by
155fca08f32SWang Nan  *	indexing into the action array using the value of 'handler'. This
156fca08f32SWang Nan  *	will be used to emulate the instruction when the probe is hit. The
157fca08f32SWang Nan  *	modified instruction (see below) is placed in the probes instruction
158fca08f32SWang Nan  *	slot so it may be called by the emulation code. Decoding returns
159fca08f32SWang Nan  *	with INSN_GOOD.
160fca08f32SWang Nan  *
161fca08f32SWang Nan  * DECODE_REJECT(mask, value)
162fca08f32SWang Nan  *	Instruction decoding fails with INSN_REJECTED
163fca08f32SWang Nan  *
164fca08f32SWang Nan  * DECODE_OR(mask, value)
165fca08f32SWang Nan  *	This allows the mask/value test of multiple table entries to be
166fca08f32SWang Nan  *	logically ORed. Once an 'or' entry is matched the decoding action to
167fca08f32SWang Nan  *	be performed is that of the next entry which isn't an 'or'. E.g.
168fca08f32SWang Nan  *
169fca08f32SWang Nan  *		DECODE_OR	(mask1, value1)
170fca08f32SWang Nan  *		DECODE_OR	(mask2, value2)
171fca08f32SWang Nan  *		DECODE_SIMULATE	(mask3, value3, simulation_handler)
172fca08f32SWang Nan  *
173fca08f32SWang Nan  *	This means that if any of the three mask/value pairs match the
174fca08f32SWang Nan  *	instruction being decoded, then 'simulation_handler' will be used
175fca08f32SWang Nan  *	for it.
176fca08f32SWang Nan  *
177fca08f32SWang Nan  * Both the SIMULATE and EMULATE macros have a second form which take an
178fca08f32SWang Nan  * additional 'regs' argument.
179fca08f32SWang Nan  *
180fca08f32SWang Nan  *	DECODE_SIMULATEX(mask, value, handler, regs)
181fca08f32SWang Nan  *	DECODE_EMULATEX	(mask, value, handler, regs)
182fca08f32SWang Nan  *
183fca08f32SWang Nan  * These are used to specify what kind of CPU register is encoded in each of the
184fca08f32SWang Nan  * least significant 5 nibbles of the instruction being decoded. The regs value
185fca08f32SWang Nan  * is specified using the REGS macro, this takes any of the REG_TYPE_* values
186fca08f32SWang Nan  * from enum decode_reg_type as arguments; only the '*' part of the name is
187fca08f32SWang Nan  * given. E.g.
188fca08f32SWang Nan  *
189fca08f32SWang Nan  *	REGS(0, ANY, NOPC, 0, ANY)
190fca08f32SWang Nan  *
191fca08f32SWang Nan  * This indicates an instruction is encoded like:
192fca08f32SWang Nan  *
193fca08f32SWang Nan  *	bits 19..16	ignore
194fca08f32SWang Nan  *	bits 15..12	any register allowed here
195fca08f32SWang Nan  *	bits 11.. 8	any register except PC allowed here
196fca08f32SWang Nan  *	bits  7.. 4	ignore
197fca08f32SWang Nan  *	bits  3.. 0	any register allowed here
198fca08f32SWang Nan  *
199fca08f32SWang Nan  * This register specification is checked after a decode table entry is found to
200fca08f32SWang Nan  * match an instruction (through the mask/value test). Any invalid register then
201fca08f32SWang Nan  * found in the instruction will cause decoding to fail with INSN_REJECTED. In
202fca08f32SWang Nan  * the above example this would happen if bits 11..8 of the instruction were
203fca08f32SWang Nan  * 1111, indicating R15 or PC.
204fca08f32SWang Nan  *
205fca08f32SWang Nan  * As well as checking for legal combinations of registers, this data is also
206fca08f32SWang Nan  * used to modify the registers encoded in the instructions so that an
207fca08f32SWang Nan  * emulation routines can use it. (See decode_regs() and INSN_NEW_BITS.)
208fca08f32SWang Nan  *
209fca08f32SWang Nan  * Here is a real example which matches ARM instructions of the form
210fca08f32SWang Nan  * "AND <Rd>,<Rn>,<Rm>,<shift> <Rs>"
211fca08f32SWang Nan  *
212fca08f32SWang Nan  *	DECODE_EMULATEX	(0x0e000090, 0x00000010, PROBES_DATA_PROCESSING_REG,
213fca08f32SWang Nan  *						 REGS(ANY, ANY, NOPC, 0, ANY)),
214fca08f32SWang Nan  *						      ^    ^    ^        ^
215fca08f32SWang Nan  *						      Rn   Rd   Rs       Rm
216fca08f32SWang Nan  *
217fca08f32SWang Nan  * Decoding the instruction "AND R4, R5, R6, ASL R15" will be rejected because
218fca08f32SWang Nan  * Rs == R15
219fca08f32SWang Nan  *
220fca08f32SWang Nan  * Decoding the instruction "AND R4, R5, R6, ASL R7" will be accepted and the
221fca08f32SWang Nan  * instruction will be modified to "AND R0, R2, R3, ASL R1" and then placed into
222fca08f32SWang Nan  * the kprobes instruction slot. This can then be called later by the handler
223fca08f32SWang Nan  * function emulate_rd12rn16rm0rs8_rwflags (a pointer to which is retrieved from
224fca08f32SWang Nan  * the indicated slot in the action array), in order to simulate the instruction.
225fca08f32SWang Nan  */
226fca08f32SWang Nan 
227fca08f32SWang Nan enum decode_type {
228fca08f32SWang Nan 	DECODE_TYPE_END,
229fca08f32SWang Nan 	DECODE_TYPE_TABLE,
230fca08f32SWang Nan 	DECODE_TYPE_CUSTOM,
231fca08f32SWang Nan 	DECODE_TYPE_SIMULATE,
232fca08f32SWang Nan 	DECODE_TYPE_EMULATE,
233fca08f32SWang Nan 	DECODE_TYPE_OR,
234fca08f32SWang Nan 	DECODE_TYPE_REJECT,
235fca08f32SWang Nan 	NUM_DECODE_TYPES /* Must be last enum */
236fca08f32SWang Nan };
237fca08f32SWang Nan 
238fca08f32SWang Nan #define DECODE_TYPE_BITS	4
239fca08f32SWang Nan #define DECODE_TYPE_MASK	((1 << DECODE_TYPE_BITS) - 1)
240fca08f32SWang Nan 
241fca08f32SWang Nan enum decode_reg_type {
242fca08f32SWang Nan 	REG_TYPE_NONE = 0, /* Not a register, ignore */
243fca08f32SWang Nan 	REG_TYPE_ANY,	   /* Any register allowed */
244fca08f32SWang Nan 	REG_TYPE_SAMEAS16, /* Register should be same as that at bits 19..16 */
245fca08f32SWang Nan 	REG_TYPE_SP,	   /* Register must be SP */
246fca08f32SWang Nan 	REG_TYPE_PC,	   /* Register must be PC */
247fca08f32SWang Nan 	REG_TYPE_NOSP,	   /* Register must not be SP */
248fca08f32SWang Nan 	REG_TYPE_NOSPPC,   /* Register must not be SP or PC */
249fca08f32SWang Nan 	REG_TYPE_NOPC,	   /* Register must not be PC */
250fca08f32SWang Nan 	REG_TYPE_NOPCWB,   /* No PC if load/store write-back flag also set */
251fca08f32SWang Nan 
252fca08f32SWang Nan 	/* The following types are used when the encoding for PC indicates
253fca08f32SWang Nan 	 * another instruction form. This distiction only matters for test
254fca08f32SWang Nan 	 * case coverage checks.
255fca08f32SWang Nan 	 */
256fca08f32SWang Nan 	REG_TYPE_NOPCX,	   /* Register must not be PC */
257fca08f32SWang Nan 	REG_TYPE_NOSPPCX,  /* Register must not be SP or PC */
258fca08f32SWang Nan 
259fca08f32SWang Nan 	/* Alias to allow '0' arg to be used in REGS macro. */
260fca08f32SWang Nan 	REG_TYPE_0 = REG_TYPE_NONE
261fca08f32SWang Nan };
262fca08f32SWang Nan 
263fca08f32SWang Nan #define REGS(r16, r12, r8, r4, r0)	\
264fca08f32SWang Nan 	(((REG_TYPE_##r16) << 16) +	\
265fca08f32SWang Nan 	((REG_TYPE_##r12) << 12) +	\
266fca08f32SWang Nan 	((REG_TYPE_##r8) << 8) +	\
267fca08f32SWang Nan 	((REG_TYPE_##r4) << 4) +	\
268fca08f32SWang Nan 	(REG_TYPE_##r0))
269fca08f32SWang Nan 
270fca08f32SWang Nan union decode_item {
271fca08f32SWang Nan 	u32			bits;
272fca08f32SWang Nan 	const union decode_item	*table;
273fca08f32SWang Nan 	int			action;
274fca08f32SWang Nan };
275fca08f32SWang Nan 
276fca08f32SWang Nan struct decode_header;
277fca08f32SWang Nan typedef enum probes_insn (probes_custom_decode_t)(probes_opcode_t,
278fca08f32SWang Nan 						  struct arch_probes_insn *,
279fca08f32SWang Nan 						  const struct decode_header *);
280fca08f32SWang Nan 
281fca08f32SWang Nan union decode_action {
282fca08f32SWang Nan 	probes_insn_handler_t	*handler;
283fca08f32SWang Nan 	probes_custom_decode_t	*decoder;
284fca08f32SWang Nan };
285fca08f32SWang Nan 
28683803d97SWang Nan typedef enum probes_insn (probes_check_t)(probes_opcode_t,
28783803d97SWang Nan 					   struct arch_probes_insn *,
28883803d97SWang Nan 					   const struct decode_header *);
28983803d97SWang Nan 
29083803d97SWang Nan struct decode_checker {
29183803d97SWang Nan 	probes_check_t	*checker;
29283803d97SWang Nan };
29383803d97SWang Nan 
294fca08f32SWang Nan #define DECODE_END			\
295fca08f32SWang Nan 	{.bits = DECODE_TYPE_END}
296fca08f32SWang Nan 
297fca08f32SWang Nan 
298fca08f32SWang Nan struct decode_header {
299fca08f32SWang Nan 	union decode_item	type_regs;
300fca08f32SWang Nan 	union decode_item	mask;
301fca08f32SWang Nan 	union decode_item	value;
302fca08f32SWang Nan };
303fca08f32SWang Nan 
304fca08f32SWang Nan #define DECODE_HEADER(_type, _mask, _value, _regs)		\
305fca08f32SWang Nan 	{.bits = (_type) | ((_regs) << DECODE_TYPE_BITS)},	\
306fca08f32SWang Nan 	{.bits = (_mask)},					\
307fca08f32SWang Nan 	{.bits = (_value)}
308fca08f32SWang Nan 
309fca08f32SWang Nan 
310fca08f32SWang Nan struct decode_table {
311fca08f32SWang Nan 	struct decode_header	header;
312fca08f32SWang Nan 	union decode_item	table;
313fca08f32SWang Nan };
314fca08f32SWang Nan 
315fca08f32SWang Nan #define DECODE_TABLE(_mask, _value, _table)			\
316fca08f32SWang Nan 	DECODE_HEADER(DECODE_TYPE_TABLE, _mask, _value, 0),	\
317fca08f32SWang Nan 	{.table = (_table)}
318fca08f32SWang Nan 
319fca08f32SWang Nan 
320fca08f32SWang Nan struct decode_custom {
321fca08f32SWang Nan 	struct decode_header	header;
322fca08f32SWang Nan 	union decode_item	decoder;
323fca08f32SWang Nan };
324fca08f32SWang Nan 
325fca08f32SWang Nan #define DECODE_CUSTOM(_mask, _value, _decoder)			\
326fca08f32SWang Nan 	DECODE_HEADER(DECODE_TYPE_CUSTOM, _mask, _value, 0),	\
327fca08f32SWang Nan 	{.action = (_decoder)}
328fca08f32SWang Nan 
329fca08f32SWang Nan 
330fca08f32SWang Nan struct decode_simulate {
331fca08f32SWang Nan 	struct decode_header	header;
332fca08f32SWang Nan 	union decode_item	handler;
333fca08f32SWang Nan };
334fca08f32SWang Nan 
335fca08f32SWang Nan #define DECODE_SIMULATEX(_mask, _value, _handler, _regs)		\
336fca08f32SWang Nan 	DECODE_HEADER(DECODE_TYPE_SIMULATE, _mask, _value, _regs),	\
337fca08f32SWang Nan 	{.action = (_handler)}
338fca08f32SWang Nan 
339fca08f32SWang Nan #define DECODE_SIMULATE(_mask, _value, _handler)	\
340fca08f32SWang Nan 	DECODE_SIMULATEX(_mask, _value, _handler, 0)
341fca08f32SWang Nan 
342fca08f32SWang Nan 
343fca08f32SWang Nan struct decode_emulate {
344fca08f32SWang Nan 	struct decode_header	header;
345fca08f32SWang Nan 	union decode_item	handler;
346fca08f32SWang Nan };
347fca08f32SWang Nan 
348fca08f32SWang Nan #define DECODE_EMULATEX(_mask, _value, _handler, _regs)			\
349fca08f32SWang Nan 	DECODE_HEADER(DECODE_TYPE_EMULATE, _mask, _value, _regs),	\
350fca08f32SWang Nan 	{.action = (_handler)}
351fca08f32SWang Nan 
352fca08f32SWang Nan #define DECODE_EMULATE(_mask, _value, _handler)		\
353fca08f32SWang Nan 	DECODE_EMULATEX(_mask, _value, _handler, 0)
354fca08f32SWang Nan 
355fca08f32SWang Nan 
356fca08f32SWang Nan struct decode_or {
357fca08f32SWang Nan 	struct decode_header	header;
358fca08f32SWang Nan };
359fca08f32SWang Nan 
360fca08f32SWang Nan #define DECODE_OR(_mask, _value)				\
361fca08f32SWang Nan 	DECODE_HEADER(DECODE_TYPE_OR, _mask, _value, 0)
362fca08f32SWang Nan 
363fca08f32SWang Nan enum probes_insn {
364fca08f32SWang Nan 	INSN_REJECTED,
365fca08f32SWang Nan 	INSN_GOOD,
366fca08f32SWang Nan 	INSN_GOOD_NO_SLOT
367fca08f32SWang Nan };
368fca08f32SWang Nan 
369fca08f32SWang Nan struct decode_reject {
370fca08f32SWang Nan 	struct decode_header	header;
371fca08f32SWang Nan };
372fca08f32SWang Nan 
373fca08f32SWang Nan #define DECODE_REJECT(_mask, _value)				\
374fca08f32SWang Nan 	DECODE_HEADER(DECODE_TYPE_REJECT, _mask, _value, 0)
375fca08f32SWang Nan 
376fca08f32SWang Nan probes_insn_handler_t probes_simulate_nop;
377fca08f32SWang Nan probes_insn_handler_t probes_emulate_none;
378fca08f32SWang Nan 
379fca08f32SWang Nan int __kprobes
380fca08f32SWang Nan probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi,
381fca08f32SWang Nan 		const union decode_item *table, bool thumb, bool emulate,
38283803d97SWang Nan 		const union decode_action *actions,
38383803d97SWang Nan 		const struct decode_checker **checkers);
384fca08f32SWang Nan 
385fca08f32SWang Nan #endif
386