mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-16 16:32:03 +00:00
Merge pull request #2783 from likebreath/1001/clh_enable_seccomp
virtcontainers: clh: Enable the `seccomp` feature
This commit is contained in:
commit
09741272bc
@ -114,6 +114,9 @@ block_device_driver = "virtio-blk"
|
||||
# being allocated using huge pages.
|
||||
#enable_hugepages = true
|
||||
|
||||
# Disable the 'seccomp' feature from Cloud Hypervisor, default false
|
||||
# disable_seccomp = true
|
||||
|
||||
# This option changes the default hypervisor and kernel parameters
|
||||
# to enable debug output where available.
|
||||
#
|
||||
|
@ -87,6 +87,7 @@ const defaultTxRateLimiterMaxRate = uint64(0)
|
||||
const defaultConfidentialGuest = false
|
||||
const defaultGuestSwap = false
|
||||
const defaultRootlessHypervisor = false
|
||||
const defaultDisableSeccomp = false
|
||||
|
||||
var defaultSGXEPCSize = int64(0)
|
||||
|
||||
|
@ -135,6 +135,7 @@ type hypervisor struct {
|
||||
ConfidentialGuest bool `toml:"confidential_guest"`
|
||||
GuestSwap bool `toml:"enable_guest_swap"`
|
||||
Rootless bool `toml:"rootless"`
|
||||
DisableSeccomp bool `toml:"disable_seccomp"`
|
||||
}
|
||||
|
||||
type runtime struct {
|
||||
@ -865,6 +866,7 @@ func newClhHypervisorConfig(h hypervisor) (vc.HypervisorConfig, error) {
|
||||
VirtioFSExtraArgs: h.VirtioFSExtraArgs,
|
||||
SGXEPCSize: defaultSGXEPCSize,
|
||||
EnableAnnotations: h.EnableAnnotations,
|
||||
DisableSeccomp: h.DisableSeccomp,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@ -1056,6 +1058,7 @@ func GetDefaultHypervisorConfig() vc.HypervisorConfig {
|
||||
ConfidentialGuest: defaultConfidentialGuest,
|
||||
GuestSwap: defaultGuestSwap,
|
||||
Rootless: defaultRootlessHypervisor,
|
||||
DisableSeccomp: defaultDisableSeccomp,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -960,11 +960,11 @@ func (clh *cloudHypervisor) launchClh() (int, error) {
|
||||
args = append(args, "-v")
|
||||
}
|
||||
|
||||
// Disable the 'seccomp' option in clh for now.
|
||||
// In this way, we can separate the periodic failures caused
|
||||
// by incomplete `seccomp` filters from other failures.
|
||||
// We will bring it back after completing the `seccomp` filter.
|
||||
// Enable the `seccomp` feature from Cloud Hypervisor by default
|
||||
// Disable it only when requested by users for debugging purposes
|
||||
if clh.config.DisableSeccomp {
|
||||
args = append(args, "--seccomp", "false")
|
||||
}
|
||||
|
||||
clh.Logger().WithField("path", clhPath).Info()
|
||||
clh.Logger().WithField("args", strings.Join(args, " ")).Info()
|
||||
|
@ -508,6 +508,9 @@ type HypervisorConfig struct {
|
||||
|
||||
// Rootless is used to enable rootless VMM process
|
||||
Rootless bool
|
||||
|
||||
// Disable seccomp from the hypervisor process
|
||||
DisableSeccomp bool
|
||||
}
|
||||
|
||||
// vcpu mapping from vcpu number to thread number
|
||||
|
Loading…
Reference in New Issue
Block a user