Re: [patch 06/11] Text Edit Lock - Alternative code for x86 (update)

2007-12-06 Thread Mathieu Desnoyers
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. Not

Re: [patch 06/11] Text Edit Lock - Alternative code for x86

2007-12-06 Thread pageexec
On 6 Dec 2007 at 9:44, Mathieu Desnoyers wrote: > It is correct to assume that the WP bit will always be activated, in > every configuration, even though we don't use the DEBUG_RODATA ? yes, without it the kernel couldn't rely on page faults to trigger copy-on-write on userland pages for example

Re: [patch 06/11] Text Edit Lock - Alternative code for x86

2007-12-06 Thread Mathieu Desnoyers
* [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > On 5 Dec 2007 at 21:02, Mathieu Desnoyers wrote: > > > 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 c

Re: [patch 06/11] Text Edit Lock - Alternative code for x86

2007-12-06 Thread Mathieu Desnoyers
* [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > On 5 Dec 2007 at 21:02, Mathieu Desnoyers wrote: > > > 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 c

Re: [patch 06/11] Text Edit Lock - Alternative code for x86

2007-12-06 Thread pageexec
On 5 Dec 2007 at 21:02, Mathieu Desnoyers wrote: > 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 alternati

[patch 06/11] Text Edit Lock - Alternative code for x86

2007-12-05 Thread Mathieu Desnoyers
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. Not

[rfc-patch 06/11] Text Edit Lock - Alternative code for x86

2007-11-16 Thread Mathieu Desnoyers
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. Not

Re: [patch 06/11] Text Edit Lock - Alternative code for x86 (updated)

2007-11-13 Thread Mathieu Desnoyers
Text Edit Lock - Alternative code for x86 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. clflush all the cachelines touched by text_poke. Add

Re: [patch 06/11] Text Edit Lock - Alternative code for x86

2007-11-13 Thread pageexec
On 13 Nov 2007 at 13:46, Mathieu Desnoyers wrote: > +void *text_poke_early(void *addr, const void *opcode, size_t len) > +{ > + memcpy(addr, opcode, len); > + text_sync(addr, len); > + return addr; > +} why do you need this function (vs. using text_poke throughout)? > +#define kernel

Re: [patch 06/11] Text Edit Lock - Alternative code for x86

2007-11-13 Thread Mathieu Desnoyers
* [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > On 13 Nov 2007 at 13:46, Mathieu Desnoyers wrote: > > > +void *text_poke_early(void *addr, const void *opcode, size_t len) > > +{ > > + memcpy(addr, opcode, len); > > + text_sync(addr, len); > > + return addr; > > +} > > why do you need this

[patch 06/11] Text Edit Lock - Alternative code for x86

2007-11-13 Thread Mathieu Desnoyers
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. clflush all the cachelines touched by text_poke. Add text_poke_early, for alternatives and para