From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: "relocation to !ENDBR" objtool warnings
Date: Wed, 18 Dec 2024 11:08:12 +0100 [thread overview]
Message-ID: <20241218100812.GJ11133@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20241218084729.mluqut2jqp57ckwa@jpoimboe>
On Wed, Dec 18, 2024 at 12:47:29AM -0800, Josh Poimboeuf wrote:
> On Tue, Dec 17, 2024 at 10:09:56AM +0100, Arnd Bergmann wrote:
> > On Tue, Dec 17, 2024, at 09:54, Arnd Bergmann wrote:
> > >
> > > 00000000000000f0 <stpcpy>:
> > > f0: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1)
> > > f7: 00 00 00 00
> > > fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> > > 100: f3 0f 1e fa endbr64
> >
> >
> > I had one more look at the assembler file created by gcc and found
> > that this is a 16-byte nop:
> >
> > .align 16
> > .globl stpcpy
> > .type stpcpy, @function
> > stpcpy:
> > .p2align 5
> > endbr64
> > .L30:
> > movzbl (%rsi), %eax # MEM[(const char *)src_8 + -1B], _1
> > movq %rdi, %rdx # dest, <retval>
> > addq $1, %rsi #, src
> > addq $1, %rdi #, dest
> > movb %al, -1(%rdi) # _1, MEM[(char *)dest_9 + -1B]
> > testb %al, %al # _1
> > jne .L30 #,
> > movq %rdx, %rax # <retval>,
> > xorl %edx, %edx #
> > xorl %esi, %esi #
> > xorl %edi, %edi #
> > ret
> > .size stpcpy, .-stpcpy
> > .align 16
> >
> > No idea why it got inserted here, or why it only shows up in these
> > two functions. Having a nop before the endbr is a compiler bug, right?
>
> Yeah, looks like a bug to me.
Did you find https://gcc.gnu.org/PR116174 again?
next prev parent reply other threads:[~2024-12-18 10:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 8:54 Arnd Bergmann
2024-12-17 9:09 ` Arnd Bergmann
2024-12-17 10:37 ` Arnd Bergmann
2024-12-18 8:47 ` Josh Poimboeuf
2024-12-18 10:08 ` Peter Zijlstra [this message]
2024-12-18 10:38 ` 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=20241218100812.GJ11133@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=arnd@arndb.de \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®