Thread (50 messages) 50 messages, 5 authors, 2021-02-02

Re: [PATCH v3] x86/mce: Avoid infinite loop for copy from user recovery

From: Borislav Petkov <bp@alien8.de>
Date: 2021-01-18 15:47:59
Also in: linux-mm, lkml

On Fri, Jan 15, 2021 at 11:34:35AM -0800, Luck, Tony wrote:
In the user mode case we should only bump mce_count to "1" and
before task_work() gets called.
Ok, right, it should not be possible to trigger a second MCE while
queue_task_work() runs when it is a user MCE. The handler itself won't
touch the page with the hw error so our assumption is that it'll get
poisoned.

If it doesn't, I guess the memory failure code will kill the process
yadda yadda...
It shouldn't hurt to do the same checks. Maybe it will catch something
weird - like an NMI handler on return from the machine check doing a
get_user() that hits another machine check during the return from this
machine check.
Eww.
AndyL has made me extra paranoid. :-)
Yeah, he comes up with the nuttiest scenarios. :-)

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help