diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bootmem.h | 2 | ||||
-rw-r--r-- | include/linux/capability.h | 13 | ||||
-rw-r--r-- | include/linux/cred.h | 10 | ||||
-rw-r--r-- | include/linux/fb.h | 1 | ||||
-rw-r--r-- | include/linux/gfp.h | 2 | ||||
-rw-r--r-- | include/trace/events/gfpflags.h | 6 |
6 files changed, 19 insertions, 15 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index b8613e806aa9..01eca1794e14 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -111,6 +111,8 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | |||
111 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 111 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
112 | #define alloc_bootmem_node(pgdat, x) \ | 112 | #define alloc_bootmem_node(pgdat, x) \ |
113 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 113 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
114 | #define alloc_bootmem_node_nopanic(pgdat, x) \ | ||
115 | __alloc_bootmem_node_nopanic(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | ||
114 | #define alloc_bootmem_pages_node(pgdat, x) \ | 116 | #define alloc_bootmem_pages_node(pgdat, x) \ |
115 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 117 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
116 | #define alloc_bootmem_pages_node_nopanic(pgdat, x) \ | 118 | #define alloc_bootmem_pages_node_nopanic(pgdat, x) \ |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 16ee8b49a200..d4675af963fa 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -546,18 +546,7 @@ extern bool has_capability_noaudit(struct task_struct *t, int cap); | |||
546 | extern bool capable(int cap); | 546 | extern bool capable(int cap); |
547 | extern bool ns_capable(struct user_namespace *ns, int cap); | 547 | extern bool ns_capable(struct user_namespace *ns, int cap); |
548 | extern bool task_ns_capable(struct task_struct *t, int cap); | 548 | extern bool task_ns_capable(struct task_struct *t, int cap); |
549 | 549 | extern bool nsown_capable(int cap); | |
550 | /** | ||
551 | * nsown_capable - Check superior capability to one's own user_ns | ||
552 | * @cap: The capability in question | ||
553 | * | ||
554 | * Return true if the current task has the given superior capability | ||
555 | * targeted at its own user namespace. | ||
556 | */ | ||
557 | static inline bool nsown_capable(int cap) | ||
558 | { | ||
559 | return ns_capable(current_user_ns(), cap); | ||
560 | } | ||
561 | 550 | ||
562 | /* audit system wants to get cap info from files as well */ | 551 | /* audit system wants to get cap info from files as well */ |
563 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); | 552 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 9aeeb0ba2003..be16b61283cc 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -146,6 +146,7 @@ struct cred { | |||
146 | void *security; /* subjective LSM security */ | 146 | void *security; /* subjective LSM security */ |
147 | #endif | 147 | #endif |
148 | struct user_struct *user; /* real user ID subscription */ | 148 | struct user_struct *user; /* real user ID subscription */ |
149 | struct user_namespace *user_ns; /* cached user->user_ns */ | ||
149 | struct group_info *group_info; /* supplementary groups for euid/fsgid */ | 150 | struct group_info *group_info; /* supplementary groups for euid/fsgid */ |
150 | struct rcu_head rcu; /* RCU deletion hook */ | 151 | struct rcu_head rcu; /* RCU deletion hook */ |
151 | }; | 152 | }; |
@@ -354,10 +355,15 @@ static inline void put_cred(const struct cred *_cred) | |||
354 | #define current_fsgid() (current_cred_xxx(fsgid)) | 355 | #define current_fsgid() (current_cred_xxx(fsgid)) |
355 | #define current_cap() (current_cred_xxx(cap_effective)) | 356 | #define current_cap() (current_cred_xxx(cap_effective)) |
356 | #define current_user() (current_cred_xxx(user)) | 357 | #define current_user() (current_cred_xxx(user)) |
357 | #define _current_user_ns() (current_cred_xxx(user)->user_ns) | ||
358 | #define current_security() (current_cred_xxx(security)) | 358 | #define current_security() (current_cred_xxx(security)) |
359 | 359 | ||
360 | extern struct user_namespace *current_user_ns(void); | 360 | #ifdef CONFIG_USER_NS |
361 | #define current_user_ns() (current_cred_xxx(user_ns)) | ||
362 | #else | ||
363 | extern struct user_namespace init_user_ns; | ||
364 | #define current_user_ns() (&init_user_ns) | ||
365 | #endif | ||
366 | |||
361 | 367 | ||
362 | #define current_uid_gid(_uid, _gid) \ | 368 | #define current_uid_gid(_uid, _gid) \ |
363 | do { \ | 369 | do { \ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index df728c1c29ed..6a8274877171 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -832,6 +832,7 @@ struct fb_tile_ops { | |||
832 | #define FBINFO_CAN_FORCE_OUTPUT 0x200000 | 832 | #define FBINFO_CAN_FORCE_OUTPUT 0x200000 |
833 | 833 | ||
834 | struct fb_info { | 834 | struct fb_info { |
835 | atomic_t count; | ||
835 | int node; | 836 | int node; |
836 | int flags; | 837 | int flags; |
837 | struct mutex lock; /* Lock for open/release/ioctl funcs */ | 838 | struct mutex lock; /* Lock for open/release/ioctl funcs */ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index bfb8f934521e..56d8fc87fbbc 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -353,6 +353,8 @@ extern unsigned long get_zeroed_page(gfp_t gfp_mask); | |||
353 | 353 | ||
354 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); | 354 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); |
355 | void free_pages_exact(void *virt, size_t size); | 355 | void free_pages_exact(void *virt, size_t size); |
356 | /* This is different from alloc_pages_exact_node !!! */ | ||
357 | void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask); | ||
356 | 358 | ||
357 | #define __get_free_page(gfp_mask) \ | 359 | #define __get_free_page(gfp_mask) \ |
358 | __get_free_pages((gfp_mask), 0) | 360 | __get_free_pages((gfp_mask), 0) |
diff --git a/include/trace/events/gfpflags.h b/include/trace/events/gfpflags.h index e3615c093741..9fe3a36646e9 100644 --- a/include/trace/events/gfpflags.h +++ b/include/trace/events/gfpflags.h | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #define show_gfp_flags(flags) \ | 11 | #define show_gfp_flags(flags) \ |
12 | (flags) ? __print_flags(flags, "|", \ | 12 | (flags) ? __print_flags(flags, "|", \ |
13 | {(unsigned long)GFP_TRANSHUGE, "GFP_TRANSHUGE"}, \ | ||
13 | {(unsigned long)GFP_HIGHUSER_MOVABLE, "GFP_HIGHUSER_MOVABLE"}, \ | 14 | {(unsigned long)GFP_HIGHUSER_MOVABLE, "GFP_HIGHUSER_MOVABLE"}, \ |
14 | {(unsigned long)GFP_HIGHUSER, "GFP_HIGHUSER"}, \ | 15 | {(unsigned long)GFP_HIGHUSER, "GFP_HIGHUSER"}, \ |
15 | {(unsigned long)GFP_USER, "GFP_USER"}, \ | 16 | {(unsigned long)GFP_USER, "GFP_USER"}, \ |
@@ -32,6 +33,9 @@ | |||
32 | {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \ | 33 | {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \ |
33 | {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \ | 34 | {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \ |
34 | {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \ | 35 | {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \ |
35 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"} \ | 36 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"}, \ |
37 | {(unsigned long)__GFP_NOTRACK, "GFP_NOTRACK"}, \ | ||
38 | {(unsigned long)__GFP_NO_KSWAPD, "GFP_NO_KSWAPD"}, \ | ||
39 | {(unsigned long)__GFP_OTHER_NODE, "GFP_OTHER_NODE"} \ | ||
36 | ) : "GFP_NOWAIT" | 40 | ) : "GFP_NOWAIT" |
37 | 41 | ||