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]
Message-ID: <tip-dcf6fdbaa99fc3a3e38797e6d596c5241de18b9b@git.kernel.org>
Date:	Tue, 23 Feb 2016 01:04:15 -0800
From:	tip-bot for Josh Poimboeuf <tipbot@...or.com>@zytor.com
To:	linux-tip-commits@...r.kernel.org@...or.com
Cc:	tglx@...utronix.de, namhyung@...il.com, pbonzini@...hat.com,
	linux-kernel@...r.kernel.org, gleb@...nel.org, jpoimboe@...hat.com,
	brgerst@...il.com, hpa@...or.com, mmarek@...e.cz,
	peterz@...radead.org, bernd@...rovitsch.priv.at, jslaby@...e.cz,
	mingo@...nel.org, luto@...nel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, acme@...nel.org, palves@...hat.com,
	chris.j.arges@...onical.com, luto@...capital.net, bp@...en8.de,
	dvlasenk@...hat.com
Subject: [tip:x86/debug] x86/kvm: Make test_cc() always inline

Commit-ID:  dcf6fdbaa99fc3a3e38797e6d596c5241de18b9b
Gitweb:     http://git.kernel.org/tip/dcf6fdbaa99fc3a3e38797e6d596c5241de18b9b
Author:     Josh Poimboeuf <jpoimboe@...hat.com>
AuthorDate: Fri, 22 Jan 2016 10:16:12 -0600
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 23 Feb 2016 09:04:00 +0100

x86/kvm: Make test_cc() always inline

With some configs (including allyesconfig), gcc doesn't inline
test_cc().  When that happens, test_cc() doesn't create a stack frame
before inserting the inline asm call instruction.  This breaks frame
pointer convention if CONFIG_FRAME_POINTER is enabled and can result in
a bad stack trace.

Force it to always be inlined so that its containing function's stack
frame can be used.

Suggested-by: Paolo Bonzini <pbonzini@...hat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
Acked-by: Paolo Bonzini <pbonzini@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Bernd Petrovitsch <bernd@...rovitsch.priv.at>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Chris J Arges <chris.j.arges@...onical.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Gleb Natapov <gleb@...nel.org>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Jiri Slaby <jslaby@...e.cz>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Michal Marek <mmarek@...e.cz>
Cc: Namhyung Kim <namhyung@...il.com>
Cc: Pedro Alves <palves@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: kvm@...r.kernel.org
Cc: live-patching@...r.kernel.org
Link: http://lkml.kernel.org/r/20160122161612.GE20502@treble.redhat.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/kvm/emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index aa4d726..80363eb 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -969,7 +969,7 @@ static int em_bsr_c(struct x86_emulate_ctxt *ctxt)
 	return fastop(ctxt, em_bsr);
 }
 
-static u8 test_cc(unsigned int condition, unsigned long flags)
+static __always_inline u8 test_cc(unsigned int condition, unsigned long flags)
 {
 	u8 rc;
 	void (*fop)(void) = (void *)em_setcc + 4 * (condition & 0xf);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ