vsyscall in linux kernel
Posted: Sun Jul 31, 2011 2:30 pm
Hi, there
I recently studying about vsyscall, and I know that it's a kernel page mapped into user address space to accelerate system call
Therefore I try to go the tutorial in the website http://www.win.tue.nl/~aeb/linux/lk/lk-4.html(Sec4.6) to dump the page
I dumped into one file but it showed that
i expect to get an ELF format file but objdump showed that it cannot recognized the format
i am sure that i dumped the right page, but why it turned out this unrecognized page
please help me to figure it out
OS: Fedora 14 x86_64
kernel : 2.6.35.6
I recently studying about vsyscall, and I know that it's a kernel page mapped into user address space to accelerate system call
Therefore I try to go the tutorial in the website http://www.win.tue.nl/~aeb/linux/lk/lk-4.html(Sec4.6) to dump the page
Code: Select all
$ cat /proc/self/maps
...
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
/* get vsyscall page */
#include <unistd.h>
#include <string.h>
int main() {
char *p = (char *) 0xffffffffff600000;
char buf[4096];
memcpy(buf, p, 4096);
write(1, buf, 4096);
return 0;
}
$ ./a.out > vsyscall
Code: Select all
$ file vsyscall
vsyscall: data
$ objdump -d vsyscall
objdump: vsyscall: File format not recognized
i am sure that i dumped the right page, but why it turned out this unrecognized page
please help me to figure it out
OS: Fedora 14 x86_64
kernel : 2.6.35.6