Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1541761
| From | tip-bot for Josh Poimboeuf <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:x86/urgent] x86/boot/64: Push correct start_cpu() return address |
| Date | 2016-12-14 09:40 +0100 |
| Message-ID | <sOdgu-4cB-13@gated-at.bofh.it> (permalink) |
| References | <sO8qu-1gQ-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 31dcfec11f827e9a5d8720fe4728f1305894884f Gitweb: http://git.kernel.org/tip/31dcfec11f827e9a5d8720fe4728f1305894884f Author: Josh Poimboeuf <jpoimboe@redhat.com> AuthorDate: Tue, 13 Dec 2016 21:25:36 -0600 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Wed, 14 Dec 2016 08:48:05 +0100 x86/boot/64: Push correct start_cpu() return address start_cpu() pushes a text address on the stack so that stack traces from idle tasks will show start_cpu() at the end. But it currently shows the wrong function offset. It's more correct to show the address immediately after the 'lretq' instruction. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/2cadd9f16c77da7ee7957bfc5e1c67928c23ca48.1481685203.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org> --- arch/x86/kernel/head_64.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 1facaf4..b467b14 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -298,12 +298,13 @@ ENTRY(start_cpu) * REX.W + FF /5 JMP m16:64 Jump far, absolute indirect, * address given in m16:64. */ - pushq $1f # put return address on stack for unwinder -1: xorq %rbp, %rbp # clear frame pointer + pushq $.Lafter_lret # 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 +.Lafter_lret: ENDPROC(start_cpu) #include "verify_cpu.S"
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/2] x86/boot/64: push correct start_cpu() return address Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-14 04:30 +0100 [tip:x86/urgent] x86/boot/64: Push correct start_cpu() return address tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2016-12-14 09:40 +0100
csiph-web