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 260 forks source link

[LibOS] Rewrite string-based files #2584

Closed pwmarcz closed 3 years ago

pwmarcz commented 3 years ago

Description of the changes

This change decouples the two usages of "str" filesystem: "pseudo" filesystems, and tmpfs. The difference between them is that in "pseudo" filesystems, the file data is stored directly in handle.

Instead of str_* functions, there is a simpler set of mem_file_* functions that do not operate on handles or dentries, just on its own buffer.

The decoupling makes both use-cases simpler: there is no structure "inheritance" and no extra layer of reference counting.

Next steps

How to test this PR?

The existing tests should be enough.


This change is Reviewable