linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jason Baron <jbaron@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	Michal Marek <mmarek@suse.cz>
Subject: Re: [PATCH 1/5] x86/jump-label: Use best default nops for inital jump label calls
Date: Fri, 27 Jan 2012 15:49:01 -0500	[thread overview]
Message-ID: <1327697341.22710.138.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <4F230899.3020808@zytor.com>

[ Added Michal ]

On Fri, 2012-01-27 at 12:27 -0800, H. Peter Anvin wrote:
> On 01/27/2012 12:14 PM, Steven Rostedt wrote:
> > 
> > #define JUMP_LABEL_NOP_SIZE 5
> > 
> > -#define JUMP_LABEL_INITIAL_NOP ".byte 0xe9 \n\t .long 0\n\t" 
> > +#ifdef CONFIG_X86_64 +# define JUMP_LABEL_INIT_NOP P6_NOP5 +#else 
> > +# define JUMP_LABEL_INIT_NOP 0x3e, 0x8d, 0x74, 0x26, 0x00 +#endif
> > 
> 
> Why not just use ASM_NOP5_ATOMIC since you have configuration
> available here?

This eventually needs to match the code in the update_jump_label.c,
otherwise the checks will be incorrect on boot up, and we'll BUG the
kernel.

I need to find a way to get the config options of the kernel into the
compiling of the update_jump_label.c. Then I could use the nops.h file
with the set configs.

Michal, can we get host tools to compile with the configs set by
the .config file?

update_jump_label.c is built just like recordmcount.c is. It would be
great if it could be compiled with the same config.h defines as the
kernel is. That way I can make it (and even recordmcount.c) customize to
the type of kernel that is being built.

Then again, it would also need to be part of the dependencies that are
done with configs.

If not, at the very least, I'll add a comment (in the last patch) that
explains why we use our own "JUMP_LABEL_INIT_NOP" instead of
ASM_NOP5_ATOMIC.

-- Steve



  reply	other threads:[~2012-01-27 20:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 20:14 [PATCH 0/5] [GIT PULL] x86/jump label: Paranoid checks and 2 or 5 byte nops Steven Rostedt
2012-01-27 20:14 ` [PATCH 1/5] x86/jump-label: Use best default nops for inital jump label calls Steven Rostedt
2012-01-27 20:27   ` H. Peter Anvin
2012-01-27 20:49     ` Steven Rostedt [this message]
2012-01-27 20:50       ` H. Peter Anvin
2012-01-27 21:00         ` Steven Rostedt
2012-01-30 21:05       ` Michal Marek
2012-01-27 20:14 ` [PATCH 2/5] x86/jump-label: Do not bother updating nops if they are correct Steven Rostedt
2012-01-27 20:34   ` Andrew Morton
2012-01-27 20:42     ` Steven Rostedt
2012-01-27 20:14 ` [PATCH 3/5] x86/jump-label: Add safety checks to jump label conversions Steven Rostedt
2012-01-27 20:14 ` [PATCH 4/5] jump labels: Add infrastructure to update jump labels at compile time Steven Rostedt
2012-01-27 20:14 ` [PATCH 5/5] jump labels/x86: Use etiher 5 byte or 2 byte jumps Steven Rostedt
2012-01-27 21:47   ` 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=1327697341.22710.138.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mmarek@suse.cz \
    /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).