Closed mythi closed 1 year ago
Since systemd changed its default, I see no reason for us not to chnage.
@mythi Want to open a PR?
@rhatdan yes I will submit the PR on Tue
@rhatdan wanted to check here first but I believe I should submit a podman issue about this:
I tried to try podman rootless containers with SGX and I believe it still suffers the same issue:
$ podman run -it --rm --device /dev/sgx_enclave --group-add keep-groups --workdir /opt/intel/sgx-sample-app --entrypoint /bin/bash localhost/intel/sgx-sdk-demo:devel
# mount|grep sgx_enclave
devtmpfs on /dev/sgx_enclave type devtmpfs (rw,nosuid,noexec,relatime,size=1997876k,nr_inodes=499469,mode=755)
I'm on Ubuntu 22.04 with:
$ podman version
Version: 3.4.4
API Version: 3.4.4
Go Version: go1.18.1
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64
I would prefer you try this on a much more up 2 date version of Podman.
I would prefer you try this on a much more up 2 date version of Podman.
ouch, sorry! I can update to the Kubic releases but they only give me 4.6.2 and noexec
is still there:
$ podman version
Client: Podman Engine
Version: 4.6.2
API Version: 4.6.2
Go Version: go1.18.1
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64
$ podman run -it --rm --device /dev/sgx_enclave --group-add keep-groups --workdir /opt/intel/sgx-sample-app --entrypoint /bin/bash localhost/intel/sgx-sdk-demo:devel
root@4910ac608090:/opt/intel/sgx-sample-app# ./sgx-sample-app
Error: Unexpected error occurred.
Enter a character before exit ...
root@4910ac608090:/opt/intel/sgx-sample-app# mount|grep sgx_encl
devtmpfs on /dev/sgx_enclave type devtmpfs (rw,nosuid,noexec,relatime,size=1997876k,nr_inodes=499469,mode=755)
ouch, sorry! I can update to the Kubic releases but they only give me 4.6.2 and noexec is still there:
the fixed version of runtime-tools was pulled to podman in April so something else triggers that
725 added
noexec
to default/dev
mount options but this triggers problems when containers try to create Intel SGX enclaves:The issue where a dev node is
mmap()'d
withPROT_EXEC
has been discussed in length on LKML and in systemd github:systemd now allows this to be configured using
ExecPaths=
andNoExecPaths=
butnoexec
is not added by default.I've only tested this using CRI-O where containers with SGX enclaves cannot be launched with CRI-O v1.25+. This is the release where CRI-O pulled in #725 from
runtime-tools
./cc @rhatdan @mrunalp @haircommander