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: <20220830071514.GA1106752@hori.linux.bs1.fc.nec.co.jp>
Date:   Tue, 30 Aug 2022 07:15:16 +0000
From:   HORIGUCHI NAOYA(堀口 直也) 
        <naoya.horiguchi@....com>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
CC:     Miaohe Lin <linmiaohe@...wei.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] mm: memory-failure: kill __soft_offline_page()

On Fri, Aug 19, 2022 at 11:34:02AM +0800, Kefeng Wang wrote:
> Squash the __soft_offline_page() into soft_offline_in_use_page() and
> kill __soft_offline_page().
> 
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> ---
>  mm/memory-failure.c | 24 +++++++++---------------
>  1 file changed, 9 insertions(+), 15 deletions(-)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 1a7d6548ccb2..5b368124956d 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -2432,11 +2432,11 @@ static bool isolate_page(struct page *page, struct list_head *pagelist)
>  }
>  
>  /*
> - * __soft_offline_page handles hugetlb-pages and non-hugetlb pages.
> + * soft_offline_in_use_page handles hugetlb-pages and non-hugetlb pages.
>   * If the page is a non-dirty unmapped page-cache page, it simply invalidates.
>   * If the page is mapped, it migrates the contents over.
>   */
> -static int __soft_offline_page(struct page *page)
> +static int soft_offline_in_use_page(struct page *page)
>  {
>  	long ret = 0;
>  	unsigned long pfn = page_to_pfn(page);
> @@ -2449,6 +2449,13 @@ static int __soft_offline_page(struct page *page)
>  		.gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL,
>  	};
>  
> +	if (!huge && PageTransHuge(hpage)) {
> +		if (try_to_split_thp_page(page)) {
> +			pr_info("soft offline: %#lx: thp split failed\n", pfn);
> +			return -EBUSY;
> +		}

I've found that this change causes a regression. After the thp is
successfully split here, hpage no longer points to a proper page.
So hpage should be updated to point to the raw error page.

+		hpage = page;

Could you update the patch?

Thanks,
Naoya Horiguchi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ