From: Frederic Weisbecker https://bugzilla.kernel.org/show_bug.cgi?id=16315#c26 http://bugs.winehq.org/show_bug.cgi?id=23323 diff --git a/arch/x86/include/asm/hw_breakpoint.h b/arch/x86/include/asm/hw_breakpoint.h index 528a11e..824ca07 100644 --- a/arch/x86/include/asm/hw_breakpoint.h +++ b/arch/x86/include/asm/hw_breakpoint.h @@ -20,7 +20,7 @@ struct arch_hw_breakpoint { #include /* 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 diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c index a474ec3..71123b1 100644 --- a/arch/x86/kernel/hw_breakpoint.c +++ b/arch/x86/kernel/hw_breakpoint.c @@ -208,9 +208,6 @@ int arch_bp_generic_fields(int x86_len, int x86_type, { /* Len */ switch (x86_len) { - case X86_BREAKPOINT_LEN_X: - *gen_len = sizeof(long); - break; case X86_BREAKPOINT_LEN_1: *gen_len = HW_BREAKPOINT_LEN_1; break; @@ -233,6 +230,7 @@ int arch_bp_generic_fields(int x86_len, int x86_type, switch (x86_type) { case X86_BREAKPOINT_EXECUTE: *gen_type = HW_BREAKPOINT_X; + *gen_len = sizeof(long); break; case X86_BREAKPOINT_WRITE: *gen_type = HW_BREAKPOINT_W; @@ -316,9 +314,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;