Re: [PATCH] x86/fault: Send SIGBUS to user process always for hwpoison page access.

2021-01-31 Thread Aili Yao
On Fri, 29 Jan 2021 14:55:29 -0800 "Luck, Tony" wrote: > Thanks for the explanation and test code. I think I see better what > is going on here. > > [I took your idea for using madvise(...MADV_HWPOISON) and added a new "-S" > option to my einj_mem_uc test program to use madvise instead of

Re: [PATCH] x86/fault: Send SIGBUS to user process always for hwpoison page access.

2021-01-29 Thread Luck, Tony
Thanks for the explanation and test code. I think I see better what is going on here. [I took your idea for using madvise(...MADV_HWPOISON) and added a new "-S" option to my einj_mem_uc test program to use madvise instead of ACPI/EINJ for injections. Update pushed here:

Re: [PATCH] x86/fault: Send SIGBUS to user process always for hwpoison page access.

2021-01-28 Thread Aili Yao
On Thu, 28 Jan 2021 09:43:52 -0800 "Luck, Tony" wrote: > On Thu, Jan 28, 2021 at 07:43:26PM +0800, Aili Yao wrote: > > when one page is already hwpoisoned by AO action, process may not be > > killed, the process mapping this page may make a syscall include this > > page and result to trigger a

Re: [PATCH] x86/fault: Send SIGBUS to user process always for hwpoison page access.

2021-01-28 Thread Luck, Tony
On Thu, Jan 28, 2021 at 07:43:26PM +0800, Aili Yao wrote: > when one page is already hwpoisoned by AO action, process may not be > killed, the process mapping this page may make a syscall include this > page and result to trigger a VM_FAULT_HWPOISON fault, as it's in kernel > mode it may be fixed

[PATCH] x86/fault: Send SIGBUS to user process always for hwpoison page access.

2021-01-28 Thread Aili Yao
when one page is already hwpoisoned by AO action, process may not be killed, the process mapping this page may make a syscall include this page and result to trigger a VM_FAULT_HWPOISON fault, as it's in kernel mode it may be fixed by fixup_exception, current code will just return error code to