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: <20220506085532.GA1356094@u2004>
Date:   Fri, 6 May 2022 17:55:32 +0900
From:   Naoya Horiguchi <naoya.horiguchi@...ux.dev>
To:     zhenwei pi <pizhenwei@...edance.com>
Cc:     akpm@...ux-foundation.org, naoya.horiguchi@....com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Wu Fengguang <fengguang.wu@...el.com>
Subject: Re: [PATCH 1/4] mm/memory-failure.c: move clear_hwpoisoned_pages

On Fri, Apr 29, 2022 at 10:22:03PM +0800, zhenwei pi wrote:
> clear_hwpoisoned_pages() clears HWPoison flag and decreases the number
> of poisoned pages, this actually works as part of memory failure.
> 
> Move this function from sparse.c to memory-failure.c, finally there
> is no CONFIG_MEMORY_FAILURE in sparse.c.
> 
> Cc: Wu Fengguang <fengguang.wu@...el.com>
> Signed-off-by: zhenwei pi <pizhenwei@...edance.com>
> ---
>  mm/internal.h       | 11 +++++++++++
>  mm/memory-failure.c | 21 +++++++++++++++++++++
>  mm/sparse.c         | 27 ---------------------------
>  3 files changed, 32 insertions(+), 27 deletions(-)
> 
> diff --git a/mm/internal.h b/mm/internal.h
> index cf16280ce132..e8add8df4e0f 100644
> --- a/mm/internal.h
> +++ b/mm/internal.h
> @@ -758,4 +758,15 @@ struct folio *try_grab_folio(struct page *page, int refs, unsigned int flags);
>  
>  DECLARE_PER_CPU(struct per_cpu_nodestat, boot_nodestats);
>  
> +/*
> + * mm/memory-failure.c
> + */
> +#ifdef CONFIG_MEMORY_FAILURE
> +void clear_hwpoisoned_pages(struct page *memmap, int nr_pages);
> +#else
> +static inline void clear_hwpoisoned_pages(struct page *memmap, int nr_pages)
> +{
> +}
> +#endif

This code may be put near the definitions of hwpoison_filter* in mm/internal.h
because they are also called from mm/memory-failure.

Otherwise, looks good to me.

Acked-by: Naoya Horiguchi <naoya.horiguchi@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ