Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48215 )
Change subject: cpu/x86/smm/smm_stub: Fix stack canary on x86_64 ......................................................................
cpu/x86/smm/smm_stub: Fix stack canary on x86_64
On x86_64 the cannary is 8 bytes in size, so write the additional 4 bytes to make SMM handler happy.
Tested on Intel Skylake in long mode. No longer dies in SMM.
Change-Id: Id805c65717ec22f413803c21928d070602522b2c Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/cpu/x86/smm/smm_stub.S 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/48215/1
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S index 56e2504..45f634d 100644 --- a/src/cpu/x86/smm/smm_stub.S +++ b/src/cpu/x86/smm/smm_stub.S @@ -144,6 +144,9 @@ movl stack_size, %eax subl %eax, %ebx /* %ebx(stack_top) - size = %ebx(stack_bottom) */ movl %ebx, (%ebx) +#if ENV_X86_64 + movl $0, 4(%ebx) +#endif
/* Create stack frame by pushing a NULL stack base pointer */ pushl $0x0
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48215 )
Change subject: cpu/x86/smm/smm_stub: Fix stack canary on x86_64 ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/48215/1/src/cpu/x86/smm/smm_stub.S File src/cpu/x86/smm/smm_stub.S:
https://review.coreboot.org/c/coreboot/+/48215/1/src/cpu/x86/smm/smm_stub.S@... PS1, Line 146: movl %ebx, (%ebx) : #if ENV_X86_64 : movl $0, 4(%ebx) : #endif maybe movq $rbx, (%rbx) is clearer?
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48215 )
Change subject: cpu/x86/smm/smm_stub: Fix stack canary on x86_64 ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48215/1/src/cpu/x86/smm/smm_stub.S File src/cpu/x86/smm/smm_stub.S:
https://review.coreboot.org/c/coreboot/+/48215/1/src/cpu/x86/smm/smm_stub.S@... PS1, Line 146: movl %ebx, (%ebx) : #if ENV_X86_64 : movl $0, 4(%ebx) : #endif
maybe movq $rbx, (%rbx) is clearer?
That can't be used as this code is still in protected mode.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48215 )
Change subject: cpu/x86/smm/smm_stub: Fix stack canary on x86_64 ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48215/1/src/cpu/x86/smm/smm_stub.S File src/cpu/x86/smm/smm_stub.S:
https://review.coreboot.org/c/coreboot/+/48215/1/src/cpu/x86/smm/smm_stub.S@... PS1, Line 146: movl %ebx, (%ebx) : #if ENV_X86_64 : movl $0, 4(%ebx) : #endif
That can't be used as this code is still in protected mode.
Ack
Hello build bot (Jenkins), Arthur Heymans,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48215
to look at the new patch set (#2).
Change subject: cpu/x86/smm/smm_stub: Fix stack canary on x86_64 ......................................................................
cpu/x86/smm/smm_stub: Fix stack canary on x86_64
On x86_64 the cannary is 8 bytes in size, so write the additional 4 bytes to make SMM handler happy.
Tested on Intel Skylake in long mode. No longer dies in SMM.
Change-Id: Id805c65717ec22f413803c21928d070602522b2c Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/cpu/x86/smm/smm_stub.S 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/48215/2
Patrick Rudolph has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48215 )
Change subject: cpu/x86/smm/smm_stub: Fix stack canary on x86_64 ......................................................................
cpu/x86/smm/smm_stub: Fix stack canary on x86_64
On x86_64 the cannary is 8 bytes in size, so write the additional 4 bytes to make SMM handler happy.
Tested on Intel Skylake in long mode. No longer dies in SMM.
Change-Id: Id805c65717ec22f413803c21928d070602522b2c Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/48215 Reviewed-by: Arthur Heymans arthur@aheymans.xyz Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/cpu/x86/smm/smm_stub.S 1 file changed, 3 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S index 56e2504..45f634d 100644 --- a/src/cpu/x86/smm/smm_stub.S +++ b/src/cpu/x86/smm/smm_stub.S @@ -144,6 +144,9 @@ movl stack_size, %eax subl %eax, %ebx /* %ebx(stack_top) - size = %ebx(stack_bottom) */ movl %ebx, (%ebx) +#if ENV_X86_64 + movl $0, 4(%ebx) +#endif
/* Create stack frame by pushing a NULL stack base pointer */ pushl $0x0