lkml.org 
[lkml]   [2007]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: new text patching for review
Date
On Friday 20 July 2007 02:37:20 Zachary Amsden wrote:
> Andi Kleen wrote:
> > + *addr = opcode;
> > + /* Not strictly needed, but can speed CPU recovery up */
> > + if (cpu_has_clflush)
> > + asm("clflush (%0) " :: "r" (addr) : "memory");
> > + if (addr != oaddr)
> > + vunmap(addr);
> >
>
> clflush should take oaddr.

Thanks

> If you had to remap, note that the processor does not know the linear
> address you wrote to could be matched by another mapping in icache. In
> that case, you'll need a serializing instruction (cpuid) to
> resynchronize caches.

We already got one in alternative patching, but you're right it's
safer to do it in text_poke

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-20 10:27    [W:0.136 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site