lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 16 Jun 2022 08:15:16 +0200
From:   Juergen Gross <jgross@...e.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        viresh.kumar@...aro.org,
        Stefano Stabellini <sstabellini@...nel.org>,
        Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
Subject: Re: [PATCH v2] xen: don't require virtio with grants for non-PV
 guests

On 16.06.22 08:03, Christoph Hellwig wrote:
> On Thu, Jun 16, 2022 at 07:37:15AM +0200, Juergen Gross wrote:
>> Commit fa1f57421e0b ("xen/virtio: Enable restricted memory access using
>> Xen grant mappings") introduced a new requirement for using virtio
>> devices: the backend now needs to support the VIRTIO_F_ACCESS_PLATFORM
>> feature.
>>
>> This is an undue requirement for non-PV guests, as those can be operated
>> with existing backends without any problem, as long as those backends
>> are running in dom0.
>>
>> Per default allow virtio devices without grant support for non-PV
>> guests.
>>
>> Add a new config item to always force use of grants for virtio.
> 
> What Í'd really expect here is to only set the limitations for the
> actual grant-based devic.  Unfortunately
> PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS is global instead of per-device,

I think the global setting is fine, as it serves a specific purpose:
don't allow ANY virtio devices without the special handling (like the
/390 PV case, SEV, TDX, or Xen PV-guests). Those cases can't sensibly
work without the special DMA ops.

In case the special DMA ops are just a "nice to have" like for Xen HVM
guests, PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS won't be set.

And if someone wants a guest only to use grant based virtio devices,
the guest kernel can be built with CONFIG_XEN_VIRTIO_FORCE_GRANT (e.g.
in case the backends are running in some less privileged environment
and thus can't map arbitrary guest memory pages).


Juergen

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ