Alexey Dobriyan
86a2bb5ad8
coredump: fix spam with zero VMA process
...
Nobody ever tried to self destruct by unmapping whole address space at
once:
munmap((void *)0, (1ULL << 47) - 4096);
Doing this produces 2 warnings for zero-length vmalloc allocations:
a.out[1353]: segfault at 7f80bcc4b757 ip 00007f80bcc4b757 sp 00007fff683939b8 error 14
a.out: vmalloc: allocation failure: 0 bytes, mode:0xcc0(GFP_KERNEL), nodemask=(null)
...
a.out: vmalloc: allocation failure: 0 bytes, mode:0xcc0(GFP_KERNEL), nodemask=(null)
...
Fix is to switch to kvmalloc().
Steps to reproduce:
// vsyscall=none
#include <sys/mman.h>
#include <sys/resource.h>
int main(void)
{
setrlimit(RLIMIT_CORE, &(struct rlimit){RLIM_INFINITY, RLIM_INFINITY});
munmap((void *)0, (1ULL << 47) - 4096);
return 0;
}
Link: http://lkml.kernel.org/r/20180410180353.GA2515@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-15 07:55:24 +09:00
..
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-05-28 12:36:41 +02:00
2018-06-12 16:19:22 -07:00
2018-06-12 12:31:19 -07:00
2018-05-21 14:30:07 -04:00
2018-05-22 14:27:50 -04:00
2018-06-12 16:19:22 -07:00
2018-06-04 10:00:01 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-02-11 14:34:03 -08:00
2018-05-22 14:27:51 -04:00
2018-06-11 10:16:13 -07:00
2018-06-12 20:52:16 -07:00
2018-03-14 13:31:23 +01:00
2018-06-12 16:19:22 -07:00
2018-05-26 09:16:25 +02:00
2018-02-22 10:21:02 -08:00
2018-06-12 16:19:22 -07:00
2018-04-12 12:04:49 +02:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 07:55:24 +09:00
2018-05-22 14:27:51 -04:00
2018-05-16 07:23:35 +02:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-05-22 14:28:00 -04:00
2018-06-04 13:46:22 -07:00
2018-04-02 20:15:53 +02:00
2018-06-12 16:19:22 -07:00
2018-04-05 21:36:21 -07:00
2018-04-16 09:47:41 +02:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-05 16:29:19 -07:00
2018-03-27 13:18:09 -04:00
2018-05-22 14:27:52 -04:00
2018-06-12 18:28:00 -07:00
2018-03-27 13:18:09 -04:00
2018-06-12 18:28:00 -07:00
2018-05-11 15:36:37 -04:00
2018-04-13 15:52:49 +02:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-05-22 14:27:58 -04:00
2018-05-22 14:27:57 -04:00
2018-06-07 09:23:12 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 07:55:24 +09:00
2018-04-06 15:45:33 -07:00
2018-05-22 14:27:52 -04:00
2018-05-22 14:27:54 -04:00
2018-04-09 17:48:54 +02:00
2018-06-12 16:19:22 -07:00
2018-05-22 14:27:55 -04:00
2018-05-21 14:30:09 -04:00
2018-05-22 14:27:53 -04:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 15:49:00 -07:00
2018-06-04 14:20:39 -04:00
2018-05-24 11:57:18 -05:00
2018-04-11 10:28:37 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 07:55:24 +09:00
2018-04-11 10:28:37 -07:00
2018-06-07 17:34:39 -07:00
2018-06-12 16:19:22 -07:00
2018-06-01 18:37:33 -07:00
2018-03-15 17:59:24 +01:00
2018-06-07 17:34:40 -07:00
2018-06-05 19:23:26 +02:00
2018-03-29 15:07:46 -04:00
2018-06-08 17:21:52 -07:00
2018-06-04 10:14:28 -07:00
2018-04-02 20:15:39 +02:00
2018-05-14 08:55:18 -06:00
2018-05-26 09:16:44 +02:00
2018-05-26 09:16:44 +02:00
2018-06-10 10:17:09 -07:00
2018-06-07 17:34:35 -07:00
2018-01-15 12:07:51 -08:00
2018-04-02 20:16:00 +02:00
2018-05-16 07:23:35 +02:00
2018-05-03 16:11:37 -06:00
2018-06-07 08:53:50 -07:00
2018-06-03 10:58:23 -07:00
2018-05-24 12:04:28 -05:00
2018-06-12 15:49:00 -07:00
2018-06-11 08:22:34 -07:00
2018-03-26 15:55:57 +02:00
2018-03-30 11:34:55 -07:00
2018-05-16 07:23:35 +02:00
2018-06-11 08:22:34 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-05-24 12:02:25 -05:00
2018-02-15 15:34:42 -05:00
2018-06-03 10:58:23 -07:00
2018-05-26 09:16:44 +02:00
2018-02-11 14:34:03 -08:00
2018-06-12 16:19:22 -07:00
2018-04-02 20:16:02 +02:00
2018-06-12 16:19:22 -07:00
2018-05-25 18:12:11 -07:00
2018-04-26 19:51:14 -05:00
2018-06-12 16:19:22 -07:00
2018-04-02 20:15:34 +02:00
2018-06-04 10:14:28 -07:00
2018-04-04 12:44:02 -07:00
2018-05-26 09:16:44 +02:00
2018-06-07 17:34:38 -07:00
2018-04-02 20:15:44 +02:00
2018-05-29 13:22:41 -04:00