aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
commit57d326169e878a1a37b2bccd1cf81f6809ee67b9 (patch)
tree86ed74ae4dc2beaebce1c67b8459f1873b777d3a /include
parent7b215de3d0abbc4f6daf2efd19e8809af0564490 (diff)
parent0244756edc4b98c129e92c7061d9f383708cf786 (diff)
Merge branch 'akpm' (patches from Andrew Morton) into next
Merge more updates from Andrew Morton: - Most of the rest of MM. This includes "mark remap_file_pages syscall as deprecated" but the actual "replace remap_file_pages syscall with emulation" is held back. I guess we'll need to work out when to pull the trigger on that one. - various minor cleanups to obscure filesystems - the drivers/rtc queue - hfsplus updates - ufs, hpfs, fatfs, affs, reiserfs - Documentation/ - signals - procfs - cpu hotplug - lib/idr.c - rapidio - sysctl - ipc updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (171 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/ioctl.h5
-rw-r--r--include/linux/cpu.h1
-rw-r--r--include/linux/idr.h13
-rw-r--r--include/linux/key.h2
-rw-r--r--include/linux/kmemleak.h4
-rw-r--r--include/linux/mc146818rtc.h4
-rw-r--r--include/linux/ptrace.h32
-rw-r--r--include/linux/sched.h3
-rw-r--r--include/linux/shm.h3
-rw-r--r--include/linux/signal.h21
-rw-r--r--include/linux/smp.h2
-rw-r--r--include/uapi/linux/shm.h17
12 files changed, 80 insertions, 27 deletions
diff --git a/include/asm-generic/ioctl.h b/include/asm-generic/ioctl.h
index d17295b290fa..297fb0d7cd6c 100644
--- a/include/asm-generic/ioctl.h
+++ b/include/asm-generic/ioctl.h
@@ -3,10 +3,15 @@
3 3
4#include <uapi/asm-generic/ioctl.h> 4#include <uapi/asm-generic/ioctl.h>
5 5
6#ifdef __CHECKER__
7#define _IOC_TYPECHECK(t) (sizeof(t))
8#else
6/* provoke compile error for invalid uses of size argument */ 9/* provoke compile error for invalid uses of size argument */
7extern unsigned int __invalid_size_argument_for_IOC; 10extern unsigned int __invalid_size_argument_for_IOC;
8#define _IOC_TYPECHECK(t) \ 11#define _IOC_TYPECHECK(t) \
9 ((sizeof(t) == sizeof(t[1]) && \ 12 ((sizeof(t) == sizeof(t[1]) && \
10 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ 13 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
11 sizeof(t) : __invalid_size_argument_for_IOC) 14 sizeof(t) : __invalid_size_argument_for_IOC)
15#endif
16
12#endif /* _ASM_GENERIC_IOCTL_H */ 17#endif /* _ASM_GENERIC_IOCTL_H */
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 81887120395c..95978ad7fcdd 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -256,7 +256,6 @@ enum cpuhp_state {
256}; 256};
257 257
258void cpu_startup_entry(enum cpuhp_state state); 258void cpu_startup_entry(enum cpuhp_state state);
259void cpu_idle(void);
260 259
261void cpu_idle_poll_ctrl(bool enable); 260void cpu_idle_poll_ctrl(bool enable);
262 261
diff --git a/include/linux/idr.h b/include/linux/idr.h
index 6af3400b9b2f..013fd9bc4cb6 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -29,21 +29,24 @@
29 29
30struct idr_layer { 30struct idr_layer {
31 int prefix; /* the ID prefix of this idr_layer */ 31 int prefix; /* the ID prefix of this idr_layer */
32 DECLARE_BITMAP(bitmap, IDR_SIZE); /* A zero bit means "space here" */ 32 int layer; /* distance from leaf */
33 struct idr_layer __rcu *ary[1<<IDR_BITS]; 33 struct idr_layer __rcu *ary[1<<IDR_BITS];
34 int count; /* When zero, we can release it */ 34 int count; /* When zero, we can release it */
35 int layer; /* distance from leaf */ 35 union {
36 struct rcu_head rcu_head; 36 /* A zero bit means "space here" */
37 DECLARE_BITMAP(bitmap, IDR_SIZE);
38 struct rcu_head rcu_head;
39 };
37}; 40};
38 41
39struct idr { 42struct idr {
40 struct idr_layer __rcu *hint; /* the last layer allocated from */ 43 struct idr_layer __rcu *hint; /* the last layer allocated from */
41 struct idr_layer __rcu *top; 44 struct idr_layer __rcu *top;
42 struct idr_layer *id_free;
43 int layers; /* only valid w/o concurrent changes */ 45 int layers; /* only valid w/o concurrent changes */
44 int id_free_cnt;
45 int cur; /* current pos for cyclic allocation */ 46 int cur; /* current pos for cyclic allocation */
46 spinlock_t lock; 47 spinlock_t lock;
48 int id_free_cnt;
49 struct idr_layer *id_free;
47}; 50};
48 51
49#define IDR_INIT(name) \ 52#define IDR_INIT(name) \
diff --git a/include/linux/key.h b/include/linux/key.h
index 80d677483e31..3ae45f09589b 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -332,7 +332,7 @@ do { \
332} while (0) 332} while (0)
333 333
334#ifdef CONFIG_SYSCTL 334#ifdef CONFIG_SYSCTL
335extern ctl_table key_sysctls[]; 335extern struct ctl_table key_sysctls[];
336#endif 336#endif
337/* 337/*
338 * the userspace interface 338 * the userspace interface
diff --git a/include/linux/kmemleak.h b/include/linux/kmemleak.h
index 5bb424659c04..057e95971014 100644
--- a/include/linux/kmemleak.h
+++ b/include/linux/kmemleak.h
@@ -30,6 +30,7 @@ extern void kmemleak_alloc_percpu(const void __percpu *ptr, size_t size) __ref;
30extern void kmemleak_free(const void *ptr) __ref; 30extern void kmemleak_free(const void *ptr) __ref;
31extern void kmemleak_free_part(const void *ptr, size_t size) __ref; 31extern void kmemleak_free_part(const void *ptr, size_t size) __ref;
32extern void kmemleak_free_percpu(const void __percpu *ptr) __ref; 32extern void kmemleak_free_percpu(const void __percpu *ptr) __ref;
33extern void kmemleak_update_trace(const void *ptr) __ref;
33extern void kmemleak_not_leak(const void *ptr) __ref; 34extern void kmemleak_not_leak(const void *ptr) __ref;
34extern void kmemleak_ignore(const void *ptr) __ref; 35extern void kmemleak_ignore(const void *ptr) __ref;
35extern void kmemleak_scan_area(const void *ptr, size_t size, gfp_t gfp) __ref; 36extern void kmemleak_scan_area(const void *ptr, size_t size, gfp_t gfp) __ref;
@@ -83,6 +84,9 @@ static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags)
83static inline void kmemleak_free_percpu(const void __percpu *ptr) 84static inline void kmemleak_free_percpu(const void __percpu *ptr)
84{ 85{
85} 86}
87static inline void kmemleak_update_trace(const void *ptr)
88{
89}
86static inline void kmemleak_not_leak(const void *ptr) 90static inline void kmemleak_not_leak(const void *ptr)
87{ 91{
88} 92}
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h
index 2f4e957af656..433e0c74d643 100644
--- a/include/linux/mc146818rtc.h
+++ b/include/linux/mc146818rtc.h
@@ -31,6 +31,10 @@ struct cmos_rtc_board_info {
31 void (*wake_on)(struct device *dev); 31 void (*wake_on)(struct device *dev);
32 void (*wake_off)(struct device *dev); 32 void (*wake_off)(struct device *dev);
33 33
34 u32 flags;
35#define CMOS_RTC_FLAGS_NOFREQ (1 << 0)
36 int address_space;
37
34 u8 rtc_day_alarm; /* zero, or register index */ 38 u8 rtc_day_alarm; /* zero, or register index */
35 u8 rtc_mon_alarm; /* zero, or register index */ 39 u8 rtc_mon_alarm; /* zero, or register index */
36 u8 rtc_century; /* zero, or register index */ 40 u8 rtc_century; /* zero, or register index */
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 07d0df6bf768..077904c8b70d 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -5,6 +5,7 @@
5#include <linux/sched.h> /* For struct task_struct. */ 5#include <linux/sched.h> /* For struct task_struct. */
6#include <linux/err.h> /* for IS_ERR_VALUE */ 6#include <linux/err.h> /* for IS_ERR_VALUE */
7#include <linux/bug.h> /* For BUG_ON. */ 7#include <linux/bug.h> /* For BUG_ON. */
8#include <linux/pid_namespace.h> /* For task_active_pid_ns. */
8#include <uapi/linux/ptrace.h> 9#include <uapi/linux/ptrace.h>
9 10
10/* 11/*
@@ -129,6 +130,37 @@ static inline void ptrace_event(int event, unsigned long message)
129} 130}
130 131
131/** 132/**
133 * ptrace_event_pid - possibly stop for a ptrace event notification
134 * @event: %PTRACE_EVENT_* value to report
135 * @pid: process identifier for %PTRACE_GETEVENTMSG to return
136 *
137 * Check whether @event is enabled and, if so, report @event and @pid
138 * to the ptrace parent. @pid is reported as the pid_t seen from the
139 * the ptrace parent's pid namespace.
140 *
141 * Called without locks.
142 */
143static inline void ptrace_event_pid(int event, struct pid *pid)
144{
145 /*
146 * FIXME: There's a potential race if a ptracer in a different pid
147 * namespace than parent attaches between computing message below and
148 * when we acquire tasklist_lock in ptrace_stop(). If this happens,
149 * the ptracer will get a bogus pid from PTRACE_GETEVENTMSG.
150 */
151 unsigned long message = 0;
152 struct pid_namespace *ns;
153
154 rcu_read_lock();
155 ns = task_active_pid_ns(rcu_dereference(current->parent));
156 if (ns)
157 message = pid_nr_ns(pid, ns);
158 rcu_read_unlock();
159
160 ptrace_event(event, message);
161}
162
163/**
132 * ptrace_init_task - initialize ptrace state for a new child 164 * ptrace_init_task - initialize ptrace state for a new child
133 * @child: new child task 165 * @child: new child task
134 * @ptrace: true if child should be ptrace'd by parent's tracer 166 * @ptrace: true if child should be ptrace'd by parent's tracer
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8fcd0e6098d9..ea74596014a2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2414,9 +2414,6 @@ extern void flush_itimer_signals(void);
2414 2414
2415extern void do_group_exit(int); 2415extern void do_group_exit(int);
2416 2416
2417extern int allow_signal(int);
2418extern int disallow_signal(int);
2419
2420extern int do_execve(struct filename *, 2417extern int do_execve(struct filename *,
2421 const char __user * const __user *, 2418 const char __user * const __user *,
2422 const char __user * const __user *); 2419 const char __user * const __user *);
diff --git a/include/linux/shm.h b/include/linux/shm.h
index 1e2cd2e6b540..57d77709fbe2 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -3,9 +3,8 @@
3 3
4#include <asm/page.h> 4#include <asm/page.h>
5#include <uapi/linux/shm.h> 5#include <uapi/linux/shm.h>
6
7#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */
8#include <asm/shmparam.h> 6#include <asm/shmparam.h>
7
9struct shmid_kernel /* private to the kernel */ 8struct shmid_kernel /* private to the kernel */
10{ 9{
11 struct kern_ipc_perm shm_perm; 10 struct kern_ipc_perm shm_perm;
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 2ac423bdb676..c9e65360c49a 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -63,11 +63,6 @@ static inline int sigismember(sigset_t *set, int _sig)
63 return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); 63 return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW));
64} 64}
65 65
66static inline int sigfindinword(unsigned long word)
67{
68 return ffz(~word);
69}
70
71#endif /* __HAVE_ARCH_SIG_BITOPS */ 66#endif /* __HAVE_ARCH_SIG_BITOPS */
72 67
73static inline int sigisemptyset(sigset_t *set) 68static inline int sigisemptyset(sigset_t *set)
@@ -289,6 +284,22 @@ extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
289extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping); 284extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping);
290extern void signal_delivered(int sig, siginfo_t *info, struct k_sigaction *ka, struct pt_regs *regs, int stepping); 285extern void signal_delivered(int sig, siginfo_t *info, struct k_sigaction *ka, struct pt_regs *regs, int stepping);
291extern void exit_signals(struct task_struct *tsk); 286extern void exit_signals(struct task_struct *tsk);
287extern void kernel_sigaction(int, __sighandler_t);
288
289static inline void allow_signal(int sig)
290{
291 /*
292 * Kernel threads handle their own signals. Let the signal code
293 * know it'll be handled, so that they don't get converted to
294 * SIGKILL or just silently dropped.
295 */
296 kernel_sigaction(sig, (__force __sighandler_t)2);
297}
298
299static inline void disallow_signal(int sig)
300{
301 kernel_sigaction(sig, SIG_IGN);
302}
292 303
293/* 304/*
294 * Eventually that'll replace get_signal_to_deliver(); macro for now, 305 * Eventually that'll replace get_signal_to_deliver(); macro for now,
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 633f5edd7470..34347f26be9b 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -13,8 +13,6 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/llist.h> 14#include <linux/llist.h>
15 15
16extern void cpu_idle(void);
17
18typedef void (*smp_call_func_t)(void *info); 16typedef void (*smp_call_func_t)(void *info);
19struct call_single_data { 17struct call_single_data {
20 struct llist_node llist; 18 struct llist_node llist;
diff --git a/include/uapi/linux/shm.h b/include/uapi/linux/shm.h
index 78b69413f582..1fbf24ea37fd 100644
--- a/include/uapi/linux/shm.h
+++ b/include/uapi/linux/shm.h
@@ -8,19 +8,20 @@
8#endif 8#endif
9 9
10/* 10/*
11 * SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can 11 * SHMMNI, SHMMAX and SHMALL are default upper limits which can be
12 * be increased by sysctl 12 * modified by sysctl. The SHMMAX and SHMALL values have been chosen to
13 * be as large possible without facilitating scenarios where userspace
14 * causes overflows when adjusting the limits via operations of the form
15 * "retrieve current limit; add X; update limit". It is therefore not
16 * advised to make SHMMAX and SHMALL any larger. These limits are
17 * suitable for both 32 and 64-bit systems.
13 */ 18 */
14
15#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
16#define SHMMIN 1 /* min shared seg size (bytes) */ 19#define SHMMIN 1 /* min shared seg size (bytes) */
17#define SHMMNI 4096 /* max num of segs system wide */ 20#define SHMMNI 4096 /* max num of segs system wide */
18#ifndef __KERNEL__ 21#define SHMMAX (ULONG_MAX - (1UL << 24)) /* max shared seg size (bytes) */
19#define SHMALL (SHMMAX/getpagesize()*(SHMMNI/16)) 22#define SHMALL (ULONG_MAX - (1UL << 24)) /* max shm system wide (pages) */
20#endif
21#define SHMSEG SHMMNI /* max shared segs per process */ 23#define SHMSEG SHMMNI /* max shared segs per process */
22 24
23
24/* Obsolete, used only for backwards compatibility and libc5 compiles */ 25/* Obsolete, used only for backwards compatibility and libc5 compiles */
25struct shmid_ds { 26struct shmid_ds {
26 struct ipc_perm shm_perm; /* operation perms */ 27 struct ipc_perm shm_perm; /* operation perms */