Closed Relyor closed 3 years ago
First, you seem to be using a very old Graphene version. Please try with the latest master commit.
Second, libusb
works with devices, doesn't it? Graphene currently doesn't support accesses to devices (other than pseudo-devices like /dev/null
, /dev/random
). So I don't think Graphene will work at all in your use case.
Hi @dimakuv, thanks for the answer.
Is it possible to call all the libusb functions through some ECALLS and run the other part of my program over graphene? If yes, can I find a similar example on github?
@Relyor Currently this is not possible. We have plans for implementing such functionality, but this is rather long-term (6 months from now? I can't say).
Since there is nothing that can be done at the moment, and we are aware of the device support requests (but this will not happen soon), I'll close this issue.
Hello,
I am trying to run a C program which is mostly using libusb library.
include
include
include
include
define OUT_BULK_KINGSTON_ENDPOINT 0x02
define IN_BULK_KINGSTON_ENDPOINT 0x81
int main(void) { libusb_device **devs; int r; ssize_t cnt;
}
I am compiling the code using: gcc -Wall -fpie -o listdevs listdevs.c -I/usr/include/libusb-1.0 -lusb-1.0
When running the binary, in simulation mode using: ~/graphene/Runtime/pal_loader my_binary I'm getting the following:
error: Using insecure argv source. Graphene will continue application execution, but this configuration must not be used in production! [P9410:T1:gs] error: Failed to load . This may be caused by the binary being non-PIE, in which case Graphene requires a specially-crafted memory layout. You can enable it by adding 'sgx.nonpie_binary = 1' to the manifest. [P9410:T1:gs] error: Error during shim_init() in init_loader (-2)
Though, I have a PIE executable. I've checked with hardening-check tool to assure.
Any advise would be much appreciated!
Thanks!