OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | |
3 * Use of this source code is governed by a BSD-style license that can be | |
4 * found in the LICENSE file. | |
5 */ | |
6 | |
7 /* | |
8 * Minimal ARM sandbox constants. | |
9 * | |
10 * These constants are used in C code as well as assembly, hence the use of | |
11 * the preprocessor. | |
12 */ | |
13 | |
14 #ifndef NATIVE_CLIENT_SRC_INCLUDE_ARM_SANDBOX_H_ | |
15 #define NATIVE_CLIENT_SRC_INCLUDE_ARM_SANDBOX_H_ 1 | |
16 | |
17 /* | |
18 * Specially chosen BKPT and UDF instructions that also correspond to | |
19 * BKPT and UDF when decoded as Thumb instructions. | |
20 * All other BKPT/UDF values are disallowed by the validator out of paranoia. | |
21 */ | |
22 | |
23 /* | |
24 * BKPT #0x5BE0: literal pool head. | |
25 * | |
26 * Treated as a roadblock by the validator: all words that follow it in | |
27 * a bundle aren't validated and can't be branched to. | |
28 */ | |
29 #define NACL_INSTR_LITERAL_POOL_HEAD 0xE125BE70 | |
30 | |
31 /* | |
32 * BREAKPOINT, HALT_FILL and ABORT_NOW are intended to be equivalent | |
Mark Seaborn
2012/10/19 22:53:17
Please expand to "NACL_INSTR_BREAKPOINT, NACL_INST
| |
33 * from a security point of view. We provide the distinction between | |
34 * them just for debugging purposes. They might also generate different | |
35 * POSIX signals. In principle it should be safe for a debugger to skip | |
36 * past one of these (unlike POOL_HEAD), because the validator validates | |
Mark Seaborn
2012/10/19 22:53:17
Please expand to "NACL_INSTR_POOL_HEAD"
| |
37 * the instructions that follow. | |
38 */ | |
39 | |
40 /* | |
41 * BKPT #0x5BEF: generic breakpoint. | |
42 * | |
43 * Usable statically by users or dynamically by the runtime. | |
44 */ | |
45 #define NACL_INSTR_BREAKPOINT 0xE125BE7F | |
46 | |
47 /* | |
48 * UDF #0xEDEF: halt-fill. | |
49 * | |
50 * Generated at load time. | |
51 */ | |
52 #define NACL_INSTR_HALT_FILL 0xE7FEDEFF | |
53 | |
54 /* | |
55 * UDF #0xEDE0: abort-now. | |
56 * | |
57 * Required by some language constructs such as __builtin_trap. | |
58 */ | |
59 #define NACL_INSTR_ABORT_NOW 0xE7FEDEF0 | |
60 | |
61 /* | |
62 * UDF #0xEDE1: always fail validation. | |
63 * | |
64 * It's guaranteed to always fail, and can be used to initialize buffers | |
65 * that are expected to be filled later. | |
66 */ | |
67 #define NACL_INSTR_FAIL_VALIDATION 0xE7FEDEF1 | |
68 | |
69 #endif /* NATIVE_CLIENT_SRC_INCLUDE_ARM_SANDBOX_H_ */ | |
OLD | NEW |