LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* bad paravirt/Xen interaction in "x86 - Enhance DEBUG_RODATA support - alternatives"
@ 2008-02-29 20:39 Jeremy Fitzhardinge
  2008-02-29 20:56 ` H. Peter Anvin
  2008-02-29 21:24 ` Ingo Molnar
  0 siblings, 2 replies; 12+ messages in thread
From: Jeremy Fitzhardinge @ 2008-02-29 20:39 UTC (permalink / raw)
  To: Mathieu Desnoyers, Ingo Molnar
  Cc: Linux Kernel Mailing List, H. Peter Anvin, Andi Kleen, Zachary Amsden

The patch "x86 - Enhance DEBUG_RODATA support - alternatives" enables 
the kernel for writing by clearing X86_CR0_WP allow privileged writes.  
This won't work in a paravirt environment for two reasons:

   1. the kernel may not be running in ring 0, so writes will still be
      prevented
   2. the hypervisor prevents X86_CR0_WP from being cleared anyway (it
      GPFs the cr0 update)

This crashes on Xen, and it would probably break VMI too.

The only safe way to allow writes is to change the page permissions 
(either on the page itself, or create a temporary writable alias for 
that page).  Perhaps something you could do it with kmap_atomic.

    J

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-03-04  4:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 20:39 bad paravirt/Xen interaction in "x86 - Enhance DEBUG_RODATA support - alternatives" Jeremy Fitzhardinge
2008-02-29 20:56 ` H. Peter Anvin
2008-02-29 21:09   ` Jeremy Fitzhardinge
2008-03-03 17:30     ` Mathieu Desnoyers
2008-03-03 17:35       ` Andi Kleen
2008-03-03 17:58       ` Jeremy Fitzhardinge
2008-03-03 18:03         ` Andi Kleen
2008-03-03 18:05           ` Jeremy Fitzhardinge
2008-03-03 20:53             ` Mathieu Desnoyers
2008-03-03 22:15               ` Jeremy Fitzhardinge
2008-03-04  4:12                 ` Mathieu Desnoyers
2008-02-29 21:24 ` Ingo Molnar

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).