Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
3 votes
1 answer
372 views

uint64_t getTimeLatencyNs() { struct timespec ts1; struct timespec ts2; clock_gettime(CLOCK_MONOTONIC_RAW, &ts1); clock_gettime(CLOCK_MONOTONIC_RAW, &ts2); return ((ts2....
Mo_'s user avatar
  • 2,101
1 vote
1 answer
222 views

I'd like to dump the [vvar] segment from a linux userspace program (which may be running on x86, arm, or mips...). My problem is that only the first page(s) of the vvar segment are mapped, and I get ...
3 votes
0 answers
1k views

I ran the code below with strace. I can see it doesn't use a system call to get the time. After write only clock_nanosleep and exit_group are called. It correctly gives me 3 every run (I was expecting ...
1 vote
1 answer
409 views

I am trying to implement a syscall on x86 that is able to modify the content of vDSO. Given vDSO content is read-only for userspace, I believe a syscall is needed. Otherwise it will cause segmentation ...
3 votes
2 answers
1k views

If I compile the following program: $ cat main.cpp && g++ main.cpp #include <time.h> int main() { struct timespec ts; return clock_gettime(CLOCK_MONOTONIC, &ts); } and then ...
3 votes
0 answers
1k views

Recently I am study vdso in linux. I tried to modify the data in vvar section but it failed. Following is what I've tried. According to lwn described, there're two address for vvar: The first one is ...
Steven's user avatar
  • 871
0 votes
1 answer
144 views

I am trying to declare a new variable in vvar.h and define it near my new VDSO function. So that I could use this variable in my vdso function. I have a question about VVar. According to the ...
2 votes
0 answers
116 views

I write a program,use time() function, When I gdb it : [VM_241_149_tlinux ~/test]$ gdb ./testsys_d -q Reading symbols from /data/home/youngxiao/test/testsys_d...(no debugging symbols found)...done. (...
youngxiao's user avatar
3 votes
0 answers
597 views

After glibc 2.25, glibc's getpid() wrapper no longer cache its result. However, on x86_64 vdso didn't provide getpid() function. Which means everytime getpid() is called, a syscall is triggered. I am ...
1 vote
0 answers
117 views

For an experiment, I need to instrument and allocate entry nodes for a hashtable inside arch/x86/vdso/vclock_gettime.c through the following typical approach. struct h_struct *phe = (struct h_struct*)...
1 vote
1 answer
207 views

I wrote a sample program to use __kernel_vsyscall for system call #include <stdio.h> #include <sys/auxv.h> int main() { unsigned long sysinfo = getauxval(AT_SYSINFO); unsigned ...
md.jamal's user avatar
  • 4,727
0 votes
1 answer
47 views

I am using SAMA5d2 CPU with Linux, and want to have access to ioport from vdso function. How shoul I map ioport to userspace memory to get access to ioport in vdso function which calls from userspace? ...
68 votes
2 answers
81k views

I am learning about VDSO, wrote a simple application which calls gettimeofday() #define _GNU_SOURCE #include <sys/syscall.h> #include <sys/time.h> #include <stdio.h> #include <...
1 vote
2 answers
797 views

I'm trying to do a vDSO using latest kernel source code. I was following this tutorial https://www.linuxjournal.com/content/creating-vdso-colonels-other-chicken?page=0,0 However I didn't find some ...
1 vote
2 answers
1k views

I'm trying to understand when clock_gettime() can lead to errors. The man page lists the following two possibilities: EFAULT tp points outside the accessible address space. EINVAL The clk_id specified ...

15 30 50 per page
1
2 3

AltStyle によって変換されたページ (->オリジナル) /