mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 20:24:31 +00:00
virtcontainers: Do not add a virtio-rng-ccw device
On s390x, skip adding a virtio-rng device. The on-chip CPACF provides entropy instead. For Confidential Containers, when using Secure Execution, entropy attacks on virtio-rng are mitigated. Fixes: #3598 Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
This commit is contained in:
parent
6d6748afd7
commit
7ffe9e5198
@ -619,13 +619,16 @@ func (q *qemu) CreateVM(ctx context.Context, id string, networkNS NetworkNamespa
|
|||||||
qemuConfig.IOThreads = []govmmQemu.IOThread{*ioThread}
|
qemuConfig.IOThreads = []govmmQemu.IOThread{*ioThread}
|
||||||
}
|
}
|
||||||
// Add RNG device to hypervisor
|
// Add RNG device to hypervisor
|
||||||
rngDev := config.RNGDev{
|
// Skip for s390x as CPACF is used
|
||||||
ID: rngID,
|
if machine.Type != QemuCCWVirtio {
|
||||||
Filename: q.config.EntropySource,
|
rngDev := config.RNGDev{
|
||||||
}
|
ID: rngID,
|
||||||
qemuConfig.Devices, err = q.arch.appendRNGDevice(ctx, qemuConfig.Devices, rngDev)
|
Filename: q.config.EntropySource,
|
||||||
if err != nil {
|
}
|
||||||
return err
|
qemuConfig.Devices, err = q.arch.appendRNGDevice(ctx, qemuConfig.Devices, rngDev)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add PCIe Root Port devices to hypervisor
|
// Add PCIe Root Port devices to hypervisor
|
||||||
|
Loading…
Reference in New Issue
Block a user