x86: enhance DEBUG_RODATA support - alternatives
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 6 Mar 2008 13:48:49 +0000 (08:48 -0500)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:58 +0000 (17:40 +0200)
commite587cadd8f47e202a30712e2906a65a0606d5865
tree9df9016b1cba513cc48472d335899ae5e216f8f1
parent77bf90ed66116a1fc0e2f0554ecac75a54290cc0
x86: enhance DEBUG_RODATA support - alternatives

Fix a memcpy that should be a text_poke (in apply_alternatives).

Use kernel_wp_save/kernel_wp_restore in text_poke to support DEBUG_RODATA
correctly and so the CPU HOTPLUG special case can be removed.

Add text_poke_early, for alternatives and paravirt boot-time and module load
time patching.

Changelog:

- Fix text_set and text_poke alignment check (mixed up bitwise and and or)
- Remove text_set
- Export add_nops, so it can be used by others.
- Document text_poke_early.
- Remove clflush, since it breaks some VIA architectures and is not strictly
  necessary.
- Add kerneldoc to text_poke and text_poke_early.
- Create a second vmap instead of using the WP bit to support Xen and VMI.
- Move local_irq disable within text_poke and text_poke_early to be able to
  be sleepable in these functions.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Andi Kleen <andi@firstfloor.org>
CC: pageexec@freemail.hu
CC: H. Peter Anvin <hpa@zytor.com>
CC: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/alternative.c
include/asm-x86/alternative.h