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: <7b27b9ee-2c38-356c-14bd-b21db3a96960@citrix.com>
Date:   Wed, 10 Jan 2018 09:11:17 +0000
From:   Ross Lagerwall <ross.lagerwall@...rix.com>
To:     Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        <xen-devel@...ts.xenproject.org>
CC:     Juergen Gross <jgross@...e.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] xen/gntdev: Fix partial gntdev_mmap() cleanup

On 01/10/2018 01:22 AM, Boris Ostrovsky wrote:
> 
> 
> On 01/09/2018 07:10 AM, Ross Lagerwall wrote:
>> When cleaning up after a partially successful gntdev_mmap(), unmap the
>> successfully mapped grant pages otherwise Xen will kill the domain if
>> in debug mode (Attempt to implicitly unmap a granted PTE) or Linux will
>> kill the process and emit "BUG: Bad page map in process" if Xen is in
>> release mode.
>>
>> This is only needed when use_ptemod is true because gntdev_put_map()
>> will unmap grant pages itself when use_ptemod is false.
>>
>> Signed-off-by: Ross Lagerwall <ross.lagerwall@...rix.com>
> 
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> 
> although I wonder whether it may be possible to have gntdev_put_map() 
> figure whether to unmap the pages if use_ptemod is set.

It was a while since I wrote this patch, but IIRC when use_ptemod is 
set, successfully mmapped pages are unmapped via the mmu_notifier 
release callback. So doing it in gntdev_put_map() isn't possible without 
further changes.

-- 
Ross Lagerwall

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ