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: <4ada1fa1-4d03-50bb-dfd7-5f0d1b08cbfd@huawei.com>
Date:   Fri, 31 Mar 2023 17:38:23 +0800
From:   "zhangpeng (AS)" <zhangpeng362@...wei.com>
To:     Matthew Wilcox <willy@...radead.org>,
        Sidhartha Kumar <sidhartha.kumar@...cle.com>
CC:     <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 2023/3/31 2:02, Matthew Wilcox wrote:

> 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.

Thanks. I'll update this 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'.

Agreed. I'll change page_kaddr to kaddr.

Thanks for your review.

Best Regards,
Peng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ