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] [day] [month] [year] [list]
Date:   Mon, 12 Dec 2022 19:41:32 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     Miaohe Lin <linmiaohe@...wei.com>
CC:     <tony.luck@...el.com>, <linux-kernel@...r.kernel.org>,
        HORIGUCHI NAOYA <naoya.horiguchi@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux-MM <linux-mm@...ck.org>
Subject: Re: [PATCH -next v2] mm: hwposion: support recovery from
 ksm_might_need_to_copy()


On 2022/12/12 10:36, Miaohe Lin wrote:
> On 2022/12/9 15:28, Kefeng Wang wrote:
>> When the kernel copy a page from ksm_might_need_to_copy(), but runs
>> into an uncorrectable error, it will crash since poisoned page is
>> consumed by kernel, this is similar to Copy-on-write poison recovery,
>> When an error is detected during the page copy, return VM_FAULT_HWPOISON,
>> which help us to avoid system crash. Note, memory failure on a KSM
>> page will be skipped, but still call memory_failure_queue() to be
>> consistent with general memory failure process.
...
>   
> diff --git a/mm/swapfile.c b/mm/swapfile.c
> index 908a529bca12..d479811bc311 100644
> --- a/mm/swapfile.c
> +++ b/mm/swapfile.c
> @@ -1767,7 +1767,7 @@ static int unuse_pte(struct vm_area_struct *vma, pmd_t *pmd,
>   
>   	swapcache = page;
>   	page = ksm_might_need_to_copy(page, vma, addr);
> -	if (unlikely(!page))
> +	if (IS_ERR_OR_NULL(page))
> IMHO, it might be better to install a hwpoison entry here. Or later swapoff ops will trigger
> the uncorrectable error again?
Thanks for you suggestion, will do in v3.
> Thanks,
> Miaohe Lin
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ