Re: WARNING: Kernel stack regs has bad 'bp' value

From: Logan Gunthorpe
Date: Fri Sep 11 2020 - 12:15:15 EST

On 2020-09-11 10:00 a.m., Josh Poimboeuf wrote:
> Hi Logan,
> Thanks for the bug report. (Sorry I missed the first one, Naresh.)
> The problem is that ret_from_fork() is no longer in .entry.text, so the
> following check in the FP unwinder doesn't work when ret_from_fork()
> gets interrupted.
> /*
> * Don't warn if the unwinder got lost due to an interrupt in entry
> * code or in the C handler before the first frame pointer got set up:
> */
> if (state->got_irq && in_entry_code(state->ip))
> goto the_end;
> If you have the ability to recreate, can you try the following patch?

Sorry, but I can not reliably hit this bug. I hit it randomly twice last
week however, despite doing a bunch more runs this week, I haven't hit
it again.

I can add the patch to my testing next week but I ca not give you a
definitive answer on whether this fixes the bug.

Perhaps Naresh's test is a better reproducer.