Dmitrii Kuvaiskii
Dmitrii Kuvaiskii
I started reading about `flock()`. Here are the materials I found particularly interesting and enlightening: - https://lwn.net/Articles/586904/ - https://www.samba.org/samba/news/articles/low_point/tale_two_stds_os2.html (an awesome rant) - https://apenwarr.ca/log/20101213 - https://gavv.net/articles/file-locks/ (summary)
I feel like this important difference between `fcntl()` and `flock()` must be highlighted (in Gramine terms): - `fcntl()` works on the `process -> inode` level, i.e. the relationship is like...
Just FYI, since the commit that introduced POSIX locks (`fcntl(F_SETLK)`) is hard to find. Here is the commit: https://github.com/gramineproject/gramine/commit/abf44e9febdbe3da19a0147f61685baf2edfd264 I'm going through our current implementation of POSIX locks, to understand...
Ok, so here is my proposal for implementing `flock()`: - We heavily reuse the current infrastructure (`struct posix_lock`, `struct posix_lock_request`, `struct fs_lock`) - See [`libos_fs_lock.c`](https://github.com/gramineproject/gramine/blob/master/libos/src/fs/libos_fs_lock.c) - We add a `uintptr_t...
Another quick note: in Gramine, we don't have the mapping `(process, inode) -> lock state`, instead we have the mapping `(process, filename) -> lock state` (`filename` is actually a dentry,...
@pwmarcz If you still remember this work and have some time, could you give any feedback on my above proposal for implementing `flock()`? @kailun-qin You may be also interested in...
Let me close this issue, since it's been inactive for half a year. @riturajsingh487 If the issue still persists, please give us more (and new) details, so that we can...
I added a `P0` label simply because the PR is ready (https://github.com/gramineproject/contrib/pull/38) and should be merged for the next release of Gramine.
I added `P0` priority simply because the PR is ready for review and should be merged for Gramine v1.5
@haraldh The currently recommended way is like we have in the Python example: 1. You create a file with hard-coded contents: https://github.com/gramineproject/gramine/tree/master/CI-Examples/python/helper-files 2. You replace `/etc/hosts` with this file inside...