'How to customize system calls in gVisor?

I am a student and try to customize the system calls in gVisor. I have successfully compiled the gVisor on go-branch. And I have got the right message when I change the pkg/sentry/kernel/syslog.go file. Here is the result that can show I have successfully compiled the runsc (the runtime of gVisor).

sudo docker run --runtime=runsc -it ubuntu dmesg

[    0.000000] asdf Starting gVisor...
[    0.360765] 6666...
[    0.529799] 5555...
[    0.959593] iiiiii...
[    1.343602] 7777...
[    1.347068] 4444...
[    1.424063] 00000...
[    1.470641] 22222...
[    1.858755] 99999...
[    2.213219] 8888...
[    2.679995] cccccc ..
[    2.943468]  asdf asdf Setting up VFS2...
[    3.429006] Ready!

And I have noticed the package gvisor/pkg/sentry/syscalls/linux which contains all the syscalls and they are registered in file gvisor/pkg/sentry/syscalls/linux/linux64.go. However, I failed to customize the syscalls in gVisor.

Thanks very much.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source