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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53A9556D.3000003@arm.com>
Date:	Tue, 24 Jun 2014 11:39:41 +0100
From:	Marc Zyngier <marc.zyngier@....com>
To:	Will Deacon <will.deacon@....com>,
	Kim Phillips <kim.phillips@...escale.com>
CC:	Christoffer Dall <christoffer.dall@...aro.org>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	Eric Auger <eric.auger@...aro.org>,
	Kim Phillips <kim.phillips@...aro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Alex Williamson <alex.williamson@...hat.com>,
	Antonios Motakis <a.motakis@...tualopensystems.com>,
	"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 2/2] ARM: KVM: user_mem_abort: support stage 2 MMIO page
 mapping

On 24/06/14 11:23, Will Deacon wrote:
> On Wed, May 07, 2014 at 03:55:57PM +0100, Christoffer Dall wrote:
>> On Wed, May 07, 2014 at 10:00:21AM +0100, Marc Zyngier wrote:
>>> On Tue, May 06 2014 at  7:04:48 pm BST, Christoffer Dall <christoffer.dall@...aro.org> wrote:
>>>> On Tue, Mar 25, 2014 at 05:08:14PM -0500, Kim Phillips wrote:
>>>>> Use the correct memory type for device MMIO mappings: PAGE_S2_DEVICE.
>>>>>
>>>>> Signed-off-by: Kim Phillips <kim.phillips@...aro.org>
>>>>> ---
>>>>>  arch/arm/kvm/mmu.c | 11 ++++++++---
>>>>>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> [...]
> 
>>>> I think this looks reasonable.
>>>>
>>>> Acked-by: Christoffer Dall <christoffer.dall@...aro.org>
>>>
>>> I feel like I'm missing some context here, and the commit message is way
>>> too terse for me to make sense of it.
>>>
>>> So far, we can only get into user_mem_abort on a Stage-2 fault
>>> (translation or permission) for memory. How can we suddenly get here for
>>> a *device* fault? Do we get a special kind of memslot?
>>>
>>> I'm not saying the patch does anything wrong, but I'd like to understand
>>> the rationale behind it. On its own, it doesn't make much sense.
>>>
>> Think device passthrough.  There's nothing preventing user space from
>> setting up a memory region to point to device memory (through VFIO or
>> /dev/mem).  If that's done, we should enforce device memory properties
>> so writes don't linger around in the cache to be written some time later
>> when that device memory potentially doesn't belong to the VM anymore.
>>
>> This is just one tiny piece of all of them to make device passthrough
>> work, and we could hold off with this patch until we have something more
>> complete.  On the other hand, we need to start somewhere, and this is
>> hardly intrusive and is functionally correct even though you don't have
>> a full device passthrough setup.
> 
> Please can you queue this patch up? I need it for my VFIO work, where I'm
> registering the PCI BARs using KVM_SET_USER_MEMORY_REGION.
> 
> Without this, I'd have to trap all accesses and do pread/pwrite from
> kvmtool instead of mmaping the regions straight through.

I'm afraid there as been quite a bit of churn in this department, and
the patch doesn't apply any more.

Kim, any chance you could respin this patch on top of mainline?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ