Re: new text patching for review
- From: Andi Kleen <ak@xxxxxxx>
- Date: Thu, 19 Jul 2007 15:46:08 +0200
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: new text patching for review
- From: Mathieu Desnoyers
- Re: new text patching for review
- References:
- new text patching for review
- From: Andi Kleen
- Re: new text patching for review
- From: Mathieu Desnoyers
- new text patching for review
- Prev by Date: Re: Linux, tcpdump and vlan
- Next by Date: [PATCH for review] [0/48] Second batch of x86 patches for .23
- Previous by thread: Re: new text patching for review
- Next by thread: Re: new text patching for review
- Index(es):
Relevant Pages
|