[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080425161916.GD3265@one.firstfloor.org>
Date: Fri, 25 Apr 2008 18:19:17 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andi Kleen <andi@...stfloor.org>, Ingo Molnar <mingo@...e.hu>,
Jiri Slaby <jirislaby@...il.com>,
David Miller <davem@...emloft.net>, zdenek.kabelac@...il.com,
rjw@...k.pl, paulmck@...ux.vnet.ibm.com, akpm@...ux-foundation.org,
linux-ext4@...r.kernel.org, herbert@...dor.apana.org.au,
penberg@...helsinki.fi, clameter@....com,
linux-kernel@...r.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
pageexec@...email.hu, "H. Peter Anvin" <hpa@...or.com>,
Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [PATCH 1/1] x86: fix text_poke
On Fri, Apr 25, 2008 at 09:06:37AM -0700, Linus Torvalds wrote:
>
>
> On Fri, 25 Apr 2008, Andi Kleen wrote:
> >
> > So all these checks can be just removed.
>
> Quite frankly, I'd rather tighten them up. All the callers actually seem
> to do just a single-byte one.
I think Mathieu did them to prepare for his immediate values which
need to write more bytes (although actually it would be quite
possible to have immediate values only for byte immediates too)
But that code needs much more infrastructure anyways.
>
> So I'd suggest really tightening it up to require total natural alignment
For the common (everything but kprobes) "other code not running"
it doesn't matter and I don't think natural alignment works for the
other cases anyways.
FWIW the original text_poke I started long ago only did bytes
> (rather than the weaker version that required that it fit in an aligned
> unsigned long or whatever). And I'd suggest using FIXMAP's instead of
> vmap. Maybe something like the appended (TOTALLY UNTESTED!)
Not sure how the fixmap is better. It's pretty much equivalent, isn't it?
Perhaps a little cheaper, but the code shouldn't be performance critical.
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists