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] [day] [month] [year] [list]
Message-ID:
 <SA1PR12MB719972594616B5BF71356243B05F2@SA1PR12MB7199.namprd12.prod.outlook.com>
Date: Thu, 29 Feb 2024 16:31:09 +0000
From: Ankit Agrawal <ankita@...dia.com>
To: Alex Williamson <alex.williamson@...hat.com>
CC: Jason Gunthorpe <jgg@...dia.com>, Yishai Hadas <yishaih@...dia.com>,
	"shameerali.kolothum.thodi@...wei.com"
	<shameerali.kolothum.thodi@...wei.com>, "kevin.tian@...el.com"
	<kevin.tian@...el.com>, Aniket Agashe <aniketa@...dia.com>, Neo Jia
	<cjia@...dia.com>, Kirti Wankhede <kwankhede@...dia.com>, "Tarun Gupta
 (SW-GPU)" <targupta@...dia.com>, Vikram Sethi <vsethi@...dia.com>, Andy
 Currid <acurrid@...dia.com>, Alistair Popple <apopple@...dia.com>, John
 Hubbard <jhubbard@...dia.com>, Dan Williams <danw@...dia.com>, Rahul
 Rameshbabu <rrameshbabu@...dia.com>, Zhi Wang <zhiw@...dia.com>, "Anuj
 Aggarwal (SW-GPU)" <anuaggarwal@...dia.com>, Matt Ochs <mochs@...dia.com>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 1/1] vfio/nvgrace-gpu: Convey kvm that the device is wc
 safe

>> > +   /*
>> > +    * The VM_ALLOW_ANY_UNCACHED VMA flag is implemented for ARM64,
>> > +    * allowing KVM stage 2 device mapping attributes to use Normal-NC
>> > +    * rather than DEVICE_nGnRE, which allows guest mappings
>> > +    * supporting write-combining attributes (WC). This also
>> > +    * unlocks memory-like operations such as unaligned accesses
>> > +    * This setting suits the fake BARs as they are expected to
>> > +    * demonstrate such properties within the guest.
>> > +    *
>> > +    * ARM does not architecturally guarantee this is safe, and indeed
>> > +    * some MMIO regions like the GICv2 VCPU interface can trigger
>> > +    * uncontained faults if Normal-NC is used. The nvgrace-gpu
>> > +    * however is safe in that the platform guarantees that no
>> > +    * action taken on the MMIO mapping can trigger an uncontained
>> > +    * failure. Hence VM_ALLOW_ANY_UNCACHED is set in the VMA flags.
>> > +    */
>> > +   vm_flags_set(vma, VM_ALLOW_ANY_UNCACHED);
>> > +
>> >     return 0;
>> >  }
>> >
>>
>> The commit log sort of covers it, but this comment doesn't seem to
>> cover why we're setting an uncached attribute to the usemem region
>> which we're specifically mapping as coherent... did we end up giving
>> this flag a really poor name if it's being used here to allow unaligned
>> access?  Thanks,
>
> Also, this is setting the vma flag *after* the call to
> remap_pfn_range(), which seems quite sketchy.  Thanks,

I will move it to the block that Jason pointed.

> Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ