diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
commit | 57a8ec387e1441ea5e1232bc0749fb99a8cba7e7 (patch) | |
tree | b5fb03fc6bc5754de8b5b1f8b0e4f36d67c8315c /tools/testing/selftests/proc/proc-pid-vm.c | |
parent | 0a8ad0ffa4d80a544f6cbff703bf6394339afcdf (diff) | |
parent | 43e11fa2d1d3b6e35629fa556eb7d571edba2010 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton:
"VM:
- z3fold fixes and enhancements by Henry Burns and Vitaly Wool
- more accurate reclaimed slab caches calculations by Yafang Shao
- fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
Christoph Hellwig
- !CONFIG_MMU fixes by Christoph Hellwig
- new novmcoredd parameter to omit device dumps from vmcore, by
Kairui Song
- new test_meminit module for testing heap and pagealloc
initialization, by Alexander Potapenko
- ioremap improvements for huge mappings, by Anshuman Khandual
- generalize kprobe page fault handling, by Anshuman Khandual
- device-dax hotplug fixes and improvements, by Pavel Tatashin
- enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V
- add pte_devmap() support for arm64, by Robin Murphy
- unify locked_vm accounting with a helper, by Daniel Jordan
- several misc fixes
core/lib:
- new typeof_member() macro including some users, by Alexey Dobriyan
- make BIT() and GENMASK() available in asm, by Masahiro Yamada
- changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
code generation, by Alexey Dobriyan
- rbtree code size optimizations, by Michel Lespinasse
- convert struct pid count to refcount_t, by Joel Fernandes
get_maintainer.pl:
- add --no-moderated switch to skip moderated ML's, by Joe Perches
misc:
- ptrace PTRACE_GET_SYSCALL_INFO interface
- coda updates
- gdb scripts, various"
[ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
fs/select.c: use struct_size() in kmalloc()
mm: add account_locked_vm utility function
arm64: mm: implement pte_devmap support
mm: introduce ARCH_HAS_PTE_DEVMAP
mm: clean up is_device_*_page() definitions
mm/mmap: move common defines to mman-common.h
mm: move MAP_SYNC to asm-generic/mman-common.h
device-dax: "Hotremove" persistent memory that is used like normal RAM
mm/hotplug: make remove_memory() interface usable
device-dax: fix memory and resource leak if hotplug fails
include/linux/lz4.h: fix spelling and copy-paste errors in documentation
ipc/mqueue.c: only perform resource calculation if user valid
include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
scripts/gdb: add helpers to find and list devices
scripts/gdb: add lx-genpd-summary command
drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
kernel/pid.c: convert struct pid count to refcount_t
drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
...
Diffstat (limited to 'tools/testing/selftests/proc/proc-pid-vm.c')
-rw-r--r-- | tools/testing/selftests/proc/proc-pid-vm.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/testing/selftests/proc/proc-pid-vm.c b/tools/testing/selftests/proc/proc-pid-vm.c index 853aa164a401..18a3bde8bc96 100644 --- a/tools/testing/selftests/proc/proc-pid-vm.c +++ b/tools/testing/selftests/proc/proc-pid-vm.c | |||
@@ -215,6 +215,11 @@ static const char str_vsyscall[] = | |||
215 | "ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]\n"; | 215 | "ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]\n"; |
216 | 216 | ||
217 | #ifdef __x86_64__ | 217 | #ifdef __x86_64__ |
218 | static void sigaction_SIGSEGV(int _, siginfo_t *__, void *___) | ||
219 | { | ||
220 | _exit(1); | ||
221 | } | ||
222 | |||
218 | /* | 223 | /* |
219 | * vsyscall page can't be unmapped, probe it with memory load. | 224 | * vsyscall page can't be unmapped, probe it with memory load. |
220 | */ | 225 | */ |
@@ -231,11 +236,19 @@ static void vsyscall(void) | |||
231 | if (pid == 0) { | 236 | if (pid == 0) { |
232 | struct rlimit rlim = {0, 0}; | 237 | struct rlimit rlim = {0, 0}; |
233 | (void)setrlimit(RLIMIT_CORE, &rlim); | 238 | (void)setrlimit(RLIMIT_CORE, &rlim); |
239 | |||
240 | /* Hide "segfault at ffffffffff600000" messages. */ | ||
241 | struct sigaction act; | ||
242 | memset(&act, 0, sizeof(struct sigaction)); | ||
243 | act.sa_flags = SA_SIGINFO; | ||
244 | act.sa_sigaction = sigaction_SIGSEGV; | ||
245 | (void)sigaction(SIGSEGV, &act, NULL); | ||
246 | |||
234 | *(volatile int *)0xffffffffff600000UL; | 247 | *(volatile int *)0xffffffffff600000UL; |
235 | exit(0); | 248 | exit(0); |
236 | } | 249 | } |
237 | wait(&wstatus); | 250 | waitpid(pid, &wstatus, 0); |
238 | if (WIFEXITED(wstatus)) { | 251 | if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) == 0) { |
239 | g_vsyscall = true; | 252 | g_vsyscall = true; |
240 | } | 253 | } |
241 | } | 254 | } |