All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Rob Landley <rob@landley.net>,
	Masahiro Yamada <masahiroy@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>
Subject: Re: Commit 0d989ac2c90b broke my x86-64 build.
Date: Mon, 25 Oct 2021 11:59:45 -0700	[thread overview]
Message-ID: <20211025185945.ywcvhqypzoaxohyc@treble> (raw)
In-Reply-To: <YXbFpfJwXJXABDup@hirez.programming.kicks-ass.net>

On Mon, Oct 25, 2021 at 04:56:37PM +0200, Peter Zijlstra wrote:
> On Mon, Oct 25, 2021 at 07:46:56AM -0700, Josh Poimboeuf wrote:
> > On Mon, Oct 25, 2021 at 11:04:33AM +0200, Peter Zijlstra wrote:
> > > On Sun, Oct 24, 2021 at 09:51:45PM -0500, Rob Landley wrote:
> > > > > Unfortunately I think CONFIG_STACK_VALIDATION is no longer optional on
> > > > > x86-64 these days, because of static calls and retpolines.
> > > > 
> > > > Does it need stack validation, or just a frame unwinder?
> > > 
> > > static_calls rely on objtool to find all "call __SCT*" instructions and
> > > write their location in a .static_call_sites section.
> > > 
> > > The having of static calls is not optional on x86_64, and I have zero
> > > interest in trying to work out what not having static_call() does, or to
> > > maintain that option.
> > 
> > What I meant was, make STATIC_CALL_INLINE optional.  Then it would use
> > out-of-line static calls which should just work, no?
> 
> Yeah, I suppose so... I think we're then missing a STACK_VALIDATION
> dependency for KCOV. We rely on objtool to nop out those
> __sanitizer_cov_* calls.
> 
> I had really hoped to just make objtool an unconditional part of x86_64.

I was hoping the opposite ;-)  Not everybody wants the extra build
overhead, object size, complexity, warnings, etc.  And it should be
pretty easy to make it optional anyway.

Plus it's a good idea to make the dependencies more explicit.  We've
already been looking at modularizing, like creating a new CONFIG_OBJTOOL
option and splitting stack validation out from some of the other
features.  This could be a nice extension of that.

Which reminds me, I'm still thinking we need to make the interface more
easily combinable, like:

objtool run				\
	[--validate]			\
	[--noinstr]			\
	[--retpoline]			\
	[--orc]				\
	[--mcount]			\
	[--static-call]			\
	[--kcov]			\
	[--frame-pointer]		\
	[--vmlinux]			\
	[--uaccess]			\
	[--module]			\
	[--no-unreachable]		\
	[--backup]			\
	[--stats]			\
	[--backtrace]

objtool dump				\
	[--orc]				\
	[--mcount]			\
	[--static-call]			\
	[--alternatives]		\
	[--whatever]

I can hopefully get to it one of these weeks...

-- 
Josh


  reply	other threads:[~2021-10-25 18:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-24  6:36 Commit 0d989ac2c90b broke my x86-64 build Rob Landley
2021-10-24 18:13 ` Masahiro Yamada
2021-10-24 19:27   ` Josh Poimboeuf
2021-10-25  2:51     ` Rob Landley
2021-10-25  9:04       ` Peter Zijlstra
2021-10-25 14:46         ` Josh Poimboeuf
2021-10-25 14:56           ` Peter Zijlstra
2021-10-25 18:59             ` Josh Poimboeuf [this message]
2021-10-25 20:01               ` Peter Zijlstra
2021-10-26  3:33                 ` Josh Poimboeuf

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=20211025185945.ywcvhqypzoaxohyc@treble \
    --to=jpoimboe@redhat.com \
    --cc=andrii@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rob@landley.net \
    /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.