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, 29 Apr 2020 00:33:27 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        the arch/x86 maintainers <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Kees Cook <keescook@...omium.org>
Subject: Re: Remaining randconfig objtool warnings, linux-next-20200428

On Tue, Apr 28, 2020 at 05:03:53PM -0500, Josh Poimboeuf wrote:
> On Tue, Apr 28, 2020 at 11:55:54PM +0200, Peter Zijlstra wrote:

> > binutils.git/gas/configure/tc-i386.c:i386_generate_nops
> > 
> > When there's too many NOPs (as here) it generates a JMP across the NOPS.
> > It makes some sort of sense, at some point executing NOPs is going to be
> > more expensive than a branch.. But shees..
> 
> Urgh.  Even if I tell it specifically to pad with NOPs, it still does
> this "trick".  I have no idea how to deal with this in objtool.

This is horrible... but it _might_ just work.

diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 0e9504fabe52..545f50f5de56 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -599,7 +599,18 @@ SYM_CODE_END(common_spurious)
 _ASM_NOKPROBE(common_spurious)
 
 /* common_interrupt is a hotpath. Align it */
+SYM_FUNC_START_LOCAL_NOALIGN(__ignore_me)
 	.p2align CONFIG_X86_L1_CACHE_SHIFT
+SYM_FUNC_END(__ignore_me)
+
+.pushsection .discard.func_stack_frame_non_standard
+        .align 8
+        .type   __func_stack_frame_non_standard___ignore_me, @object
+        .size   __func_stack_frame_non_standard___ignore_me, 8
+__func_stack_frame_non_standard___ignore_me:
+        .quad   __ignore_me
+.popsection
+
 SYM_CODE_START_LOCAL(common_interrupt)
 	addq	$-0x80, (%rsp)			/* Adjust vector to [-256, -1] range */
 	call	interrupt_entry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ