From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Kees Cook <keescook@chromium.org>
Subject: Re: Remaining randconfig objtool warnings, linux-next-20200428
Date: Tue, 28 Apr 2020 17:48:38 -0500 [thread overview]
Message-ID: <20200428224838.k4ttccrtoug5otan@treble> (raw)
In-Reply-To: <20200428223327.GC16027@hirez.programming.kicks-ass.net>
On Wed, Apr 29, 2020 at 12:33:27AM +0200, Peter Zijlstra wrote:
> 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.
HAHA, nice.
This seems to work:
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 3063aa9090f9..afdf43c9bac1 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -597,8 +597,13 @@ SYM_CODE_START_LOCAL(common_spurious)
SYM_CODE_END(common_spurious)
_ASM_NOKPROBE(common_spurious)
+.macro P2ALIGN_NOPS shift
+ .p2align \shift-1
+ .p2align \shift
+.endm
+
/* common_interrupt is a hotpath. Align it */
- .p2align CONFIG_X86_L1_CACHE_SHIFT
+P2ALIGN_NOPS shift=CONFIG_X86_L1_CACHE_SHIFT
SYM_CODE_START_LOCAL(common_interrupt)
addq $-0x80, (%rsp) /* Adjust vector to [-256, -1] range */
call interrupt_entry
next prev parent reply other threads:[~2020-04-28 22:48 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 14:49 Remaining randconfig objtool warnings, linux-next-20200428 Arnd Bergmann
2020-04-28 16:10 ` Josh Poimboeuf
2020-04-28 19:11 ` Kees Cook
2020-04-28 20:19 ` Arnd Bergmann
2020-04-28 20:38 ` Josh Poimboeuf
2020-04-28 21:55 ` Peter Zijlstra
2020-04-28 22:03 ` Josh Poimboeuf
2020-04-28 22:33 ` Peter Zijlstra
2020-04-28 22:48 ` Josh Poimboeuf [this message]
2020-04-28 23:08 ` Josh Poimboeuf
2020-04-29 18:55 ` Josh Poimboeuf
2020-04-29 22:46 ` Arnd Bergmann
2020-04-29 23:01 ` Josh Poimboeuf
2020-04-29 23:11 ` Josh Poimboeuf
2020-04-29 23:28 ` Josh Poimboeuf
2020-04-30 13:41 ` Arnd Bergmann
2020-04-30 14:33 ` Josh Poimboeuf
2020-04-30 19:46 ` Josh Poimboeuf
2020-04-30 20:59 ` Arnd Bergmann
2020-04-30 21:10 ` Josh Poimboeuf
2020-04-30 21:08 ` Josh Poimboeuf
2020-04-30 23:02 ` Josh Poimboeuf
2020-04-29 19:18 ` Josh Poimboeuf
2020-05-01 12:23 ` Peter Zijlstra
2020-04-30 14:05 ` Arnd Bergmann
2020-05-01 0:28 ` Josh Poimboeuf
2020-05-01 11:41 ` Arnd Bergmann
2020-05-01 17:16 ` Peter Zijlstra
2020-05-01 12:27 ` Peter Zijlstra
2020-05-01 1:07 ` Josh Poimboeuf
2020-05-01 11:18 ` Arnd Bergmann
2020-05-01 12:33 ` Peter Zijlstra
2020-05-01 13:08 ` Arnd Bergmann
2020-05-01 15:49 ` Josh Poimboeuf
2020-05-01 17:21 ` Arnd Bergmann
2020-05-01 17:26 ` Peter Zijlstra
2020-05-01 17:50 ` Josh Poimboeuf
2020-05-01 19:47 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200428224838.k4ttccrtoug5otan@treble \
--to=jpoimboe@redhat.com \
--cc=arnd@arndb.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.