Re: [PATCH v3 1/2] mm, hwpoison: Try to recover from copy-on write faults

2022-11-02 Thread Alexander Potapenko
On Wed, Nov 2, 2022 at 3:27 PM Alexander Potapenko wrote: > > On Fri, Oct 28, 2022 at 6:14 PM Luck, Tony wrote: > > > > >> +vfrom = kmap_local_page(from); > > >> +vto = kmap_local_page(to); > > >> +ret = copy_mc_to_kernel(vto, vfrom, PAGE_SIZE); > > > > > > In copy_user_highpage(), km

Re: [PATCH v3 1/2] mm, hwpoison: Try to recover from copy-on write faults

2022-11-02 Thread Alexander Potapenko
On Fri, Oct 28, 2022 at 6:14 PM Luck, Tony wrote: > > >> +vfrom = kmap_local_page(from); > >> +vto = kmap_local_page(to); > >> +ret = copy_mc_to_kernel(vto, vfrom, PAGE_SIZE); > > > > In copy_user_highpage(), kmsan_unpoison_memory(page_address(to), PAGE_SIZE) > > is done after the cop

RE: [PATCH v3 1/2] mm, hwpoison: Try to recover from copy-on write faults

2022-10-28 Thread Luck, Tony
>> +vfrom = kmap_local_page(from); >> +vto = kmap_local_page(to); >> +ret = copy_mc_to_kernel(vto, vfrom, PAGE_SIZE); > > In copy_user_highpage(), kmsan_unpoison_memory(page_address(to), PAGE_SIZE) > is done after the copy when > __HAVE_ARCH_COPY_USER_HIGHPAGE isn't defined. Do we need

Re: [PATCH v3 1/2] mm, hwpoison: Try to recover from copy-on write faults

2022-10-27 Thread Miaohe Lin
On 2022/10/22 4:01, Tony Luck wrote: > If the kernel is copying a page as the result of a copy-on-write > fault and runs into an uncorrectable error, Linux will crash because > it does not have recovery code for this case where poison is consumed > by the kernel. > > It is easy to set up a test ca

Re: [PATCH v3 1/2] mm, hwpoison: Try to recover from copy-on write faults

2022-10-25 Thread 堀口 直也
On Fri, Oct 21, 2022 at 01:01:19PM -0700, Tony Luck wrote: > If the kernel is copying a page as the result of a copy-on-write > fault and runs into an uncorrectable error, Linux will crash because > it does not have recovery code for this case where poison is consumed > by the kernel. > > It is ea

[PATCH v3 1/2] mm, hwpoison: Try to recover from copy-on write faults

2022-10-21 Thread Tony Luck
If the kernel is copying a page as the result of a copy-on-write fault and runs into an uncorrectable error, Linux will crash because it does not have recovery code for this case where poison is consumed by the kernel. It is easy to set up a test case. Just inject an error into a private page, for