vmm: Introduce landlock-rules cmdline param

Users can use this parameter to pass extra paths that 'vmm' and its
child threads can use at runtime. Hotplug is the primary usecase for
this parameter.

In order to hotplug devices that use local files: disks, memory zones,
pmem devices etc, users can use this option to pass the path/s that will
be used during hotplug while starting cloud-hypervisor. Doing this will
allow landlock to add required rules to grant access to these paths when
cloud-hypervisor process starts.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Praveen K Paladugu
2024-02-15 23:36:23 +00:00
committed by Liu Wei
parent 287dbd4fc9
commit 1d89f98edf
7 changed files with 118 additions and 0 deletions

View File

@@ -191,6 +191,7 @@ impl RequestHandler for StubApiRequestHandler {
tpm: None,
preserved_fds: None,
landlock_enable: false,
landlock_config: None,
})),
state: VmState::Running,
memory_actual_size: 0,