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]
Message-ID: <CAMZfGtVBqVwHpoaotp+HF8+Sh-U3onKBBbQY69UT9SrGGOKVtQ@mail.gmail.com>
Date:   Tue, 22 Mar 2022 16:46:59 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Dan Williams <dan.j.williams@...el.com>,
        Matthew Wilcox <willy@...radead.org>, Jan Kara <jack@...e.cz>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Alistair Popple <apopple@...dia.com>,
        Yang Shi <shy828301@...il.com>,
        Ralph Campbell <rcampbell@...dia.com>,
        Hugh Dickins <hughd@...gle.com>,
        Xiyu Yang <xiyuyang19@...an.edu.cn>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Ross Zwisler <zwisler@...nel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Linux NVDIMM <nvdimm@...ts.linux.dev>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        Xiongchun duan <duanxiongchun@...edance.com>,
        Muchun Song <smuchun@...il.com>
Subject: Re: [PATCH v5 5/6] dax: fix missing writeprotect the pte entry

On Tue, Mar 22, 2022 at 4:37 PM Christoph Hellwig <hch@...radead.org> wrote:
>
> > +static void dax_entry_mkclean(struct address_space *mapping, unsigned long pfn,
> > +                           unsigned long npfn, pgoff_t start)
> >  {
> >       struct vm_area_struct *vma;
> > +     pgoff_t end = start + npfn - 1;
> >
> >       i_mmap_lock_read(mapping);
> > +     vma_interval_tree_foreach(vma, &mapping->i_mmap, start, end) {
> > +             pfn_mkclean_range(pfn, npfn, start, vma);
> >               cond_resched();
> >       }
> >       i_mmap_unlock_read(mapping);
>
>
> Is there any point in even keeping this helper vs just open coding it
> in the only caller below?

Good point. I'll fold dax_entry_mkclean() into the caller.

>
> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@....de>

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ