Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support legacy usage of SYS_mknod and SYS_mknodat #46

Open
jxyang opened this issue Jan 26, 2021 · 4 comments
Open

Support legacy usage of SYS_mknod and SYS_mknodat #46

jxyang opened this issue Jan 26, 2021 · 4 comments
Labels
area/kernel Area: Kernel severity/minimal Severity: Minimal status/triaged Status: Triaged

Comments

@jxyang
Copy link
Contributor

jxyang commented Jan 26, 2021

According to Linux man page:

POSIX.1-2001 says: "The only portable use of mknod() is to create a
FIFO-special file. If mode is not S_IFIFO or dev is not 0, the
behavior of mknod() is unspecified." However, nowadays one should
never use mknod() for this purpose; one should use mkfifo(3), a
function especially defined for this purpose.

However, we don't support mkfifo in Myst either. And it seems some applications, such as dotnet runtime, still uses mknod to create named pipes.

@paulcallen
Copy link
Contributor

currently we only support this for unix domain sockets, but not for pipes devices.

@paulcallen paulcallen added area/kernel Area: Kernel severity/minimal Severity: Minimal status/triaged Status: Triaged labels Apr 12, 2021
@bodzhang
Copy link
Collaborator

bodzhang commented Jul 2, 2021

Current Mystikos implementation returns success on mknod(S_IFIFO), without creating a FIFO-special file.

@mikbras
Copy link
Contributor

mikbras commented Jul 2, 2021

.NET attempts a mknod system call unless the following environment variable is define.

COMPlus_EnableDiagnostics=0

@vtikoo
Copy link
Collaborator

vtikoo commented Jul 6, 2021

For tracing related dotnet tests, COMPlus_EnableDiagnostics needs to be turned on. One of the threads keeps reading on a pipe created via mknod in a loop. This fails currently as the /tmp path related to the pipe is not present in the enclave rootfs, causing an indefinite loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kernel Area: Kernel severity/minimal Severity: Minimal status/triaged Status: Triaged
Projects
None yet
Development

No branches or pull requests

5 participants