[PATCH] Kprobes causes NX protection fault on i686 SMP
Fix a problem seen on i686 machine with NX support where the instruction could not be single stepped because of NX bit set on the memory pages allocated by kprobes module. This patch provides allocation of instruction solt so that the processor can execute the instruction from that location similar to x86_64 architecture. Thanks to Bibo and Masami for testing this patch. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
d1521260f5
commit
124d90be62
@@ -27,6 +27,9 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/ptrace.h>
|
||||
|
||||
#define __ARCH_WANT_KPROBES_INSN_SLOT
|
||||
|
||||
struct kprobe;
|
||||
struct pt_regs;
|
||||
|
||||
typedef u8 kprobe_opcode_t;
|
||||
@@ -40,14 +43,14 @@ typedef u8 kprobe_opcode_t;
|
||||
|
||||
#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
|
||||
#define ARCH_SUPPORTS_KRETPROBES
|
||||
#define arch_remove_kprobe(p) do {} while (0)
|
||||
|
||||
void arch_remove_kprobe(struct kprobe *p);
|
||||
void kretprobe_trampoline(void);
|
||||
|
||||
/* Architecture specific copy of original instruction*/
|
||||
struct arch_specific_insn {
|
||||
/* copy of the original instruction */
|
||||
kprobe_opcode_t insn[MAX_INSN_SIZE];
|
||||
kprobe_opcode_t *insn;
|
||||
};
|
||||
|
||||
struct prev_kprobe {
|
||||
|
Reference in New Issue
Block a user