[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 01/10] sysemu: Introduce qemu_security_policy_taint() API
From: |
Eric Blake |
Subject: |
Re: [RFC PATCH 01/10] sysemu: Introduce qemu_security_policy_taint() API |
Date: |
Thu, 9 Sep 2021 13:45:03 -0500 |
User-agent: |
NeoMutt/20210205-739-420e15 |
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@redhat.com>
> ---
> 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
- [RFC PATCH 00/10] security: Introduce qemu_security_policy_taint() API, Philippe Mathieu-Daudé, 2021/09/08
- [RFC PATCH 01/10] sysemu: Introduce qemu_security_policy_taint() API, Philippe Mathieu-Daudé, 2021/09/08
- [RFC PATCH 02/10] accel: Use qemu_security_policy_taint(), mark KVM and Xen as safe, Philippe Mathieu-Daudé, 2021/09/08
- [RFC PATCH 03/10] block: Use qemu_security_policy_taint() API, Philippe Mathieu-Daudé, 2021/09/08
- [RFC PATCH 04/10] block/vvfat: Mark the driver as unsafe, Philippe Mathieu-Daudé, 2021/09/08
- [RFC PATCH 05/10] block/null: Mark 'read-zeroes=off' option as unsafe, Philippe Mathieu-Daudé, 2021/09/08