Loading arch/Kconfig +2 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,9 @@ config HAVE_OPROFILE config KPROBES bool "Kprobes" depends on KALLSYMS && MODULES depends on MODULES depends on HAVE_KPROBES select KALLSYMS help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes Loading @@ -45,7 +46,6 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS bool Loading arch/x86/include/asm/hw_breakpoint.h +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ struct arch_hw_breakpoint { #include <linux/list.h> /* Available HW breakpoint length encodings */ #define X86_BREAKPOINT_LEN_X 0x00 #define X86_BREAKPOINT_LEN_X 0x40 #define X86_BREAKPOINT_LEN_1 0x40 #define X86_BREAKPOINT_LEN_2 0x44 #define X86_BREAKPOINT_LEN_4 0x4c Loading arch/x86/kernel/hw_breakpoint.c +19 −21 Original line number Diff line number Diff line Loading @@ -206,11 +206,27 @@ int arch_check_bp_in_kernelspace(struct perf_event *bp) int arch_bp_generic_fields(int x86_len, int x86_type, int *gen_len, int *gen_type) { /* Len */ switch (x86_len) { case X86_BREAKPOINT_LEN_X: /* Type */ switch (x86_type) { case X86_BREAKPOINT_EXECUTE: if (x86_len != X86_BREAKPOINT_LEN_X) return -EINVAL; *gen_type = HW_BREAKPOINT_X; *gen_len = sizeof(long); return 0; case X86_BREAKPOINT_WRITE: *gen_type = HW_BREAKPOINT_W; break; case X86_BREAKPOINT_RW: *gen_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R; break; default: return -EINVAL; } /* Len */ switch (x86_len) { case X86_BREAKPOINT_LEN_1: *gen_len = HW_BREAKPOINT_LEN_1; break; Loading @@ -229,21 +245,6 @@ int arch_bp_generic_fields(int x86_len, int x86_type, return -EINVAL; } /* Type */ switch (x86_type) { case X86_BREAKPOINT_EXECUTE: *gen_type = HW_BREAKPOINT_X; break; case X86_BREAKPOINT_WRITE: *gen_type = HW_BREAKPOINT_W; break; case X86_BREAKPOINT_RW: *gen_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R; break; default: return -EINVAL; } return 0; } Loading Loading @@ -316,9 +317,6 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp) ret = -EINVAL; switch (info->len) { case X86_BREAKPOINT_LEN_X: align = sizeof(long) -1; break; case X86_BREAKPOINT_LEN_1: align = 0; break; Loading arch/x86/lguest/boot.c +8 −5 Original line number Diff line number Diff line Loading @@ -324,9 +324,8 @@ static void lguest_load_gdt(const struct desc_ptr *desc) } /* * For a single GDT entry which changes, we do the lazy thing: alter our GDT, * then tell the Host to reload the entire thing. This operation is so rare * that this naive implementation is reasonable. * For a single GDT entry which changes, we simply change our copy and * then tell the host about it. */ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum, const void *desc, int type) Loading @@ -338,9 +337,13 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum, } /* * OK, I lied. There are three "thread local storage" GDT entries which change * There are three "thread local storage" GDT entries which change * on every context switch (these three entries are how glibc implements * __thread variables). So we have a hypercall specifically for this case. * __thread variables). As an optimization, we have a hypercall * specifically for this case. * * Wouldn't it be nicer to have a general LOAD_GDT_ENTRIES hypercall * which took a range of entries? */ static void lguest_load_tls(struct thread_struct *t, unsigned int cpu) { Loading arch/x86/oprofile/nmi_int.c +3 −1 Original line number Diff line number Diff line Loading @@ -671,7 +671,9 @@ static int __init ppro_init(char **cpu_type) case 14: *cpu_type = "i386/core"; break; case 15: case 23: case 0x0f: case 0x16: case 0x17: *cpu_type = "i386/core_2"; break; case 0x1a: Loading Loading
arch/Kconfig +2 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,9 @@ config HAVE_OPROFILE config KPROBES bool "Kprobes" depends on KALLSYMS && MODULES depends on MODULES depends on HAVE_KPROBES select KALLSYMS help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes Loading @@ -45,7 +46,6 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS bool Loading
arch/x86/include/asm/hw_breakpoint.h +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ struct arch_hw_breakpoint { #include <linux/list.h> /* Available HW breakpoint length encodings */ #define X86_BREAKPOINT_LEN_X 0x00 #define X86_BREAKPOINT_LEN_X 0x40 #define X86_BREAKPOINT_LEN_1 0x40 #define X86_BREAKPOINT_LEN_2 0x44 #define X86_BREAKPOINT_LEN_4 0x4c Loading
arch/x86/kernel/hw_breakpoint.c +19 −21 Original line number Diff line number Diff line Loading @@ -206,11 +206,27 @@ int arch_check_bp_in_kernelspace(struct perf_event *bp) int arch_bp_generic_fields(int x86_len, int x86_type, int *gen_len, int *gen_type) { /* Len */ switch (x86_len) { case X86_BREAKPOINT_LEN_X: /* Type */ switch (x86_type) { case X86_BREAKPOINT_EXECUTE: if (x86_len != X86_BREAKPOINT_LEN_X) return -EINVAL; *gen_type = HW_BREAKPOINT_X; *gen_len = sizeof(long); return 0; case X86_BREAKPOINT_WRITE: *gen_type = HW_BREAKPOINT_W; break; case X86_BREAKPOINT_RW: *gen_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R; break; default: return -EINVAL; } /* Len */ switch (x86_len) { case X86_BREAKPOINT_LEN_1: *gen_len = HW_BREAKPOINT_LEN_1; break; Loading @@ -229,21 +245,6 @@ int arch_bp_generic_fields(int x86_len, int x86_type, return -EINVAL; } /* Type */ switch (x86_type) { case X86_BREAKPOINT_EXECUTE: *gen_type = HW_BREAKPOINT_X; break; case X86_BREAKPOINT_WRITE: *gen_type = HW_BREAKPOINT_W; break; case X86_BREAKPOINT_RW: *gen_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R; break; default: return -EINVAL; } return 0; } Loading Loading @@ -316,9 +317,6 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp) ret = -EINVAL; switch (info->len) { case X86_BREAKPOINT_LEN_X: align = sizeof(long) -1; break; case X86_BREAKPOINT_LEN_1: align = 0; break; Loading
arch/x86/lguest/boot.c +8 −5 Original line number Diff line number Diff line Loading @@ -324,9 +324,8 @@ static void lguest_load_gdt(const struct desc_ptr *desc) } /* * For a single GDT entry which changes, we do the lazy thing: alter our GDT, * then tell the Host to reload the entire thing. This operation is so rare * that this naive implementation is reasonable. * For a single GDT entry which changes, we simply change our copy and * then tell the host about it. */ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum, const void *desc, int type) Loading @@ -338,9 +337,13 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum, } /* * OK, I lied. There are three "thread local storage" GDT entries which change * There are three "thread local storage" GDT entries which change * on every context switch (these three entries are how glibc implements * __thread variables). So we have a hypercall specifically for this case. * __thread variables). As an optimization, we have a hypercall * specifically for this case. * * Wouldn't it be nicer to have a general LOAD_GDT_ENTRIES hypercall * which took a range of entries? */ static void lguest_load_tls(struct thread_struct *t, unsigned int cpu) { Loading
arch/x86/oprofile/nmi_int.c +3 −1 Original line number Diff line number Diff line Loading @@ -671,7 +671,9 @@ static int __init ppro_init(char **cpu_type) case 14: *cpu_type = "i386/core"; break; case 15: case 23: case 0x0f: case 0x16: case 0x17: *cpu_type = "i386/core_2"; break; case 0x1a: Loading