gramineproject / graphene

Graphene / Graphene-SGX - a library OS for Linux multi-process applications, with Intel SGX support
https://grapheneproject.io
GNU Lesser General Public License v3.0
771 stars 261 forks source link

[LibOS] Implement POSIX locks #2481

Closed pwmarcz closed 3 years ago

pwmarcz commented 3 years ago

Description of the changes

This implements POSIX locks (fcntl) in client-server IPC architecture. This is a bit hacky and has some drawbacks (locking will always use IPC if you're not in main process, files are identifed by hacks), but I think it should be good enough.

(The sync engine is simply not ready for this: it would require some more features, but first I think it needs to be simplified, I think I've already blown all available complexity budget for this).

See shim_fs_lock.h for an introduction.

Closes #437.

How to test this PR?


This change is Reviewable