Re: [x86/entry_32] aa93e2ad74: BUG:soft_lockup-CPU##stuck_for#s![systemd-logind:#]

From: Sean Christopherson
Date: Wed Jan 12 2022 - 11:15:14 EST


On Wed, Jan 12, 2022, Peter Zijlstra wrote:
> On Wed, Jan 12, 2022 at 01:28:58AM +0000, Sean Christopherson wrote:
> > The issue is that PARANOID_EXIT_TO_KERNEL_MODE in the handle_exception_return
> > path overwrites the entry stack data with the task stack data, restoring the "bad"
> > segment value.
>
> Oh gawd... that's terrible, and yes, that now makes perfect sense.
>
> However did you find that?

printf and running under QEMU, which has a interactive "monitor" that lets you
read/write guest memory and can also do VA=>PA translations. Code inspection
once I realized the value on the stack was being restored between the exception
fixup and the POP.