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-next>] [day] [month] [year] [list]
Date:   Wed, 23 Dec 2020 14:32:07 +0800
From:   Yongji Xie <xieyongji@...edance.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Stefan Hajnoczi <stefanha@...hat.com>, sgarzare@...hat.com,
        Parav Pandit <parav@...dia.com>, akpm@...ux-foundation.org,
        Randy Dunlap <rdunlap@...radead.org>,
        Matthew Wilcox <willy@...radead.org>, viro@...iv.linux.org.uk,
        axboe@...nel.dk, bcrl@...ck.org, corbet@....net,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
        kvm@...r.kernel.org, linux-aio@...ck.org,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC v2 01/13] mm: export zap_page_range() for driver use

On Tue, Dec 22, 2020 at 11:44 PM Christoph Hellwig <hch@...radead.org> wrote:
>
> On Tue, Dec 22, 2020 at 10:52:09PM +0800, Xie Yongji wrote:
> > Export zap_page_range() for use in VDUSE.
>
> Err, no.  This has absolutely no business being used by drivers.

Now I want to map/unmap some pages in an userland vma dynamically. The
vm_insert_page() is being used for mapping. In the unmapping case, it
looks like the zap_page_range() does what I want. So I export it.
Otherwise, we need some ways to notify userspace to trigger it with
madvise(MADV_DONTNEED), which might not be able to meet all our needs.
For example, unmapping some pages in a memory shrinker function.

So I'd like to know what's the limitation to use zap_page_range() in a
module. And if we can't use it in a module, is there any acceptable
way to achieve that?

Thanks.
Yongji

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ