test_syscall_vdso_32 [FAIL]

From: Li Zhijian
Date: Mon Jun 25 2018 - 04:41:37 EST


Hi

Intel 0Day noticed that test_syscall_vdso_32 failed since 8bb2610bc4967f19672444a7b0407367f1540028(x86/entry/64/compat: Preserve r8-r11 in int $0x80)

2018-06-25 14:23:00 make run_tests -C x86
make: Entering directory '/usr/src/linux-selftests-x86_64-rhel-7.2-8bb2610bc4967f19672444a7b0407367f1540028/tools/testing/selftests/x86'
gcc -m32 -o /usr/src/linux-selftests-x86_64-rhel-7.2-8bb2610bc4967f19672444a7b0407367f1540028/tools/testing/selftests/x86/test_syscall_vdso_32 -O2 -g -std=gnu99 -pthread -Wall -no-pie -DCAN_BUILD_32 -DCAN_BUILD_64 test_syscall_vdso.c thunks_32.S -lrt -ldl -lm
TAP version 13
selftests: test_syscall_vdso_32
========================================
[RUN] Executing 6-argument 32-bit syscall via VDSO
[WARN] Flags before=0000000000200ed7 id 0 00 o d i s z 0 a 0 p 1 c
[WARN] Flags after=0000000000200606 id 0 00 d i 0 0 p 1
[WARN] Flags change=00000000000008d1 0 00 o s z 0 a 0 0 c
[OK] Arguments are preserved across syscall
[NOTE] R11 has changed:0000000000200606 - assuming clobbered by SYSRET insn
[OK] R8..R15 did not leak kernel data
[RUN] Executing 6-argument 32-bit syscall via INT 80
[OK] Arguments are preserved across syscall
[FAIL] R8 has changed:0000000000000000
[FAIL] R9 has changed:0000000000000000
[FAIL] R10 has changed:0000000000000000
[FAIL] R11 has changed:0000000000000000
[RUN] Executing 6-argument 32-bit syscall via VDSO
[WARN] Flags before=0000000000200ed7 id 0 00 o d i s z 0 a 0 p 1 c
[WARN] Flags after=0000000000200606 id 0 00 d i 0 0 p 1
[WARN] Flags change=00000000000008d1 0 00 o s z 0 a 0 0 c
[OK] Arguments are preserved across syscall
[NOTE] R11 has changed:0000000000200606 - assuming clobbered by SYSRET insn
[OK] R8..R15 did not leak kernel data
[RUN] Executing 6-argument 32-bit syscall via INT 80
[OK] Arguments are preserved across syscall
[FAIL] R8 has changed:0000000000000000
[FAIL] R9 has changed:0000000000000000
[FAIL] R10 has changed:0000000000000000
[FAIL] R11 has changed:0000000000000000
[RUN] Running tests under ptrace
not ok 1..1 selftests: test_syscall_vdso_32 [FAIL]
make: Leaving directory '/usr/src/linux-selftests-x86_64-rhel-7.2-8bb2610bc4967f19672444a7b0407367f1540028/tools/testing/selftests/x86'

This commit changed the testcase expected behavior, but looks it doesn't work as expected.
so want to consult whether 0Day missed something(special configurations) to this case ?

if more details are needed, please let me know.


Thanks