Skip to content

Commit adb3c44

Browse files
authored
Don't enable selinux LSM on boot. (apple#1166)
- Closes apple#1150. - The problem seems to be that the selinux label attribute enforcement doesn't play well with overlayfs. - Solution is to set the `lsm` boot line argument. The new value corresponds to what one would see in a Lima VM with Colima. The Kata kernel we use doesn't provide any of those modules, so now if you run `dmesg | grep -i lsm` in a container you will just see: `LSM: initializing lsm=capability`
1 parent fdeb1b1 commit adb3c44

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎Sources/Services/ContainerSandboxService/Server/SandboxService.swift‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public actor SandboxService {
123123

124124
var kernel = try bundle.kernel
125125
kernel.commandLine.kernelArgs.append("oops=panic")
126+
kernel.commandLine.kernelArgs.append("lsm=lockdown,capability,landlock,yama,apparmor")
126127
let vmm = VZVirtualMachineManager(
127128
kernel: kernel,
128129
initialFilesystem: bundle.initialFilesystem.asMount,

0 commit comments

Comments
 (0)