[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200707191546.08919.ak@suse.de>
Date: Thu, 19 Jul 2007 15:46:08 +0200
From: Andi Kleen <ak@...e.de>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc: jbeulich@...ell.com, "S. P. Prasanna" <prasanna@...ibm.com>,
linux-kernel@...r.kernel.org, patches@...-64.org
Subject: Re: new text patching for review
> Ewwwwwwwwwww.... you plan to run this in SMP ? So you actually go byte
> by byte changing pieces of instructions non atomically and doing
> non-Intel's errata friendly XMC. You are really looking for trouble
> there :) Two distinct errors can occur:
In this case it is ok because this only happens when transitioning
from 1 CPU to 2 CPUs or vice versa and in both cases the other CPUs
are essentially stopped.
All the other manipulations currently are single byte.
I suppose for your immediate value patches something stronger is needed,
but we can worry about that post .23.
> What I don't like about this particular implementation is that it does
> not support "poking" more than 1 byte. In order to support this, you
> would have to deal with the case where the address range spans over more
> than one page.
I considered it, but the function would have been at least twice as big
to handle all the corner cases. And for the current callers it's all fine.
> Also, doing the copy in the same interface seems a bit awkward.
Splitting it would also seem quite awkward.
>
> I would much prefer something like:
>
> void *map_shadow_write(void *addr, size_t len);
> (returns a pointer to the shadow writable pages, at the same page offset
> as "addr")
>
> int unmap_shadow_write(void *shadow_addr, size_t len);
> (unmap the shadow pages)
>
> Then, the in-kernel user is free to modify their pages as they like.
> Since we cannot foresee each modification pattern, I think that leaving
> this kind of flexibility is useful.
You could as well call vmap directly then; it's not that much
more complicated. I don't really see much value in complicating
it right now.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists