From: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
rostedt@goodmis.org, mhiramat@kernel.org, bristot@redhat.com,
jbaron@akamai.com, torvalds@linux-foundation.org,
tglx@linutronix.de, namit@vmware.com, hpa@zytor.com,
luto@kernel.org, ard.biesheuvel@linaro.org, jpoimboe@redhat.com,
hjl.tools@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
Borislav Petkov <bp@alien8.de>,
Denys Vlasenko <dvlasenk@redhat.com>
Subject: Re: [RFC][PATCH 0/9] Variable size jump_label support
Date: Mon, 7 Oct 2019 13:26:06 +0200 [thread overview]
Message-ID: <20191007112606.GA44864@gmail.com> (raw)
In-Reply-To: <20191007112229.GA3221@gmail.com>
[ Sorry, fixed the Cc:lkml line. ]
* Peter Zijlstra <peterz@infradead.org> wrote:
> These here patches are something I've been poking at for a while,
> enabling jump_label to use 2 byte jumps/nops.
>
> It _almost_ works :-/
>
> That is, you can build some kernels with it (x86_64-defconfig for
> example works just fine).
>
> The problem comes when GCC generates a branch into another section,
> mostly .text.unlikely. At that point GAS just gives up and throws a fit
> (more details in the last patch).
>
> Aside from anyone coming up with a really clever GAS trick, I don't see
> how we can do this other than:
> - use 'jmp' and get objtool to rewrite the text. Steven has earlier proposed
> something like that (using recordmcount) and Linus hated that.
As long as GCC+GAS correctly generates a 2-byte or 5-byte JMP depending
on the target distance, the objtool solution should work fine, shouldn't
it?
I can see the recordmcount solution sucking, it would depend on early
kernel patchery. But build time patchery is something we already depend
on, so assuming some objtool catastrophy it's a more robust solution,
isn't it?
Thanks,
Ingo
next parent reply other threads:[~2019-10-07 11:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191007090225.441087116@infradead.org>
[not found] ` <20191007084443.793701281@infradead.org>
[not found] ` <20191007112229.GA3221@gmail.com>
2019-10-07 11:26 ` Ingo Molnar [this message]
2019-10-07 15:17 ` [RFC][PATCH 0/9] Variable size jump_label support Steven Rostedt
2019-10-07 16:13 ` Peter Zijlstra
2019-10-07 16:45 ` Steven Rostedt
2019-10-07 9:02 [RESEND] everything text-poke: ftrace, modules, static_call and jump_label Peter Zijlstra
2019-10-07 8:44 ` [RFC][PATCH 0/9] Variable size jump_label support Peter Zijlstra
2019-10-07 12:07 ` Peter Zijlstra
2019-10-07 12:55 ` Ingo Molnar
2019-10-07 15:08 ` 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=20191007112606.GA44864@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=bp@alien8.de \
--cc=bristot@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=hjl.tools@gmail.com \
--cc=hpa@zytor.com \
--cc=jbaron@akamai.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mhiramat@kernel.org \
--cc=namit@vmware.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).