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: <ZCXOv9rz8GCrpbMk@casper.infradead.org>
Date:   Thu, 30 Mar 2023 19:02:39 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Sidhartha Kumar <sidhartha.kumar@...cle.com>
Cc:     Peng Zhang <zhangpeng362@...wei.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
        mike.kravetz@...cle.com, vishal.moola@...il.com,
        muchun.song@...ux.dev, wangkefeng.wang@...wei.com,
        sunnanyong@...wei.com
Subject: Re: [PATCH v4 1/6] userfaultfd: convert mfill_atomic_pte_copy() to
 use a folio

On Thu, Mar 30, 2023 at 10:02:52AM -0700, Sidhartha Kumar wrote:
> On 3/30/23 6:40 AM, Peng Zhang wrote:
> > From: ZhangPeng <zhangpeng362@...wei.com>
> > 
> > Call vma_alloc_folio() directly instead of alloc_page_vma(). Add an
> > assertion that this is a single-page folio and removes several calls to
> > compound_head().

There's no added assertion in this patch any more, so I'd drop that
part of the description.

> >   	if (!*pagep) {
> >   		ret = -ENOMEM;
> > -		page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, dst_vma, dst_addr);
> > -		if (!page)
> > +		folio = vma_alloc_folio(GFP_HIGHUSER_MOVABLE, 0, dst_vma, dst_addr, false);
> > +		if (!folio)
> >   			goto out;
> > -		page_kaddr = kmap_local_page(page);
> > +		page_kaddr = kmap_local_folio(folio, 0);
> 
> Should this variable name be kept as page_kaddr or should it be changed to
> something like folio_kaddr? kmap_local_folio() returns page_address(), so
> maybe page_kaddr is better.

I'd just call it 'kaddr'.  Or 'addr'.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ