Skip to content

Commit 0524bb2

Browse files
committed
Revert "Change /dev to be mounted by default with /noexec"
This reverts commit 09d837b. Mounting /dev with 'noexec' option triggers problems when containers try to create Intel SGX enclaves: ... ioctl(4, SGX_IOC_ENCLAVE_ADD_PAGES, 0x7ffd38e7bf90) = 0 mmap(0x7f36d9002000, 139264, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_FIXED, 4, 0) = -1 EPERM (Operation not permitted) close(4) ... The issue where a device node is mmap()'d with PROT_EXEC has been discussed in length on Linux development mailing lists and with udev/systemd maintainers [1]. As a result of this conversation, systemd changed its defaults to mount /dev with 'exec' [2] and added ExecPaths= and NoExecPaths= [3] to let users to control the behavior. Change runtime-tools to follow the systemd default and to get the runtime behavior fixed for Intel SGX based confidential compute. [1] https://lore.kernel.org/linux-sgx/CALCETrWM2rGPRudtaQ=mn9MRsrbQqFfZDkOGsBbVMsk6mMw_+A@mail.gmail.com/ [2] systemd/systemd#17940 [3] systemd/systemd#17942 Signed-off-by: Mikko Ylinen <[email protected]>
1 parent 2802ff9 commit 0524bb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func New(os string) (generator Generator, err error) {
182182
Destination: "/dev",
183183
Type: "tmpfs",
184184
Source: "tmpfs",
185-
Options: []string{"nosuid", "noexec", "strictatime", "mode=755", "size=65536k"},
185+
Options: []string{"nosuid", "strictatime", "mode=755", "size=65536k"},
186186
},
187187
{
188188
Destination: "/dev/pts",

0 commit comments

Comments
 (0)