diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/cpu.h | 3 | ||||
-rw-r--r-- | include/asm-x86/e820_64.h | 4 | ||||
-rw-r--r-- | include/asm-x86/futex.h | 6 | ||||
-rw-r--r-- | include/linux/audit.h | 13 | ||||
-rw-r--r-- | include/linux/futex.h | 10 | ||||
-rw-r--r-- | include/linux/init_task.h | 8 | ||||
-rw-r--r-- | include/linux/sched.h | 4 | ||||
-rw-r--r-- | include/linux/thread_info.h | 1 | ||||
-rw-r--r-- | include/linux/tick.h | 4 | ||||
-rw-r--r-- | include/linux/time.h | 1 |
10 files changed, 44 insertions, 10 deletions
diff --git a/include/asm-x86/cpu.h b/include/asm-x86/cpu.h index 85ece5f10e9e..73f2ea84fd74 100644 --- a/include/asm-x86/cpu.h +++ b/include/asm-x86/cpu.h | |||
@@ -10,8 +10,9 @@ | |||
10 | struct x86_cpu { | 10 | struct x86_cpu { |
11 | struct cpu cpu; | 11 | struct cpu cpu; |
12 | }; | 12 | }; |
13 | extern int arch_register_cpu(int num); | 13 | |
14 | #ifdef CONFIG_HOTPLUG_CPU | 14 | #ifdef CONFIG_HOTPLUG_CPU |
15 | extern int arch_register_cpu(int num); | ||
15 | extern void arch_unregister_cpu(int); | 16 | extern void arch_unregister_cpu(int); |
16 | #endif | 17 | #endif |
17 | 18 | ||
diff --git a/include/asm-x86/e820_64.h b/include/asm-x86/e820_64.h index 51e4170f9ca5..a560c4f5d500 100644 --- a/include/asm-x86/e820_64.h +++ b/include/asm-x86/e820_64.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
17 | extern unsigned long find_e820_area(unsigned long start, unsigned long end, | 17 | extern unsigned long find_e820_area(unsigned long start, unsigned long end, |
18 | unsigned size); | 18 | unsigned size, unsigned long align); |
19 | extern void add_memory_region(unsigned long start, unsigned long size, | 19 | extern void add_memory_region(unsigned long start, unsigned long size, |
20 | int type); | 20 | int type); |
21 | extern void setup_memory_region(void); | 21 | extern void setup_memory_region(void); |
@@ -41,7 +41,7 @@ extern void finish_e820_parsing(void); | |||
41 | extern struct e820map e820; | 41 | extern struct e820map e820; |
42 | extern void update_e820(void); | 42 | extern void update_e820(void); |
43 | 43 | ||
44 | extern void reserve_early(unsigned long start, unsigned long end); | 44 | extern void reserve_early(unsigned long start, unsigned long end, char *name); |
45 | extern void early_res_to_bootmem(void); | 45 | extern void early_res_to_bootmem(void); |
46 | 46 | ||
47 | #endif/*!__ASSEMBLY__*/ | 47 | #endif/*!__ASSEMBLY__*/ |
diff --git a/include/asm-x86/futex.h b/include/asm-x86/futex.h index 62828d63f1b1..9d919264923a 100644 --- a/include/asm-x86/futex.h +++ b/include/asm-x86/futex.h | |||
@@ -30,7 +30,7 @@ | |||
30 | "1: movl %2, %0\n \ | 30 | "1: movl %2, %0\n \ |
31 | movl %0, %3\n" \ | 31 | movl %0, %3\n" \ |
32 | insn "\n" \ | 32 | insn "\n" \ |
33 | "2: " LOCK_PREFIX "cmpxchgl %3, %2\n \ | 33 | "2: lock; cmpxchgl %3, %2\n \ |
34 | jnz 1b\n \ | 34 | jnz 1b\n \ |
35 | 3: .section .fixup,\"ax\"\n \ | 35 | 3: .section .fixup,\"ax\"\n \ |
36 | 4: mov %5, %1\n \ | 36 | 4: mov %5, %1\n \ |
@@ -72,7 +72,7 @@ futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | |||
72 | __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); | 72 | __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); |
73 | break; | 73 | break; |
74 | case FUTEX_OP_ADD: | 74 | case FUTEX_OP_ADD: |
75 | __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret, oldval, | 75 | __futex_atomic_op1("lock; xaddl %0, %2", ret, oldval, |
76 | uaddr, oparg); | 76 | uaddr, oparg); |
77 | break; | 77 | break; |
78 | case FUTEX_OP_OR: | 78 | case FUTEX_OP_OR: |
@@ -111,8 +111,8 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
111 | return -EFAULT; | 111 | return -EFAULT; |
112 | 112 | ||
113 | __asm__ __volatile__( | 113 | __asm__ __volatile__( |
114 | "1: " LOCK_PREFIX "cmpxchgl %3, %1 \n" | ||
115 | 114 | ||
115 | "1: lock; cmpxchgl %3, %1 \n" | ||
116 | "2: .section .fixup, \"ax\" \n" | 116 | "2: .section .fixup, \"ax\" \n" |
117 | "3: mov %2, %0 \n" | 117 | "3: mov %2, %0 \n" |
118 | " jmp 2b \n" | 118 | " jmp 2b \n" |
diff --git a/include/linux/audit.h b/include/linux/audit.h index bdd6f5de5fc4..97153027207a 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -98,6 +98,7 @@ | |||
98 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ | 98 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ |
99 | #define AUDIT_OBJ_PID 1318 /* ptrace target */ | 99 | #define AUDIT_OBJ_PID 1318 /* ptrace target */ |
100 | #define AUDIT_TTY 1319 /* Input on an administrative TTY */ | 100 | #define AUDIT_TTY 1319 /* Input on an administrative TTY */ |
101 | #define AUDIT_EOE 1320 /* End of multi-record event */ | ||
101 | 102 | ||
102 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 103 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
103 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 104 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
@@ -409,7 +410,8 @@ extern unsigned int audit_serial(void); | |||
409 | extern void auditsc_get_stamp(struct audit_context *ctx, | 410 | extern void auditsc_get_stamp(struct audit_context *ctx, |
410 | struct timespec *t, unsigned int *serial); | 411 | struct timespec *t, unsigned int *serial); |
411 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); | 412 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); |
412 | extern uid_t audit_get_loginuid(struct audit_context *ctx); | 413 | #define audit_get_loginuid(t) ((t)->loginuid) |
414 | #define audit_get_sessionid(t) ((t)->sessionid) | ||
413 | extern void audit_log_task_context(struct audit_buffer *ab); | 415 | extern void audit_log_task_context(struct audit_buffer *ab); |
414 | extern int __audit_ipc_obj(struct kern_ipc_perm *ipcp); | 416 | extern int __audit_ipc_obj(struct kern_ipc_perm *ipcp); |
415 | extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); | 417 | extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); |
@@ -488,7 +490,8 @@ extern int audit_signals; | |||
488 | #define audit_inode_child(d,i,p) do { ; } while (0) | 490 | #define audit_inode_child(d,i,p) do { ; } while (0) |
489 | #define audit_core_dumps(i) do { ; } while (0) | 491 | #define audit_core_dumps(i) do { ; } while (0) |
490 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 492 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) |
491 | #define audit_get_loginuid(c) ({ -1; }) | 493 | #define audit_get_loginuid(t) (-1) |
494 | #define audit_get_sessionid(t) (-1) | ||
492 | #define audit_log_task_context(b) do { ; } while (0) | 495 | #define audit_log_task_context(b) do { ; } while (0) |
493 | #define audit_ipc_obj(i) ({ 0; }) | 496 | #define audit_ipc_obj(i) ({ 0; }) |
494 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) | 497 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) |
@@ -522,9 +525,11 @@ extern void audit_log_end(struct audit_buffer *ab); | |||
522 | extern void audit_log_hex(struct audit_buffer *ab, | 525 | extern void audit_log_hex(struct audit_buffer *ab, |
523 | const unsigned char *buf, | 526 | const unsigned char *buf, |
524 | size_t len); | 527 | size_t len); |
525 | extern const char * audit_log_untrustedstring(struct audit_buffer *ab, | 528 | extern int audit_string_contains_control(const char *string, |
529 | size_t len); | ||
530 | extern void audit_log_untrustedstring(struct audit_buffer *ab, | ||
526 | const char *string); | 531 | const char *string); |
527 | extern const char * audit_log_n_untrustedstring(struct audit_buffer *ab, | 532 | extern void audit_log_n_untrustedstring(struct audit_buffer *ab, |
528 | size_t n, | 533 | size_t n, |
529 | const char *string); | 534 | const char *string); |
530 | extern void audit_log_d_path(struct audit_buffer *ab, | 535 | extern void audit_log_d_path(struct audit_buffer *ab, |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 1a15f8e237a7..90048fb28a38 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -21,6 +21,8 @@ union ktime; | |||
21 | #define FUTEX_LOCK_PI 6 | 21 | #define FUTEX_LOCK_PI 6 |
22 | #define FUTEX_UNLOCK_PI 7 | 22 | #define FUTEX_UNLOCK_PI 7 |
23 | #define FUTEX_TRYLOCK_PI 8 | 23 | #define FUTEX_TRYLOCK_PI 8 |
24 | #define FUTEX_WAIT_BITSET 9 | ||
25 | #define FUTEX_WAKE_BITSET 10 | ||
24 | 26 | ||
25 | #define FUTEX_PRIVATE_FLAG 128 | 27 | #define FUTEX_PRIVATE_FLAG 128 |
26 | #define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG | 28 | #define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG |
@@ -33,6 +35,8 @@ union ktime; | |||
33 | #define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) | 35 | #define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) |
34 | #define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) | 36 | #define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) |
35 | #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) | 37 | #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) |
38 | #define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITS | FUTEX_PRIVATE_FLAG) | ||
39 | #define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITS | FUTEX_PRIVATE_FLAG) | ||
36 | 40 | ||
37 | /* | 41 | /* |
38 | * Support for robust futexes: the kernel cleans up held futexes at | 42 | * Support for robust futexes: the kernel cleans up held futexes at |
@@ -111,6 +115,12 @@ struct robust_list_head { | |||
111 | */ | 115 | */ |
112 | #define ROBUST_LIST_LIMIT 2048 | 116 | #define ROBUST_LIST_LIMIT 2048 |
113 | 117 | ||
118 | /* | ||
119 | * bitset with all bits set for the FUTEX_xxx_BITSET OPs to request a | ||
120 | * match of any bit. | ||
121 | */ | ||
122 | #define FUTEX_BITSET_MATCH_ANY 0xffffffff | ||
123 | |||
114 | #ifdef __KERNEL__ | 124 | #ifdef __KERNEL__ |
115 | long do_futex(u32 __user *uaddr, int op, u32 val, union ktime *timeout, | 125 | long do_futex(u32 __user *uaddr, int op, u32 val, union ktime *timeout, |
116 | u32 __user *uaddr2, u32 val2, u32 val3); | 126 | u32 __user *uaddr2, u32 val2, u32 val3); |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index e6b3f7080679..f42663eaf655 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -114,6 +114,13 @@ extern struct group_info init_groups; | |||
114 | .pid = &init_struct_pid, \ | 114 | .pid = &init_struct_pid, \ |
115 | } | 115 | } |
116 | 116 | ||
117 | #ifdef CONFIG_AUDITSYSCALL | ||
118 | #define INIT_IDS \ | ||
119 | .loginuid = -1, \ | ||
120 | .sessionid = -1, | ||
121 | #else | ||
122 | #define INIT_IDS | ||
123 | #endif | ||
117 | /* | 124 | /* |
118 | * INIT_TASK is used to set up the first task table, touch at | 125 | * INIT_TASK is used to set up the first task table, touch at |
119 | * your own risk!. Base=0, limit=0x1fffff (=2MB) | 126 | * your own risk!. Base=0, limit=0x1fffff (=2MB) |
@@ -173,6 +180,7 @@ extern struct group_info init_groups; | |||
173 | [PIDTYPE_SID] = INIT_PID_LINK(PIDTYPE_SID), \ | 180 | [PIDTYPE_SID] = INIT_PID_LINK(PIDTYPE_SID), \ |
174 | }, \ | 181 | }, \ |
175 | .dirties = INIT_PROP_LOCAL_SINGLE(dirties), \ | 182 | .dirties = INIT_PROP_LOCAL_SINGLE(dirties), \ |
183 | INIT_IDS \ | ||
176 | INIT_TRACE_IRQFLAGS \ | 184 | INIT_TRACE_IRQFLAGS \ |
177 | INIT_LOCKDEP \ | 185 | INIT_LOCKDEP \ |
178 | } | 186 | } |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6c333579d9da..af6947e69b40 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1139,6 +1139,10 @@ struct task_struct { | |||
1139 | void *security; | 1139 | void *security; |
1140 | #endif | 1140 | #endif |
1141 | struct audit_context *audit_context; | 1141 | struct audit_context *audit_context; |
1142 | #ifdef CONFIG_AUDITSYSCALL | ||
1143 | uid_t loginuid; | ||
1144 | unsigned int sessionid; | ||
1145 | #endif | ||
1142 | seccomp_t seccomp; | 1146 | seccomp_t seccomp; |
1143 | 1147 | ||
1144 | /* Thread group tracking */ | 1148 | /* Thread group tracking */ |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index dfbdfb9836f4..421323e5a2d6 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -23,6 +23,7 @@ struct restart_block { | |||
23 | u32 *uaddr; | 23 | u32 *uaddr; |
24 | u32 val; | 24 | u32 val; |
25 | u32 flags; | 25 | u32 flags; |
26 | u32 bitset; | ||
26 | u64 time; | 27 | u64 time; |
27 | } futex; | 28 | } futex; |
28 | }; | 29 | }; |
diff --git a/include/linux/tick.h b/include/linux/tick.h index 0fadf95debe1..a881c652f7e9 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -39,6 +39,8 @@ enum tick_nohz_mode { | |||
39 | * @idle_calls: Total number of idle calls | 39 | * @idle_calls: Total number of idle calls |
40 | * @idle_sleeps: Number of idle calls, where the sched tick was stopped | 40 | * @idle_sleeps: Number of idle calls, where the sched tick was stopped |
41 | * @idle_entrytime: Time when the idle call was entered | 41 | * @idle_entrytime: Time when the idle call was entered |
42 | * @idle_waketime: Time when the idle was interrupted | ||
43 | * @idle_exittime: Time when the idle state was left | ||
42 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped | 44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped |
43 | * @sleep_length: Duration of the current idle sleep | 45 | * @sleep_length: Duration of the current idle sleep |
44 | */ | 46 | */ |
@@ -53,6 +55,8 @@ struct tick_sched { | |||
53 | unsigned long idle_sleeps; | 55 | unsigned long idle_sleeps; |
54 | int idle_active; | 56 | int idle_active; |
55 | ktime_t idle_entrytime; | 57 | ktime_t idle_entrytime; |
58 | ktime_t idle_waketime; | ||
59 | ktime_t idle_exittime; | ||
56 | ktime_t idle_sleeptime; | 60 | ktime_t idle_sleeptime; |
57 | ktime_t idle_lastupdate; | 61 | ktime_t idle_lastupdate; |
58 | ktime_t sleep_length; | 62 | ktime_t sleep_length; |
diff --git a/include/linux/time.h b/include/linux/time.h index b04136d60a2f..ceaab9fff155 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -122,6 +122,7 @@ extern void monotonic_to_bootbased(struct timespec *ts); | |||
122 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | 122 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); |
123 | extern int timekeeping_is_continuous(void); | 123 | extern int timekeeping_is_continuous(void); |
124 | extern void update_wall_time(void); | 124 | extern void update_wall_time(void); |
125 | extern void update_xtime_cache(u64 nsec); | ||
125 | 126 | ||
126 | /** | 127 | /** |
127 | * timespec_to_ns - Convert timespec to nanoseconds | 128 | * timespec_to_ns - Convert timespec to nanoseconds |