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

2021-01-21 Thread Luck, Tony
On Wed, Jan 20, 2021 at 01:18:12PM +0100, Borislav Petkov wrote: > On Tue, Jan 19, 2021 at 03:57:59PM -0800, Luck, Tony wrote: > > But the real validation folks took my patch and found that it has > > destabilized cases 1 & 2 (and case 3 also chokes if you repeat a few > > more times). System

RE: [PATCH v4] x86/mce: Avoid infinite loop for copy from user recovery

2021-01-20 Thread Luck, Tony
> Yah, some printk sprinkling might be a good start. But debugging in that > atomic context is always nasty. ;-\ Some very light printk sprinkling (one message in queue_task_work() in atomic context, one each in kill_me_now() and kill_me_maybe() to check when task_work actually called them.

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

2021-01-20 Thread Borislav Petkov
On Tue, Jan 19, 2021 at 03:57:59PM -0800, Luck, Tony wrote: > But the real validation folks took my patch and found that it has > destabilized cases 1 & 2 (and case 3 also chokes if you repeat a few > more times). System either hangs or panics. Generally before 100 > injection/conumption cycles.

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

2021-01-19 Thread Luck, Tony
On Tue, Jan 19, 2021 at 11:56:32AM +0100, Borislav Petkov wrote: > On Fri, Jan 15, 2021 at 03:23:46PM -0800, Luck, Tony wrote: > > On Fri, Jan 15, 2021 at 12:51:03PM -0800, Luck, Tony wrote: > > > static void kill_me_now(struct callback_head *ch) > > > { > > > + p->mce_count = 0; > > >

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

2021-01-19 Thread Borislav Petkov
On Fri, Jan 15, 2021 at 03:23:46PM -0800, Luck, Tony wrote: > On Fri, Jan 15, 2021 at 12:51:03PM -0800, Luck, Tony wrote: > > static void kill_me_now(struct callback_head *ch) > > { > > + p->mce_count = 0; > > force_sig(SIGBUS); > > } > > Brown paper bag time ... I just pasted that line

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

2021-01-15 Thread Luck, Tony
On Fri, Jan 15, 2021 at 12:51:03PM -0800, Luck, Tony wrote: > static void kill_me_now(struct callback_head *ch) > { > + p->mce_count = 0; > force_sig(SIGBUS); > } Brown paper bag time ... I just pasted that line from kill_me_maybe() and I thought I did a re-compile ... but obviously