Re: WARNING: kernel stack frame pointer at ffffffff82e03f40 in swapper:0 has bad value (null)
From: Borislav Petkov
Date: Mon Dec 12 2016 - 17:34:09 EST
On Mon, Dec 12, 2016 at 04:11:47PM -0600, Josh Poimboeuf wrote:
> Yes, please.
Attached.
> That said, the code could probably be made a little clearer by changing
> "call 1f" to "push $1f" and then move the '1' label to after the lretq
> instruction, like:
>
> pushq $1f # put return address on stack for unwinder
> xorq %rbp, %rbp # clear frame pointer
> movq initial_code(%rip), %rax
> pushq $__KERNEL_CS # set correct cs
> pushq %rax # target address in negative space
> lretq
> 1:
> ENDPROC(start_cpu)
>
> That shows:
>
> start_cpu+0x14/0x14
>
> Which is more accurate anyway. I'll make a patch.
Yap, makes more sense. I'll run it tomorrow.
FWIW, I tried
pushq $1f
before without moving the 1: label but the thing still fired.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Attachment:
config.gz
Description: application/gzip