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:   Tue, 4 Apr 2023 18:36:05 +0800
From:   xialonglong <xialonglong1@...wei.com>
To:     HORIGUCHI NAOYA(堀口 直也) 
        <naoya.horiguchi@....com>
CC:     "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "linmiaohe@...wei.com" <linmiaohe@...wei.com>,
        "wangkefeng.wang@...wei.com" <wangkefeng.wang@...wei.com>,
        "sunnanyong@...wei.com" <sunnanyong@...wei.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 1/2] mm: memory-failure: Refactor add_to_kill()

Thank you for your response. I will modify the name of this parameter to 
"ksm_addr" in the next version.

Best regards,
Longlong Xia

在 2023/3/31 13:41, HORIGUCHI NAOYA(堀口 直也) 写道:
> On Thu, Mar 30, 2023 at 03:45:00PM +0800, Longlong Xia wrote:
>> The page_address_in_vma() is used to find the user virtual address of page
>> in add_to_kill(), but it doesn't support ksm due to the ksm page->index
>> unusable, add an addr as parameter to add_to_kill(), let's the caller to
>> pass it, also rename the function to __add_to_kill(), and adding
>> add_to_kill_anon_file() for handling anonymous pages and file pages,
>> adding add_to_kill_fsdax() for handling fsdax pages.
>>
>> Signed-off-by: Longlong Xia <xialonglong1@...wei.com>
>> ---
>>   mm/memory-failure.c | 29 +++++++++++++++++++++--------
>>   1 file changed, 21 insertions(+), 8 deletions(-)
>>
>> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
>> index a1ede7bdce95e..9ca058f659121 100644
>> --- a/mm/memory-failure.c
>> +++ b/mm/memory-failure.c
>> @@ -405,9 +405,9 @@ static unsigned long dev_pagemap_mapping_shift(struct vm_area_struct *vma,
>>    * page->mapping are sufficient for mapping the page back to its
>>    * corresponding user virtual address.
>>    */
>> -static void add_to_kill(struct task_struct *tsk, struct page *p,
>> -			pgoff_t fsdax_pgoff, struct vm_area_struct *vma,
>> -			struct list_head *to_kill)
>> +static void __add_to_kill(struct task_struct *tsk, struct page *p,
>> +			  struct vm_area_struct *vma, struct list_head *to_kill,
>> +			  unsigned long addr, pgoff_t fsdax_pgoff)
> 
> Hi, Longlong,
> 
> The new argument addr seems to be used only from add_to_kill_ksm(),
> so you can name the argument as such (like ksm_addr), as we do
> for fsdax_pgoff (which is clear to be used only for fsdax)?
> 
> Thanks,
> Naoya Horiguchi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ