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]
Date:   Tue, 13 Aug 2019 22:17:09 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Bharath Vedartham <linux.bhar@...il.com>, rkrcmar@...hat.com
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, khalid.aziz@...cle.com
Subject: Re: [Question-kvm] Can hva_to_pfn_fast be executed in interrupt
 context?

On 13/08/19 21:14, Bharath Vedartham wrote:
> Hi all,
> 
> I was looking at the function hva_to_pfn_fast(in virt/kvm/kvm_main) which is 
> executed in an atomic context(even in non-atomic context, since
> hva_to_pfn_fast is much faster than hva_to_pfn_slow).
> 
> My question is can this be executed in an interrupt context? 

No, it cannot for the reason you mention below.

Paolo

> The motivation for this question is that in an interrupt context, we cannot
> assume "current" to be the task_struct of the process of interest.
> __get_user_pages_fast assume current->mm when walking the process page
> tables. 
> 
> So if this function hva_to_pfn_fast can be executed in an
> interrupt context, it would not be safe to retrive the pfn with
> __get_user_pages_fast. 
> 
> Thoughts on this?
> 
> Thank you
> Bharath
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ