Custom syscall Handling

Skip to first unread message

Anthony Tranduc

Jun 25, 2021, 2:07:40 PM6/25/21
to gVisor Users [Public]
Hi everyone,

I'm looking for a way to intercept system calls by applications in containers and have my own way of handling them. Would this be possible with gVisor? I was looking around and thought I'd go ahead and ask.

For example, if an application gets the current time using a system timing call, I'd like to have a fake time be returned. 

If this requires modifying gVisor (maybe the Sentry?), where should I start to look?


Ian Lewis

Jun 25, 2021, 7:00:03 PM6/25/21
to Anthony Tranduc, gVisor Users [Public]
Hey Anthony,

You can do that but gVisor doesn't provide a pluggable way to do it. You would need to modify the code directly. You can start by taking a look at the pkg/sentry/syscalls/linux directory. That's where all the syscall entrypoints are defined.


You received this message because you are subscribed to the Google Groups "gVisor Users [Public]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit


Ian Lewis | Developer Advocate | | +81 (03)4540-2465

Reply all
Reply to author
0 new messages