https://alittleresearcher.blogspot.com/2017/04/linux-vdso-and-vsyscall-history.html 中详细描述了vsyscall的由来。
vsyscall固定地址:0xffffffffff600000,有三个函数
0xffffffffff600000,0xffffffffff600000+400,0xffffffffff600000+800
vsyscall int gettimeofday(struct timeval *tv, struct timezone *tz);
vsyscall + 400 time函数定义:time_t time(time_t *tloc)
vsyscall + 800 getcpu函数定义:
int getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache);
https://alittleresearcher.blogspot.com/2017/04/linux-vdso-and-vsyscall-history.html
网友评论