Custom syscall Handling

22 views
Skip to first unread message

Anthony Tranduc

unread,
Jun 25, 2021, 2:07:40 PMJun 25
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?

Thanks!

Ian Lewis

unread,
Jun 25, 2021, 7:00:03 PMJun 25
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.

Ian

--
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 gvisor-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gvisor-users/7bab1ea0-9035-493a-9153-f628b8ed0c5dn%40googlegroups.com.


--

Ian Lewis | Developer Advocate | ianl...@google.com | +81 (03)4540-2465

Reply all
Reply to author
Forward
0 new messages