public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	mbenes@suse.cz, x86@kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	hjl.tools@gmail.com
Subject: Re: drivers/gpu/drm/i915/i915.prelink.o: warning: objtool: __intel_wait_for_register_fw.cold()+0xce: relocation to !ENDBR: vlv_allow_gt_wake.cold+0x0
Date: Thu, 7 Apr 2022 11:24:05 +0200	[thread overview]
Message-ID: <20220407092405.GI2731@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220406163703.hhet4ai7ztd7g4j4@treble>

On Wed, Apr 06, 2022 at 09:37:03AM -0700, Josh Poimboeuf wrote:
> On Wed, Apr 06, 2022 at 09:43:30AM +0200, Peter Zijlstra wrote:
> > On Tue, Apr 05, 2022 at 10:32:51PM -0700, Josh Poimboeuf wrote:
> > > More broadly, this issue could theoretically happen in some other places
> > > throughout the kernel tree, since _THIS_IP_ is fundamentally unreliable
> > > as currently written.
> > > 
> > > So we could look at making _THIS_IP_ more predictable.
> > > 
> > > Inline asm would work better ("lea 0(%rip), %[rip]"), but then you need
> > > an arch-dependent implementation...
> > 
> > Well, there's a ton of _THIS_IP_ instances all around, and it would be
> > unfortunate to have them grow into actual code :/
> 
> What do you mean by growing into actual code?  It's still just a single
> instruction, as was the immediate load before.

Aah, indeed. I was somehow thinking we'd get extra instructions.

> Though, you pasted this on irc:
> 
>   #define _THIS_IP_  ({ __label__ __here; __here: asm_volatile_goto ("":::: __here); (unsigned long)&&__here; })
> 
> which seems decent to me, though less than ideal because it grows an
> ENDBR.  But I like its arch-independence, so yeah, LGTM.

I did send hjl an email about that extra endbr, because I really don't
like that. And jump_label (also using asm-goto) doesn't grow those endbr
instructions, so something is weird.

  reply	other threads:[~2022-04-07  9:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04  4:33 drivers/gpu/drm/i915/i915.prelink.o: warning: objtool: __intel_wait_for_register_fw.cold()+0xce: relocation to !ENDBR: vlv_allow_gt_wake.cold+0x0 kernel test robot
2022-04-05 14:01 ` Peter Zijlstra
2022-04-06  0:05   ` Josh Poimboeuf
2022-04-06  0:46     ` Thomas Gleixner
2022-04-06  1:20       ` Steven Rostedt
2022-04-06 18:44         ` Arnaldo Carvalho de Melo
2022-04-06  5:32       ` Josh Poimboeuf
2022-04-06  7:29         ` Peter Zijlstra
2022-04-06 14:19           ` Steven Rostedt
2022-04-06  7:43         ` Peter Zijlstra
2022-04-06 16:37           ` Josh Poimboeuf
2022-04-07  9:24             ` Peter Zijlstra [this message]
2022-04-06 14:14         ` Steven Rostedt

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=20220407092405.GI2731@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=hjl.tools@gmail.com \
    --cc=jpoimboe@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mbenes@suse.cz \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --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