We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pal_handle->generic.fd
PAL handles have a pal_handle->generic.fd field, which is used in "generic" (not PAL-type-specific) code. Here's the declaration:
gramine/pal/src/host/linux-sgx/pal_host.h
Lines 44 to 47 in 63f8b1f
Whether this generic fd field is used, can be indirectly deduced from pal_handle->flags. We have this comment at the flags declaration:
pal_handle->flags
gramine/pal/src/host/linux/pal_host.h
Lines 116 to 119 in 63f8b1f
Most type-specific PAL handles have the first field that aliases this generic.fd, here's a random example for the "console" type:
generic.fd
Lines 101 to 103 in 63f8b1f
Some type-specific PAL handles do not have the first field that aliases this generic.fd, here's an example ("event" type):
Lines 154 to 173 in 63f8b1f
Finally, to use pal_handle->generic.fd, one needs to condition on the flags field, like this:
flags
gramine/pal/src/host/linux-sgx/pal_streams.c
Line 218 in 63f8b1f
This is a brittle and weird design. Needs to be refactored.
This issue was extracted from a discussion https://reviewable.io/reviews/gramineproject/gramine/1812#-O4dzDjGAdtVeJOUybN_
The text was updated successfully, but these errors were encountered:
No branches or pull requests
PAL handles have a
pal_handle->generic.fd
field, which is used in "generic" (not PAL-type-specific) code. Here's the declaration:gramine/pal/src/host/linux-sgx/pal_host.h
Lines 44 to 47 in 63f8b1f
Whether this generic fd field is used, can be indirectly deduced from
pal_handle->flags
. We have this comment at the flags declaration:gramine/pal/src/host/linux/pal_host.h
Lines 116 to 119 in 63f8b1f
Most type-specific PAL handles have the first field that aliases this
generic.fd
, here's a random example for the "console" type:gramine/pal/src/host/linux-sgx/pal_host.h
Lines 101 to 103 in 63f8b1f
Some type-specific PAL handles do not have the first field that aliases this
generic.fd
, here's an example ("event" type):gramine/pal/src/host/linux-sgx/pal_host.h
Lines 154 to 173 in 63f8b1f
Finally, to use
pal_handle->generic.fd
, one needs to condition on theflags
field, like this:gramine/pal/src/host/linux-sgx/pal_streams.c
Line 218 in 63f8b1f
This is a brittle and weird design. Needs to be refactored.
This issue was extracted from a discussion https://reviewable.io/reviews/gramineproject/gramine/1812#-O4dzDjGAdtVeJOUybN_
The text was updated successfully, but these errors were encountered: