lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 14 Dec 2016 11:24:19 -0800
From:   hpa@...or.com
To:     linux-tip-commits@...r.kernel.org,
        tip-bot for Josh Poimboeuf <tipbot@...or.com>
CC:     linux-kernel@...r.kernel.org, bp@...en8.de, tglx@...utronix.de,
        torvalds@...ux-foundation.org, peterz@...radead.org,
        luto@...nel.org, jpoimboe@...hat.com, mingo@...nel.org,
        brgerst@...il.com, dvlasenk@...hat.com
Subject: Re: [tip:x86/urgent] x86/boot/64: Use 'push' instead of 'call' in start_cpu()

On December 14, 2016 12:36:58 AM PST, tip-bot for Josh Poimboeuf <tipbot@...or.com> wrote:
>Commit-ID:  ec2d86a9b646d93f1948569f368e2c6f5449e6c7
>Gitweb:    
>http://git.kernel.org/tip/ec2d86a9b646d93f1948569f368e2c6f5449e6c7
>Author:     Josh Poimboeuf <jpoimboe@...hat.com>
>AuthorDate: Tue, 13 Dec 2016 21:25:35 -0600
>Committer:  Ingo Molnar <mingo@...nel.org>
>CommitDate: Wed, 14 Dec 2016 08:48:05 +0100
>
>x86/boot/64: Use 'push' instead of 'call' in start_cpu()
>
>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 uses a call
>instruction to do that, which is rather obtuse.  Use a straightforward
>push instead.
>
>Suggested-by: Borislav Petkov <bp@...en8.de>
>Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
>Cc: Andy Lutomirski <luto@...nel.org>
>Cc: Brian Gerst <brgerst@...il.com>
>Cc: Denys Vlasenko <dvlasenk@...hat.com>
>Cc: H. Peter Anvin <hpa@...or.com>
>Cc: Linus Torvalds <torvalds@...ux-foundation.org>
>Cc: Peter Zijlstra <peterz@...radead.org>
>Cc: Thomas Gleixner <tglx@...utronix.de>
>Link:
>http://lkml.kernel.org/r/4d8a1952759721d42d1e62ba9e4a7e3ac5df8574.1481685203.git.jpoimboe@redhat.com
>Signed-off-by: Ingo Molnar <mingo@...nel.org>
>---
> arch/x86/kernel/head_64.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
>index 90de288..1facaf4 100644
>--- a/arch/x86/kernel/head_64.S
>+++ b/arch/x86/kernel/head_64.S
>@@ -298,7 +298,7 @@ ENTRY(start_cpu)
> 	 *	REX.W + FF /5 JMP m16:64 Jump far, absolute indirect,
> 	 *		address given in m16:64.
> 	 */
>-	call	1f		# put return address on stack for unwinder
>+	pushq	$1f		# put return address on stack for unwinder
> 1:	xorq	%rbp, %rbp	# clear frame pointer
> 	movq	initial_code(%rip), %rax
> 	pushq	$__KERNEL_CS	# set correct cs

This adds another relocation to the kernel.  I hope this is safe at this point in the code?
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ