Gramine Use Case

27 views
Skip to first unread message

Kevin Chacon Levin

unread,
Aug 8, 2023, 12:01:10 PM8/8/23
to us...@gramineproject.io
To whom it may concern,

Hope this email finds you well.

I have a very specific need in order to use Gramine. I need to print all system calls that happen when running an application via Gramine. I'm having difficulty achieving this (bare in mind I'm not expert on this). I thought that modifying the file libos_syscalls.c and the function libos_emulate_syscall would be enough, but nothing has happened.

Can you point me in the direction of which component is in charge of intercepting systemcalls so that I can print the system call names?

Thanks so much.

Best,
Kevin

Wojtek Porczyk

unread,
Aug 8, 2023, 12:19:50 PM8/8/23
to Kevin Chacon Levin, us...@gramineproject.io
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Tue, Aug 08, 2023 at 03:03:59PM +0100, Kevin Chacon Levin wrote:
> I have a very specific need in order to use Gramine. I need to print all
> system calls that happen when running an application via Gramine. I'm
> having difficulty achieving this (bare in mind I'm not expert on this). I
> thought that modifying the file libos_syscalls.c and the function
> libos_emulate_syscall would be enough, but nothing has happened.
>
> Can you point me in the direction of which component is in charge of
> intercepting systemcalls so that I can print the system call names?

You can use loader.log_level="trace" in manifest, it will print all the
syscalls to stderr.
https://gramine.readthedocs.io/en/stable/manifest-syntax.html#log-level


- --
pozdrawiam / best regards
Wojtek Porczyk
Gramine / Invisible Things Lab

I do not fear computers,
I fear lack of them.
-- Isaac Asimov
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEaO0VFfpr0tEF6hYkv2vZMhA6I1EFAmTSax4ACgkQv2vZMhA6
I1E/nQ//VBZeZGGuIXEGyQudFTyI/wQTqPUlzcKZFCNxk9WM2dW6Riy0t4DvOWEJ
ttpxa3jLNn6f2AwBYfuIoCX/U3EI8+htx4KI4T/ETH9HyY09L5VUfeL/ziL0h5Ar
DSoWQE+QVhsiffu9n+zC5KXoeMWGNDtXK2T5EIwycDwc+wux9XothQafDBzBcbG7
yvrTgOqy291QrjSKqrF955aSGx1q4rZ8zCMKIV+ezP99ZCE4mYSC9IVMCFkbzxwj
zKm1WwVE8Sk0U8se8u44gModaxP4uMahAIjZ4qkKZrRb5+w6lnNHwI6IXzD7WfPv
p2z2+BRh7Xzrp9HaWCdBrmZ8LD30Y7xjWewAFKs0S1HcxrbJ8aBr0hG5N7BPjqp2
PoiU/+twVEIwvp6xus5ji2h2TfHH/8ST0KjuU/C/nlwBQceWfUUfkdfTLmWvfy+W
C2slPV9kSNEpFNS1YQtteRfgI5nYr4mFUCQIXtnaJb+NRRIWTYtPkCuqmsyTrX+G
KjsuurkfluK97QKNB9l+M7Vse+QtlD50zGx6S/JIYh4l1sbxFIInk1cfXsmR6aMu
eYHR+N5YO9N7w3jH/FxcPzmk10RIpyAORFYqZuu8E84gBx/PRHLb6cAOJKhKU85k
GLTUv8SDRq/I6sDp6sSEM/5daEFdVcWQw2x4CytlLozASi9qytg=
=dSlQ
-----END PGP SIGNATURE-----

Kenny

unread,
Aug 10, 2023, 4:00:46 AM8/10/23
to Gramine Users
Hi,

Are you referring to implement the system call? You can add the function body of libos_syscall_sched_setaffinity to implement the system call.


Regards,
Ken

Kevin Chacon Levin

unread,
Aug 16, 2023, 12:59:49 AM8/16/23
to Wojtek Porczyk, us...@gramineproject.io
Hi Wojtek,

Thanks so much for your reply.

This solved my problem. Thank you again :).

Best,
Kevin
Reply all
Reply to author
Forward
0 new messages