Re: WARNING: can't dereference registers at ffffc90004dfff60 for ip error_entry+0x7d/0xd0 (Re: [PATCH v2 00/18] Entry stack switching)

From: Andy Lutomirski
Date: Wed Nov 22 2017 - 11:35:46 EST


On Wed, Nov 22, 2017 at 7:56 AM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
> * Andy Lutomirski <luto@xxxxxxxxxx> wrote:
>
>> > .Lerror_entry_from_usermode_after_swapgs:
>> > /* Put us onto the real thread stack. */
>> > - leaq 8(%rsp), %rdi /* pt_regs pointer */
>> > - movq (%rsp), %r12
>> > + popq %r12 /* function return address */
>> > + leaq (%rsp), %rdi /* pt_regs pointer */
>> > call sync_regs
>> > movq %rax, %rsp /* switch stack */
>> > ENCODE_FRAME_POINTER
>>
>> Ah, I see -- SAVE_C_REGS contains an UNWIND_HINT_REGS hint. I had
>> thought I needed to fix it differently.
>>
>> Ingo, if you want to apply this, I attached it. I'll fold it in next
>> time I resend the whole series.
>
> Ok.
>
> Also please fold back the minor fixes below - spelling fix plus ugly line breaks
> elimination.

Done.