From: Steven Rostedt <rostedt@goodmis.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jason Baron <jbaron@redhat.com>
Subject: Re: [PATCH 2/2] jump labels/x86: Use etiher 5 byte or 2 byte jumps
Date: Thu, 19 Jan 2012 10:19:16 -0500 [thread overview]
Message-ID: <1326986356.17534.131.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1326985100.17534.127.camel@gandalf.stny.rr.com>
On Thu, 2012-01-19 at 09:58 -0500, Steven Rostedt wrote:
> On Thu, 2012-01-19 at 06:46 -0800, H. Peter Anvin wrote:
> >
> > >> +
> > >> + /* Use probe_kernel_read()? */
> > >> + op = *(unsigned char *)ip;
> > >> + nop = ideal_nops[NOP_ATOMIC5][0];
> > >>
> > >> if (type == JUMP_LABEL_ENABLE) {
> > >> - code.jump = 0xe9;
> > >> - code.offset = entry->target -
> > >> - (entry->code + JUMP_LABEL_NOP_SIZE);
> > >> - } else
> > >> - memcpy(&code, ideal_nops[NOP_ATOMIC5], JUMP_LABEL_NOP_SIZE);
> > >> + if (op == 0xe9 || op == 0xeb)
> > >> + /* Already enabled. Warn? */
> > >
> > > This could be caused by failure to run the link-time script, or running
> > > the transform twice. A warning would indeed be welcome, as this should
> > > never happen.
> > >
> >
> > Warning? No. ERROR. Something very bad could be happening here. We
> > have covered this before.
>
> Heh, not this exactly. We covered run time errors, this is build time
> errors.
Oops, this is patch 2 not 1. It is run time error.
>
> But I agree, it should error. The mcount code errors on problems, this
> should too.
I'll have to look at this in more detail, to make sure jump labels are
consistent in their updates. It may legitimately enable them twice. If
that's the case, what should be done is to make sure the entire
instruction is what we expect it to be, otherwise BUG().
-- Steve
next prev parent reply other threads:[~2012-01-19 15:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 19:53 [PATCH 0/2] [RFC] jump-label/x86: Compress jmps to 2 bytes where possible Steven Rostedt
2012-01-18 19:53 ` [PATCH 1/2] jump labels: Add infrastructure to update jump labels at compile time Steven Rostedt
2012-01-19 14:24 ` Mathieu Desnoyers
2012-01-19 14:52 ` Steven Rostedt
2012-01-18 19:53 ` [PATCH 2/2] jump labels/x86: Use etiher 5 byte or 2 byte jumps Steven Rostedt
2012-01-19 12:22 ` Ingo Molnar
2012-01-19 14:41 ` Mathieu Desnoyers
2012-01-19 14:46 ` H. Peter Anvin
2012-01-19 14:58 ` Steven Rostedt
2012-01-19 15:19 ` Steven Rostedt [this message]
2012-01-19 14:56 ` Steven Rostedt
2012-01-19 14:58 ` H. Peter Anvin
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=1326986356.17534.131.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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®