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] Fix setting of `O_NONBLOCK` flag at the write end of pipe #2524

Closed vijaydhanraj closed 3 years ago

vijaydhanraj commented 3 years ago

Description of the changes

Currently, in Graphene we don't save the O_NONBLOCK flag for the write end of the pipe. We set the O_NONBLOCK flag for the PAL_HANDLE but this isn't propagated to the SHIM_HANDLE when creating pipe. This commit fixes the corner case.

Also, updated the pipe_nonblocking regression test to catch this corner case.

How to test this PR?

Please run both graphene-direct and graphene-sgx regression tests.


This change is Reviewable

dimakuv commented 3 years ago

Jenkins, test this please

vijaydhanraj commented 3 years ago

@boryspoplawski I have also rebased to the latest master.

boryspoplawski commented 3 years ago

Jenkins, test this please

boryspoplawski commented 3 years ago

Superseded by https://github.com/gramineproject/gramine/pull/35