Search code examples
linuxlinux-kernelkernelconfiguration-filessystem-calls

How to check the vsyscall mode


I am struggling to find out how to check how the [vsyscall] table is configured (to native or emulate). The setting should be set in a variable called vsyscall_mode. Can anyone shed any light on how to check this setting?

By re-running cat /proc/self/maps I have observed that the memory mapped area for [vsyscall] does not change, which the [vdso] does. Does this mean that the setting for vsyscall is set to native?


Solution

  • vsyscall mode is set in kernel configuration so you can be able to choose between native and emulation.

    for fish-shell:

    cat /usr/src/linux-headers-(uname -r)/.config | grep VSYSCALL 
    

    for bash:

    cat /usr/src/linux-headers-$(uname -r)/.config | grep VSYSCALL 
    

    output on debian 8 (as example):

    CONFIG_GENERIC_TIME_VSYSCALL=y
    CONFIG_X86_VSYSCALL_EMULATION=y