File tree Expand file tree Collapse file tree 3 files changed +8
-24
lines changed
tools/testing/selftests/powerpc Expand file tree Collapse file tree 3 files changed +8
-24
lines changed Original file line number Diff line number Diff line change 35
35
#define __NR_pkey_alloc 384
36
36
#define __NR_pkey_free 385
37
37
38
+ #ifndef NT_PPC_PKEY
39
+ #define NT_PPC_PKEY 0x110
40
+ #endif
41
+
38
42
#define PKEY_BITS_PER_PKEY 2
39
43
#define NR_PKEYS 32
40
44
#define PKEY_BITS_MASK ((1UL << PKEY_BITS_PER_PKEY) - 1)
41
45
46
+ #define AMR_BITS_PER_PKEY 2
47
+ #define PKEY_REG_BITS (sizeof(u64) * 8)
48
+ #define pkeyshift (pkey ) (PKEY_REG_BITS - ((pkey + 1) * AMR_BITS_PER_PKEY))
49
+
42
50
inline unsigned long pkeyreg_get (void )
43
51
{
44
52
return mfspr (SPRN_AMR );
Original file line number Diff line number Diff line change 18
18
#include "child.h"
19
19
#include "pkeys.h"
20
20
21
- #ifndef NT_PPC_PKEY
22
- #define NT_PPC_PKEY 0x110
23
- #endif
24
-
25
- #ifndef PKEY_DISABLE_EXECUTE
26
- #define PKEY_DISABLE_EXECUTE 0x4
27
- #endif
28
-
29
- #define AMR_BITS_PER_PKEY 2
30
- #define PKEY_REG_BITS (sizeof(u64) * 8)
31
- #define pkeyshift (pkey ) (PKEY_REG_BITS - ((pkey + 1) * AMR_BITS_PER_PKEY))
32
-
33
21
#define CORE_FILE_LIMIT (5 * 1024 * 1024) /* 5 MB should be enough */
34
22
35
23
static const char core_pattern_file [] = "/proc/sys/kernel/core_pattern" ;
Original file line number Diff line number Diff line change 9
9
#include "child.h"
10
10
#include "pkeys.h"
11
11
12
- #ifndef NT_PPC_PKEY
13
- #define NT_PPC_PKEY 0x110
14
- #endif
15
-
16
- #ifndef PKEY_DISABLE_EXECUTE
17
- #define PKEY_DISABLE_EXECUTE 0x4
18
- #endif
19
-
20
- #define AMR_BITS_PER_PKEY 2
21
- #define PKEY_REG_BITS (sizeof(u64) * 8)
22
- #define pkeyshift (pkey ) (PKEY_REG_BITS - ((pkey + 1) * AMR_BITS_PER_PKEY))
23
-
24
12
static const char user_read [] = "[User Read (Running)]" ;
25
13
static const char user_write [] = "[User Write (Running)]" ;
26
14
static const char ptrace_read_running [] = "[Ptrace Read (Running)]" ;
You can’t perform that action at this time.
0 commit comments