diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
commit | 78a45c6f067824cf5d0a9fedea7339ac2e28603c (patch) | |
tree | b4f78c8b6b9059ddace0a18c11629b8d2045f793 /lib | |
parent | f96fe225677b3efb74346ebd56fafe3997b02afa (diff) | |
parent | 29d293b6007b91a4463f05bc8d0b26e0e65c5816 (diff) |
Merge branch 'akpm' (second patch-bomb from Andrew)
Merge second patchbomb from Andrew Morton:
- the rest of MM
- misc fs fixes
- add execveat() syscall
- new ratelimit feature for fault-injection
- decompressor updates
- ipc/ updates
- fallocate feature creep
- fsnotify cleanups
- a few other misc things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (99 commits)
cgroups: Documentation: fix trivial typos and wrong paragraph numberings
parisc: percpu: update comments referring to __get_cpu_var
percpu: update local_ops.txt to reflect this_cpu operations
percpu: remove __get_cpu_var and __raw_get_cpu_var macros
fsnotify: remove destroy_list from fsnotify_mark
fsnotify: unify inode and mount marks handling
fallocate: create FAN_MODIFY and IN_MODIFY events
mm/cma: make kmemleak ignore CMA regions
slub: fix cpuset check in get_any_partial
slab: fix cpuset check in fallback_alloc
shmdt: use i_size_read() instead of ->i_size
ipc/shm.c: fix overly aggressive shmdt() when calls span multiple segments
ipc/msg: increase MSGMNI, remove scaling
ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM
ipc/sem.c: change memory barrier in sem_lock() to smp_rmb()
lib/decompress.c: consistency of compress formats for kernel image
decompress_bunzip2: off by one in get_next_block()
usr/Kconfig: make initrd compression algorithm selection not expert
fault-inject: add ratelimit option
ratelimit: add initialization macro
...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 16 | ||||
-rw-r--r-- | lib/audit.c | 3 | ||||
-rw-r--r-- | lib/bitmap.c | 24 | ||||
-rw-r--r-- | lib/decompress.c | 4 | ||||
-rw-r--r-- | lib/decompress_bunzip2.c | 2 | ||||
-rw-r--r-- | lib/fault-inject.c | 21 |
6 files changed, 52 insertions, 18 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index d780351835e9..5f2ce616c046 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -227,6 +227,22 @@ config UNUSED_SYMBOLS | |||
227 | you really need it, and what the merge plan to the mainline kernel for | 227 | you really need it, and what the merge plan to the mainline kernel for |
228 | your module is. | 228 | your module is. |
229 | 229 | ||
230 | config PAGE_OWNER | ||
231 | bool "Track page owner" | ||
232 | depends on DEBUG_KERNEL && STACKTRACE_SUPPORT | ||
233 | select DEBUG_FS | ||
234 | select STACKTRACE | ||
235 | select PAGE_EXTENSION | ||
236 | help | ||
237 | This keeps track of what call chain is the owner of a page, may | ||
238 | help to find bare alloc_page(s) leaks. Even if you include this | ||
239 | feature on your build, it is disabled in default. You should pass | ||
240 | "page_owner=on" to boot parameter in order to enable it. Eats | ||
241 | a fair amount of memory if enabled. See tools/vm/page_owner_sort.c | ||
242 | for user-space helper. | ||
243 | |||
244 | If unsure, say N. | ||
245 | |||
230 | config DEBUG_FS | 246 | config DEBUG_FS |
231 | bool "Debug Filesystem" | 247 | bool "Debug Filesystem" |
232 | help | 248 | help |
diff --git a/lib/audit.c b/lib/audit.c index 1d726a22565b..b8fb5ee81e26 100644 --- a/lib/audit.c +++ b/lib/audit.c | |||
@@ -54,6 +54,9 @@ int audit_classify_syscall(int abi, unsigned syscall) | |||
54 | case __NR_socketcall: | 54 | case __NR_socketcall: |
55 | return 4; | 55 | return 4; |
56 | #endif | 56 | #endif |
57 | #ifdef __NR_execveat | ||
58 | case __NR_execveat: | ||
59 | #endif | ||
57 | case __NR_execve: | 60 | case __NR_execve: |
58 | return 5; | 61 | return 5; |
59 | default: | 62 | default: |
diff --git a/lib/bitmap.c b/lib/bitmap.c index b499ab6ada29..969ae8fbc85b 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
@@ -326,30 +326,32 @@ void bitmap_clear(unsigned long *map, unsigned int start, int len) | |||
326 | } | 326 | } |
327 | EXPORT_SYMBOL(bitmap_clear); | 327 | EXPORT_SYMBOL(bitmap_clear); |
328 | 328 | ||
329 | /* | 329 | /** |
330 | * bitmap_find_next_zero_area - find a contiguous aligned zero area | 330 | * bitmap_find_next_zero_area_off - find a contiguous aligned zero area |
331 | * @map: The address to base the search on | 331 | * @map: The address to base the search on |
332 | * @size: The bitmap size in bits | 332 | * @size: The bitmap size in bits |
333 | * @start: The bitnumber to start searching at | 333 | * @start: The bitnumber to start searching at |
334 | * @nr: The number of zeroed bits we're looking for | 334 | * @nr: The number of zeroed bits we're looking for |
335 | * @align_mask: Alignment mask for zero area | 335 | * @align_mask: Alignment mask for zero area |
336 | * @align_offset: Alignment offset for zero area. | ||
336 | * | 337 | * |
337 | * The @align_mask should be one less than a power of 2; the effect is that | 338 | * The @align_mask should be one less than a power of 2; the effect is that |
338 | * the bit offset of all zero areas this function finds is multiples of that | 339 | * the bit offset of all zero areas this function finds plus @align_offset |
339 | * power of 2. A @align_mask of 0 means no alignment is required. | 340 | * is multiple of that power of 2. |
340 | */ | 341 | */ |
341 | unsigned long bitmap_find_next_zero_area(unsigned long *map, | 342 | unsigned long bitmap_find_next_zero_area_off(unsigned long *map, |
342 | unsigned long size, | 343 | unsigned long size, |
343 | unsigned long start, | 344 | unsigned long start, |
344 | unsigned int nr, | 345 | unsigned int nr, |
345 | unsigned long align_mask) | 346 | unsigned long align_mask, |
347 | unsigned long align_offset) | ||
346 | { | 348 | { |
347 | unsigned long index, end, i; | 349 | unsigned long index, end, i; |
348 | again: | 350 | again: |
349 | index = find_next_zero_bit(map, size, start); | 351 | index = find_next_zero_bit(map, size, start); |
350 | 352 | ||
351 | /* Align allocation */ | 353 | /* Align allocation */ |
352 | index = __ALIGN_MASK(index, align_mask); | 354 | index = __ALIGN_MASK(index + align_offset, align_mask) - align_offset; |
353 | 355 | ||
354 | end = index + nr; | 356 | end = index + nr; |
355 | if (end > size) | 357 | if (end > size) |
@@ -361,7 +363,7 @@ again: | |||
361 | } | 363 | } |
362 | return index; | 364 | return index; |
363 | } | 365 | } |
364 | EXPORT_SYMBOL(bitmap_find_next_zero_area); | 366 | EXPORT_SYMBOL(bitmap_find_next_zero_area_off); |
365 | 367 | ||
366 | /* | 368 | /* |
367 | * Bitmap printing & parsing functions: first version by Nadia Yvette Chambers, | 369 | * Bitmap printing & parsing functions: first version by Nadia Yvette Chambers, |
diff --git a/lib/decompress.c b/lib/decompress.c index 37f3c786348f..528ff932d8e4 100644 --- a/lib/decompress.c +++ b/lib/decompress.c | |||
@@ -44,8 +44,8 @@ struct compress_format { | |||
44 | }; | 44 | }; |
45 | 45 | ||
46 | static const struct compress_format compressed_formats[] __initconst = { | 46 | static const struct compress_format compressed_formats[] __initconst = { |
47 | { {037, 0213}, "gzip", gunzip }, | 47 | { {0x1f, 0x8b}, "gzip", gunzip }, |
48 | { {037, 0236}, "gzip", gunzip }, | 48 | { {0x1f, 0x9e}, "gzip", gunzip }, |
49 | { {0x42, 0x5a}, "bzip2", bunzip2 }, | 49 | { {0x42, 0x5a}, "bzip2", bunzip2 }, |
50 | { {0x5d, 0x00}, "lzma", unlzma }, | 50 | { {0x5d, 0x00}, "lzma", unlzma }, |
51 | { {0xfd, 0x37}, "xz", unxz }, | 51 | { {0xfd, 0x37}, "xz", unxz }, |
diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c index 8290e0bef7ea..6dd0335ea61b 100644 --- a/lib/decompress_bunzip2.c +++ b/lib/decompress_bunzip2.c | |||
@@ -184,7 +184,7 @@ static int INIT get_next_block(struct bunzip_data *bd) | |||
184 | if (get_bits(bd, 1)) | 184 | if (get_bits(bd, 1)) |
185 | return RETVAL_OBSOLETE_INPUT; | 185 | return RETVAL_OBSOLETE_INPUT; |
186 | origPtr = get_bits(bd, 24); | 186 | origPtr = get_bits(bd, 24); |
187 | if (origPtr > dbufSize) | 187 | if (origPtr >= dbufSize) |
188 | return RETVAL_DATA_ERROR; | 188 | return RETVAL_DATA_ERROR; |
189 | /* mapping table: if some byte values are never used (encoding things | 189 | /* mapping table: if some byte values are never used (encoding things |
190 | like ascii text), the compression code removes the gaps to have fewer | 190 | like ascii text), the compression code removes the gaps to have fewer |
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index d7d501ea856d..f1cdeb024d17 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c | |||
@@ -40,10 +40,16 @@ EXPORT_SYMBOL_GPL(setup_fault_attr); | |||
40 | 40 | ||
41 | static void fail_dump(struct fault_attr *attr) | 41 | static void fail_dump(struct fault_attr *attr) |
42 | { | 42 | { |
43 | if (attr->verbose > 0) | 43 | if (attr->verbose > 0 && __ratelimit(&attr->ratelimit_state)) { |
44 | printk(KERN_NOTICE "FAULT_INJECTION: forcing a failure\n"); | 44 | printk(KERN_NOTICE "FAULT_INJECTION: forcing a failure.\n" |
45 | if (attr->verbose > 1) | 45 | "name %pd, interval %lu, probability %lu, " |
46 | dump_stack(); | 46 | "space %d, times %d\n", attr->dname, |
47 | attr->probability, attr->interval, | ||
48 | atomic_read(&attr->space), | ||
49 | atomic_read(&attr->times)); | ||
50 | if (attr->verbose > 1) | ||
51 | dump_stack(); | ||
52 | } | ||
47 | } | 53 | } |
48 | 54 | ||
49 | #define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0) | 55 | #define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0) |
@@ -202,6 +208,12 @@ struct dentry *fault_create_debugfs_attr(const char *name, | |||
202 | goto fail; | 208 | goto fail; |
203 | if (!debugfs_create_ul("verbose", mode, dir, &attr->verbose)) | 209 | if (!debugfs_create_ul("verbose", mode, dir, &attr->verbose)) |
204 | goto fail; | 210 | goto fail; |
211 | if (!debugfs_create_u32("verbose_ratelimit_interval_ms", mode, dir, | ||
212 | &attr->ratelimit_state.interval)) | ||
213 | goto fail; | ||
214 | if (!debugfs_create_u32("verbose_ratelimit_burst", mode, dir, | ||
215 | &attr->ratelimit_state.burst)) | ||
216 | goto fail; | ||
205 | if (!debugfs_create_bool("task-filter", mode, dir, &attr->task_filter)) | 217 | if (!debugfs_create_bool("task-filter", mode, dir, &attr->task_filter)) |
206 | goto fail; | 218 | goto fail; |
207 | 219 | ||
@@ -222,6 +234,7 @@ struct dentry *fault_create_debugfs_attr(const char *name, | |||
222 | 234 | ||
223 | #endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */ | 235 | #endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */ |
224 | 236 | ||
237 | attr->dname = dget(dir); | ||
225 | return dir; | 238 | return dir; |
226 | fail: | 239 | fail: |
227 | debugfs_remove_recursive(dir); | 240 | debugfs_remove_recursive(dir); |