diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bitmap.h | 18 | ||||
-rw-r--r-- | include/linux/cpumask.h | 20 | ||||
-rw-r--r-- | include/linux/flex_array.h | 12 | ||||
-rw-r--r-- | include/linux/fs.h | 2 | ||||
-rw-r--r-- | include/linux/gen_stats.h | 5 | ||||
-rw-r--r-- | include/linux/hugetlb.h | 6 | ||||
-rw-r--r-- | include/linux/lmb.h | 2 | ||||
-rw-r--r-- | include/linux/mm.h | 15 | ||||
-rw-r--r-- | include/linux/mm_types.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 1 | ||||
-rw-r--r-- | include/linux/security.h | 24 | ||||
-rw-r--r-- | include/linux/ucb1400.h | 4 |
12 files changed, 62 insertions, 49 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 2878811c6134..756d78b8c1c5 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -94,13 +94,13 @@ extern void __bitmap_shift_right(unsigned long *dst, | |||
94 | const unsigned long *src, int shift, int bits); | 94 | const unsigned long *src, int shift, int bits); |
95 | extern void __bitmap_shift_left(unsigned long *dst, | 95 | extern void __bitmap_shift_left(unsigned long *dst, |
96 | const unsigned long *src, int shift, int bits); | 96 | const unsigned long *src, int shift, int bits); |
97 | extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, | 97 | extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, |
98 | const unsigned long *bitmap2, int bits); | 98 | const unsigned long *bitmap2, int bits); |
99 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, | 99 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, |
100 | const unsigned long *bitmap2, int bits); | 100 | const unsigned long *bitmap2, int bits); |
101 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, | 101 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, |
102 | const unsigned long *bitmap2, int bits); | 102 | const unsigned long *bitmap2, int bits); |
103 | extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, | 103 | extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, |
104 | const unsigned long *bitmap2, int bits); | 104 | const unsigned long *bitmap2, int bits); |
105 | extern int __bitmap_intersects(const unsigned long *bitmap1, | 105 | extern int __bitmap_intersects(const unsigned long *bitmap1, |
106 | const unsigned long *bitmap2, int bits); | 106 | const unsigned long *bitmap2, int bits); |
@@ -171,13 +171,12 @@ static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, | |||
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | static inline void bitmap_and(unsigned long *dst, const unsigned long *src1, | 174 | static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, |
175 | const unsigned long *src2, int nbits) | 175 | const unsigned long *src2, int nbits) |
176 | { | 176 | { |
177 | if (small_const_nbits(nbits)) | 177 | if (small_const_nbits(nbits)) |
178 | *dst = *src1 & *src2; | 178 | return (*dst = *src1 & *src2) != 0; |
179 | else | 179 | return __bitmap_and(dst, src1, src2, nbits); |
180 | __bitmap_and(dst, src1, src2, nbits); | ||
181 | } | 180 | } |
182 | 181 | ||
183 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, | 182 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, |
@@ -198,13 +197,12 @@ static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, | |||
198 | __bitmap_xor(dst, src1, src2, nbits); | 197 | __bitmap_xor(dst, src1, src2, nbits); |
199 | } | 198 | } |
200 | 199 | ||
201 | static inline void bitmap_andnot(unsigned long *dst, const unsigned long *src1, | 200 | static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, |
202 | const unsigned long *src2, int nbits) | 201 | const unsigned long *src2, int nbits) |
203 | { | 202 | { |
204 | if (small_const_nbits(nbits)) | 203 | if (small_const_nbits(nbits)) |
205 | *dst = *src1 & ~(*src2); | 204 | return (*dst = *src1 & ~(*src2)) != 0; |
206 | else | 205 | return __bitmap_andnot(dst, src1, src2, nbits); |
207 | __bitmap_andnot(dst, src1, src2, nbits); | ||
208 | } | 206 | } |
209 | 207 | ||
210 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, | 208 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index c5ac87ca7bc6..796df12091b7 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -43,10 +43,10 @@ | |||
43 | * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask | 43 | * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask |
44 | * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask | 44 | * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask |
45 | * | 45 | * |
46 | * void cpus_and(dst, src1, src2) dst = src1 & src2 [intersection] | 46 | * int cpus_and(dst, src1, src2) dst = src1 & src2 [intersection] |
47 | * void cpus_or(dst, src1, src2) dst = src1 | src2 [union] | 47 | * void cpus_or(dst, src1, src2) dst = src1 | src2 [union] |
48 | * void cpus_xor(dst, src1, src2) dst = src1 ^ src2 | 48 | * void cpus_xor(dst, src1, src2) dst = src1 ^ src2 |
49 | * void cpus_andnot(dst, src1, src2) dst = src1 & ~src2 | 49 | * int cpus_andnot(dst, src1, src2) dst = src1 & ~src2 |
50 | * void cpus_complement(dst, src) dst = ~src | 50 | * void cpus_complement(dst, src) dst = ~src |
51 | * | 51 | * |
52 | * int cpus_equal(mask1, mask2) Does mask1 == mask2? | 52 | * int cpus_equal(mask1, mask2) Does mask1 == mask2? |
@@ -179,10 +179,10 @@ static inline int __cpu_test_and_set(int cpu, cpumask_t *addr) | |||
179 | } | 179 | } |
180 | 180 | ||
181 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) | 181 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) |
182 | static inline void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, | 182 | static inline int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, |
183 | const cpumask_t *src2p, int nbits) | 183 | const cpumask_t *src2p, int nbits) |
184 | { | 184 | { |
185 | bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); | 185 | return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); |
186 | } | 186 | } |
187 | 187 | ||
188 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) | 188 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) |
@@ -201,10 +201,10 @@ static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p, | |||
201 | 201 | ||
202 | #define cpus_andnot(dst, src1, src2) \ | 202 | #define cpus_andnot(dst, src1, src2) \ |
203 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) | 203 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) |
204 | static inline void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, | 204 | static inline int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, |
205 | const cpumask_t *src2p, int nbits) | 205 | const cpumask_t *src2p, int nbits) |
206 | { | 206 | { |
207 | bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); | 207 | return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); |
208 | } | 208 | } |
209 | 209 | ||
210 | #define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS) | 210 | #define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS) |
@@ -738,11 +738,11 @@ static inline void cpumask_clear(struct cpumask *dstp) | |||
738 | * @src1p: the first input | 738 | * @src1p: the first input |
739 | * @src2p: the second input | 739 | * @src2p: the second input |
740 | */ | 740 | */ |
741 | static inline void cpumask_and(struct cpumask *dstp, | 741 | static inline int cpumask_and(struct cpumask *dstp, |
742 | const struct cpumask *src1p, | 742 | const struct cpumask *src1p, |
743 | const struct cpumask *src2p) | 743 | const struct cpumask *src2p) |
744 | { | 744 | { |
745 | bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), | 745 | return bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), |
746 | cpumask_bits(src2p), nr_cpumask_bits); | 746 | cpumask_bits(src2p), nr_cpumask_bits); |
747 | } | 747 | } |
748 | 748 | ||
@@ -779,11 +779,11 @@ static inline void cpumask_xor(struct cpumask *dstp, | |||
779 | * @src1p: the first input | 779 | * @src1p: the first input |
780 | * @src2p: the second input | 780 | * @src2p: the second input |
781 | */ | 781 | */ |
782 | static inline void cpumask_andnot(struct cpumask *dstp, | 782 | static inline int cpumask_andnot(struct cpumask *dstp, |
783 | const struct cpumask *src1p, | 783 | const struct cpumask *src1p, |
784 | const struct cpumask *src2p) | 784 | const struct cpumask *src2p) |
785 | { | 785 | { |
786 | bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), | 786 | return bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), |
787 | cpumask_bits(src2p), nr_cpumask_bits); | 787 | cpumask_bits(src2p), nr_cpumask_bits); |
788 | } | 788 | } |
789 | 789 | ||
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h index 23c1ec79a31b..45ff18491514 100644 --- a/include/linux/flex_array.h +++ b/include/linux/flex_array.h | |||
@@ -21,7 +21,7 @@ struct flex_array { | |||
21 | struct { | 21 | struct { |
22 | int element_size; | 22 | int element_size; |
23 | int total_nr_elements; | 23 | int total_nr_elements; |
24 | struct flex_array_part *parts[0]; | 24 | struct flex_array_part *parts[]; |
25 | }; | 25 | }; |
26 | /* | 26 | /* |
27 | * This little trick makes sure that | 27 | * This little trick makes sure that |
@@ -36,12 +36,14 @@ struct flex_array { | |||
36 | .total_nr_elements = (total), \ | 36 | .total_nr_elements = (total), \ |
37 | } } } | 37 | } } } |
38 | 38 | ||
39 | struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags); | 39 | struct flex_array *flex_array_alloc(int element_size, unsigned int total, |
40 | int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags); | 40 | gfp_t flags); |
41 | int flex_array_prealloc(struct flex_array *fa, unsigned int start, | ||
42 | unsigned int end, gfp_t flags); | ||
41 | void flex_array_free(struct flex_array *fa); | 43 | void flex_array_free(struct flex_array *fa); |
42 | void flex_array_free_parts(struct flex_array *fa); | 44 | void flex_array_free_parts(struct flex_array *fa); |
43 | int flex_array_put(struct flex_array *fa, int element_nr, void *src, | 45 | int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src, |
44 | gfp_t flags); | 46 | gfp_t flags); |
45 | void *flex_array_get(struct flex_array *fa, int element_nr); | 47 | void *flex_array_get(struct flex_array *fa, unsigned int element_nr); |
46 | 48 | ||
47 | #endif /* _FLEX_ARRAY_H */ | 49 | #endif /* _FLEX_ARRAY_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 67888a9e0655..73e9b643e455 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2123,7 +2123,7 @@ extern struct file *do_filp_open(int dfd, const char *pathname, | |||
2123 | int open_flag, int mode, int acc_mode); | 2123 | int open_flag, int mode, int acc_mode); |
2124 | extern int may_open(struct path *, int, int); | 2124 | extern int may_open(struct path *, int, int); |
2125 | 2125 | ||
2126 | extern int kernel_read(struct file *, unsigned long, char *, unsigned long); | 2126 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
2127 | extern struct file * open_exec(const char *); | 2127 | extern struct file * open_exec(const char *); |
2128 | 2128 | ||
2129 | /* fs/dcache.c -- generic fs support functions */ | 2129 | /* fs/dcache.c -- generic fs support functions */ |
diff --git a/include/linux/gen_stats.h b/include/linux/gen_stats.h index 0ffa41df0ee8..710e901085d0 100644 --- a/include/linux/gen_stats.h +++ b/include/linux/gen_stats.h | |||
@@ -22,6 +22,11 @@ struct gnet_stats_basic | |||
22 | { | 22 | { |
23 | __u64 bytes; | 23 | __u64 bytes; |
24 | __u32 packets; | 24 | __u32 packets; |
25 | }; | ||
26 | struct gnet_stats_basic_packed | ||
27 | { | ||
28 | __u64 bytes; | ||
29 | __u32 packets; | ||
25 | } __attribute__ ((packed)); | 30 | } __attribute__ ((packed)); |
26 | 31 | ||
27 | /** | 32 | /** |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 2723513a5651..5cbc620bdfe0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/tlbflush.h> | 10 | #include <asm/tlbflush.h> |
11 | 11 | ||
12 | struct ctl_table; | 12 | struct ctl_table; |
13 | struct user_struct; | ||
13 | 14 | ||
14 | int PageHuge(struct page *page); | 15 | int PageHuge(struct page *page); |
15 | 16 | ||
@@ -146,7 +147,8 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
146 | 147 | ||
147 | extern const struct file_operations hugetlbfs_file_operations; | 148 | extern const struct file_operations hugetlbfs_file_operations; |
148 | extern struct vm_operations_struct hugetlb_vm_ops; | 149 | extern struct vm_operations_struct hugetlb_vm_ops; |
149 | struct file *hugetlb_file_setup(const char *name, size_t, int); | 150 | struct file *hugetlb_file_setup(const char *name, size_t size, int acct, |
151 | struct user_struct **user); | ||
150 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 152 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
151 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 153 | void hugetlb_put_quota(struct address_space *mapping, long delta); |
152 | 154 | ||
@@ -168,7 +170,7 @@ static inline void set_file_hugepages(struct file *file) | |||
168 | 170 | ||
169 | #define is_file_hugepages(file) 0 | 171 | #define is_file_hugepages(file) 0 |
170 | #define set_file_hugepages(file) BUG() | 172 | #define set_file_hugepages(file) BUG() |
171 | #define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS) | 173 | #define hugetlb_file_setup(name,size,acct,user) ERR_PTR(-ENOSYS) |
172 | 174 | ||
173 | #endif /* !CONFIG_HUGETLBFS */ | 175 | #endif /* !CONFIG_HUGETLBFS */ |
174 | 176 | ||
diff --git a/include/linux/lmb.h b/include/linux/lmb.h index c46c89505dac..2442e3f3d033 100644 --- a/include/linux/lmb.h +++ b/include/linux/lmb.h | |||
@@ -51,7 +51,7 @@ extern u64 __init lmb_alloc_base(u64 size, | |||
51 | extern u64 __init __lmb_alloc_base(u64 size, | 51 | extern u64 __init __lmb_alloc_base(u64 size, |
52 | u64 align, u64 max_addr); | 52 | u64 align, u64 max_addr); |
53 | extern u64 __init lmb_phys_mem_size(void); | 53 | extern u64 __init lmb_phys_mem_size(void); |
54 | extern u64 __init lmb_end_of_DRAM(void); | 54 | extern u64 lmb_end_of_DRAM(void); |
55 | extern void __init lmb_enforce_memory_limit(u64 memory_limit); | 55 | extern void __init lmb_enforce_memory_limit(u64 memory_limit); |
56 | extern int __init lmb_is_reserved(u64 addr); | 56 | extern int __init lmb_is_reserved(u64 addr); |
57 | extern int lmb_find(struct lmb_property *res); | 57 | extern int lmb_find(struct lmb_property *res); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index ba3a7cb1eaa0..9a72cc78e6b8 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -34,8 +34,6 @@ extern int sysctl_legacy_va_layout; | |||
34 | #define sysctl_legacy_va_layout 0 | 34 | #define sysctl_legacy_va_layout 0 |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | extern unsigned long mmap_min_addr; | ||
38 | |||
39 | #include <asm/page.h> | 37 | #include <asm/page.h> |
40 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
41 | #include <asm/processor.h> | 39 | #include <asm/processor.h> |
@@ -575,19 +573,6 @@ static inline void set_page_links(struct page *page, enum zone_type zone, | |||
575 | } | 573 | } |
576 | 574 | ||
577 | /* | 575 | /* |
578 | * If a hint addr is less than mmap_min_addr change hint to be as | ||
579 | * low as possible but still greater than mmap_min_addr | ||
580 | */ | ||
581 | static inline unsigned long round_hint_to_min(unsigned long hint) | ||
582 | { | ||
583 | hint &= PAGE_MASK; | ||
584 | if (((void *)hint != NULL) && | ||
585 | (hint < mmap_min_addr)) | ||
586 | return PAGE_ALIGN(mmap_min_addr); | ||
587 | return hint; | ||
588 | } | ||
589 | |||
590 | /* | ||
591 | * Some inline functions in vmstat.h depend on page_zone() | 576 | * Some inline functions in vmstat.h depend on page_zone() |
592 | */ | 577 | */ |
593 | #include <linux/vmstat.h> | 578 | #include <linux/vmstat.h> |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 7acc8439d9b3..0042090a4d70 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -240,8 +240,6 @@ struct mm_struct { | |||
240 | 240 | ||
241 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ | 241 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ |
242 | 242 | ||
243 | s8 oom_adj; /* OOM kill score adjustment (bit shift) */ | ||
244 | |||
245 | cpumask_t cpu_vm_mask; | 243 | cpumask_t cpu_vm_mask; |
246 | 244 | ||
247 | /* Architecture-specific MM context */ | 245 | /* Architecture-specific MM context */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 855fd0d3f174..bd2675efd68d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1200,6 +1200,7 @@ struct task_struct { | |||
1200 | * a short time | 1200 | * a short time |
1201 | */ | 1201 | */ |
1202 | unsigned char fpu_counter; | 1202 | unsigned char fpu_counter; |
1203 | s8 oomkilladj; /* OOM kill score adjustment (bit shift). */ | ||
1203 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 1204 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
1204 | unsigned int btrace_seq; | 1205 | unsigned int btrace_seq; |
1205 | #endif | 1206 | #endif |
diff --git a/include/linux/security.h b/include/linux/security.h index 5eff459b3833..1f16eea2017b 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/resource.h> | 28 | #include <linux/resource.h> |
29 | #include <linux/sem.h> | 29 | #include <linux/sem.h> |
30 | #include <linux/shm.h> | 30 | #include <linux/shm.h> |
31 | #include <linux/mm.h> /* PAGE_ALIGN */ | ||
31 | #include <linux/msg.h> | 32 | #include <linux/msg.h> |
32 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
33 | #include <linux/key.h> | 34 | #include <linux/key.h> |
@@ -66,6 +67,9 @@ extern int cap_inode_setxattr(struct dentry *dentry, const char *name, | |||
66 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); | 67 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); |
67 | extern int cap_inode_need_killpriv(struct dentry *dentry); | 68 | extern int cap_inode_need_killpriv(struct dentry *dentry); |
68 | extern int cap_inode_killpriv(struct dentry *dentry); | 69 | extern int cap_inode_killpriv(struct dentry *dentry); |
70 | extern int cap_file_mmap(struct file *file, unsigned long reqprot, | ||
71 | unsigned long prot, unsigned long flags, | ||
72 | unsigned long addr, unsigned long addr_only); | ||
69 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); | 73 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); |
70 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | 74 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, |
71 | unsigned long arg4, unsigned long arg5); | 75 | unsigned long arg4, unsigned long arg5); |
@@ -92,6 +96,7 @@ extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | |||
92 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); | 96 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); |
93 | 97 | ||
94 | extern unsigned long mmap_min_addr; | 98 | extern unsigned long mmap_min_addr; |
99 | extern unsigned long dac_mmap_min_addr; | ||
95 | /* | 100 | /* |
96 | * Values used in the task_security_ops calls | 101 | * Values used in the task_security_ops calls |
97 | */ | 102 | */ |
@@ -116,6 +121,21 @@ struct request_sock; | |||
116 | #define LSM_UNSAFE_PTRACE 2 | 121 | #define LSM_UNSAFE_PTRACE 2 |
117 | #define LSM_UNSAFE_PTRACE_CAP 4 | 122 | #define LSM_UNSAFE_PTRACE_CAP 4 |
118 | 123 | ||
124 | /* | ||
125 | * If a hint addr is less than mmap_min_addr change hint to be as | ||
126 | * low as possible but still greater than mmap_min_addr | ||
127 | */ | ||
128 | static inline unsigned long round_hint_to_min(unsigned long hint) | ||
129 | { | ||
130 | hint &= PAGE_MASK; | ||
131 | if (((void *)hint != NULL) && | ||
132 | (hint < mmap_min_addr)) | ||
133 | return PAGE_ALIGN(mmap_min_addr); | ||
134 | return hint; | ||
135 | } | ||
136 | extern int mmap_min_addr_handler(struct ctl_table *table, int write, struct file *filp, | ||
137 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
138 | |||
119 | #ifdef CONFIG_SECURITY | 139 | #ifdef CONFIG_SECURITY |
120 | 140 | ||
121 | struct security_mnt_opts { | 141 | struct security_mnt_opts { |
@@ -2197,9 +2217,7 @@ static inline int security_file_mmap(struct file *file, unsigned long reqprot, | |||
2197 | unsigned long addr, | 2217 | unsigned long addr, |
2198 | unsigned long addr_only) | 2218 | unsigned long addr_only) |
2199 | { | 2219 | { |
2200 | if ((addr < mmap_min_addr) && !capable(CAP_SYS_RAWIO)) | 2220 | return cap_file_mmap(file, reqprot, prot, flags, addr, addr_only); |
2201 | return -EACCES; | ||
2202 | return 0; | ||
2203 | } | 2221 | } |
2204 | 2222 | ||
2205 | static inline int security_file_mprotect(struct vm_area_struct *vma, | 2223 | static inline int security_file_mprotect(struct vm_area_struct *vma, |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index ed889f4168f3..ae779bb8cc0f 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
@@ -73,6 +73,10 @@ | |||
73 | 73 | ||
74 | #define UCB_ADC_DATA 0x68 | 74 | #define UCB_ADC_DATA 0x68 |
75 | #define UCB_ADC_DAT_VALID (1 << 15) | 75 | #define UCB_ADC_DAT_VALID (1 << 15) |
76 | |||
77 | #define UCB_FCSR 0x6c | ||
78 | #define UCB_FCSR_AVE (1 << 12) | ||
79 | |||
76 | #define UCB_ADC_DAT_MASK 0x3ff | 80 | #define UCB_ADC_DAT_MASK 0x3ff |
77 | 81 | ||
78 | #define UCB_ID 0x7e | 82 | #define UCB_ID 0x7e |