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]
Message-ID:
 <DM4PR18MB426985710197436081F084C1DF8EA@DM4PR18MB4269.namprd18.prod.outlook.com>
Date: Tue, 13 Jan 2026 10:11:38 +0000
From: Shiva Shankar Kommula <kshankar@...vell.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
CC: "jasowang@...hat.com" <jasowang@...hat.com>,
        "virtualization@...ts.linux.dev" <virtualization@...ts.linux.dev>,
        "eperezma@...hat.com" <eperezma@...hat.com>,
        "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Jerin Jacob <jerinj@...vell.com>,
        Nithin Kumar Dabilpuram
	<ndabilpuram@...vell.com>,
        Srujana Challa <schalla@...vell.com>,
        "dtatulea@...dia.com" <dtatulea@...dia.com>,
        "jgg@...dia.com"
	<jgg@...dia.com>
Subject: Re: [EXTERNAL] Re: [PATCH] vhost: fix caching attributes of MMIO
 regions by setting them explicitly

________________________________________
From: Michael S. Tsirkin <mst@...hat.com>
Sent: Tuesday, January 13, 2026 13:00
To: Shiva Shankar Kommula
Cc: jasowang@...hat.com; virtualization@...ts.linux.dev; eperezma@...hat.com; kvm@...r.kernel.org; netdev@...r.kernel.org; Jerin Jacob; Nithin Kumar Dabilpuram; Srujana Challa; dtatulea@...dia.com; jgg@...dia.com
Subject: [EXTERNAL] Re: [PATCH] vhost: fix caching attributes of MMIO regions by setting them explicitly

On Fri, Jan 02, 2026 at 12: 27: 03PM +0530, Kommula Shiva Shankar wrote: > Explicitly set non-cached caching attributes for MMIO regions. > Default write-back mode can cause CPU to cache device memory, > causing invalid reads and unpredictable
ZjQcmQRYFpfptBannerStart
Prioritize security for external emails:
Confirm sender and content safety before clicking links or opening attachments
<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/CRVmXkqW!tc3Z1f8UYnX61G-8-Z36D0TwOyXGKE_ybqkwtAsNGONThDzce1-BzQFJIDlDn_iWLJpe2FHKyeofP3u77neSt706ScpI5Ec$>
Report Suspicious

ZjQcmQRYFpfptBannerEnd

On Fri, Jan 02, 2026 at 12:27:03PM +0530, Kommula Shiva Shankar wrote:
> Explicitly set non-cached caching attributes for MMIO regions.
> Default write-back mode can cause CPU to cache device memory,
> causing invalid reads and unpredictable behavior.
>
> Invalid read and write issues were observed on ARM64 when mapping the
> notification area to userspace via mmap.

> device memory in question is the VQ kick, yes?
> So if it is cached, the kick can get delayed, but how
> is this causing "invalid read and write issues"?
> What is read/written exactly?
This is the VQ notification address. 
on ARM64, when memory mapped as write back, notification writes never reached the device.
Reads on the device side sees stale values. 

>
> Signed-off-by: Kommula Shiva Shankar <kshankar@...vell.com>
> Acked-by: Jason Wang <jasowang@...hat.com>

> I also worry a bit about regressing on other hardware.
> Cc nvidia guys.


> ---
> Originally sent to net-next, now redirected to vhost tree
> per Jason Wang's suggestion.
>
>  drivers/vhost/vdpa.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> index 05a481e4c385..b0179e8567ab 100644
> --- a/drivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -1527,6 +1527,7 @@ static int vhost_vdpa_mmap(struct file *file, struct vm_area_struct *vma)
>       if (vma->vm_end - vma->vm_start != notify.size)
>               return -ENOTSUPP;
>
> +     vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
>       vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP);
>       vma->vm_ops = &vhost_vdpa_vm_ops;
>       return 0;
> --
> 2.48.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ