acrn-kernel/tools/testing/selftests/proc
Alexey Dobriyan 3adb2d8723 proc: fix test for "vsyscall=xonly" boot option
Booting with vsyscall=xonly results in the following vsyscall VMA:

	ffffffffff600000-ffffffffff601000 --xp ... [vsyscall]


Test does read from fixed vsyscall address to determine if kernel
supports vsyscall page but it doesn't work because, well, vsyscall
page is execute only.

Fix test by trying to execute from the first byte of the page which
contains gettimeofday() stub. This should work because vsyscall
entry points have stable addresses by design.

	Alexey, avoiding parsing .config, /proc/config.gz and
	/proc/cmdline at all costs.

Link: https://lkml.kernel.org/r/Ys2KgeiEMboU8Ytu@localhost.localdomain
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: <dylanbhatch@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-07-17 17:31:43 -07:00
..
.gitignore
Makefile
config
fd-001-lookup.c
fd-002-posix-eq.c
fd-003-kthread.c
proc-fsconfig-hidepid.c
proc-loadavg-001.c
proc-multiple-procfs.c
proc-pid-vm.c proc: fix test for "vsyscall=xonly" boot option 2022-07-17 17:31:43 -07:00
proc-self-map-files-001.c
proc-self-map-files-002.c
proc-self-syscall.c
proc-self-wchan.c
proc-subset-pid.c
proc-tid0.c
proc-uptime-001.c
proc-uptime-002.c
proc-uptime.h
proc.h
read.c
self.c
setns-dcache.c
setns-sysvipc.c
thread-self.c