firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

Change seccomp_filters to be passed by value, rather than by reference.

Open jxcurtis opened this issue 2 months ago • 0 comments

In PR #4638 (vCPU hotplugging) seccomp_filters are added as a field of the VMM. This was required in order to apply correct the same seccomp filters to the new vCPU threads as the existing threads. Currently, they are passed around as a reference until the create_vmm_and_vcpus, which then clones them, and the VMM takes ownership of the clone. It should be possible to slightly refactor the code to allow the VMM to take ownership of the original seccomp_filters, then when seccomp_filters is required afterwards, they can be accessed via the Vmm instance, thus keeping the same functionality and removing the need to clone.

jxcurtis avatar Jun 19 '24 14:06 jxcurtis