[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC PATCH 01/10] sysemu: Introduce qemu_security_policy_taint() API
On Thu, Sep 09, 2021 at 01:20:15AM +0200, Philippe Mathieu-Daudé wrote: > Introduce qemu_security_policy_taint() which allows unsafe (read > "not very maintained") code to 'taint' QEMU security policy. > > The "security policy" is the @SecurityPolicy QAPI enum, composed of: > - "none" (no policy, current behavior) > - "warn" (display a warning when the policy is tainted, keep going) > - "strict" (once tainted, exit QEMU before starting the VM) > > The qemu_security_policy_is_strict() helper is also provided, which > will be proved useful once a VM is started (example we do not want s/be proved/prove/ > to kill a running VM if an unsafe device is hot-added). > > Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> > --- > qapi/run-state.json | 16 +++++++++++ > include/qemu-common.h | 19 ++++++++++++ > softmmu/vl.c | 67 +++++++++++++++++++++++++++++++++++++++++++ > qemu-options.hx | 17 +++++++++++ > 4 files changed, 119 insertions(+) > > diff --git a/qapi/run-state.json b/qapi/run-state.json > index 43d66d700fc..b15a107fa01 100644 > --- a/qapi/run-state.json > +++ b/qapi/run-state.json > @@ -638,3 +638,19 @@ > { 'struct': 'MemoryFailureFlags', > 'data': { 'action-required': 'bool', > 'recursive': 'bool'} } > + > +## > +# @SecurityPolicy: > +# > +# An enumeration of the actions taken when the security policy is tainted. > +# > +# @none: do nothing. > +# > +# @warn: display a warning. > +# > +# @strict: prohibit QEMU to start a VM. s/to start/from starting/ > +# > +# Since: 6.2 > +## > +{ 'enum': 'SecurityPolicy', > + 'data': [ 'none', 'warn', 'strict' ] } -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |