GSC custom device error

174 views
Skip to first unread message

Prateek Sahu

unread,
Jul 20, 2021, 6:18:58 AM7/20/21
to sup...@graphene-project.io
Hi Team,

While tinkering with Graphene and GSC, I encountered the following error and was not sure if it is an issue that needs a git-issue tracker or can be easily resolved.

Azure VM with SGX support - Standard DC8_v2 (8 vcpus, 32 GiB memory)
Kernel: 5.11.16-051116-generic
Installed graphene as per quick start doc (https://graphene.readthedocs.io/en/latest/quickstart.html)

Verified SGX build using helloworld regression test with SGX=1 (enabled)

Moved to Tools/gsc and followed steps for graphene-python docker image (https://graphene.readthedocs.io/en/latest/manpages/gsc.html#example).
Encountered error on step 7 -
docker run --device=/dev/gsgx --device=/dev/isgx \
   -v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket \
   gsc-python -c 'print("HelloWorld!")'
Error:
ccVM@ccVM ~/g/T/gsc (master) [127]> sudo docker run --device=/dev/gsgx --device=/dev/sgx \
                                       -v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket \
                                       gsc-python -c 'print("HelloWorld!")'
docker: Error response from daemon: error gathering device information while adding custom device "/dev/gsgx": no such file or directory.
ERRO[0000] error waiting for container: context canceled

Any help is much appreciated.

Thanks,
Prateek

Kuvaiskii, Dmitrii

unread,
Jul 20, 2021, 6:52:24 AM7/20/21
to Prateek Sahu, sup...@graphene-project.io

You are trying to run your Docker container with: ` docker run --device=/dev/gsgx --device=/dev/isgx  …`

 

You are trying to forward /dev/gsgx and /dev/isgx files (devices) from the host to inside the Docker container.

 

Since you are on Azure Confidential VM:

  • There is no need in /dev/gsgx
  • Instead of /dev/isgx, you must use /dev/sgx/enclave

 

 

In other words, you should run with: ` docker run --device=/dev/sgx/enclave …`

 

There is nothing wrong with documentation per se, it’s just that on different systems / in different environments, some devices are needed (e.g., /dev/gsgx is needed for old Linux kernels) and some devices are named differently (e.g., /dev/isgx is an old name for the SGX driver).

 

--

Dmitrii

--
You received this message because you are subscribed to the Google Groups "Graphene Support Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to graphene-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/graphene-support/CA%2BkagjVKCuC9CWxeXheR412pWjgXhuUviczD3vU-G%2BWmLXZj%3DA%40mail.gmail.com.

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

Reply all
Reply to author
Forward
0 new messages