gramineproject / gramine

A library OS for Linux multi-process applications, with Intel SGX support
GNU Lesser General Public License v3.0
551 stars 184 forks source link

[LibOS] Add `stat()` and `hstat()` callbacks to FIFOs #1897

Closed dimakuv closed 3 weeks ago

dimakuv commented 3 weeks ago

Description of the changes

Previously, FIFO pseudo-files (named pipes) did not have callbacks of stat() (used on FIFO filenames) and hstat() (used on FIFO handles/FDs). This breaks some apps that want to double-check that the file they have opened or want to open is a FIFO, using the stat() or fstat() syscalls. There was no good reason to skip those callbacks, so this commit adds their dummy implementations.

Fixes #1896.

How to test this PR?

Added some sub-tests in LibOS, and activated read03 in LTP.


This change is Reviewable