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]
Date:   Fri, 10 May 2019 12:48:12 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>
Cc:     kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Christoph Hellwig <hch@...radead.org>,
        James Bottomley <James.Bottomley@...senpartnership.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Darren Hart <dvhart@...radead.org>
Subject: Re: [RFC PATCH V2] vhost: don't use kmap() to log dirty pages


On 2019/5/10 上午10:59, Jason Wang wrote:
>>>
>>>         r = get_user_pages_fast(log, 1, 1, &page);
>> OK so the trick is that page is pinned so you don't expect
>> arch_futex_atomic_op_inuser below to fail.  get_user_pages_fast
>> guarantees page is not going away but does it guarantee PTE won't be
>> invaidated or write protected?
>
>
> Good point, then I think we probably need to do manual fixup through 
> fixup_user_fault() if arch_futex_atomic_op_in_user() fail. 


This looks like a overkill, we don't need to atomic environment here 
actually. Instead, just keep pagefault enabled should work. So just 
introduce arch_futex_atomic_op_inuser_inatomic() variant with pagefault 
disabled there just for futex should be sufficient.

Thanks

Powered by blists - more mailing lists