fix icebp breakpoints

This commit is contained in:
Kyle McMartin 2010-09-01 16:21:51 -04:00
parent 07d3322312
commit 3de7ad47f3
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,50 @@
From: Frederic Weisbecker <fweisbec@gmail.com>
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 <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
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;

View File

@ -51,7 +51,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be prepended with "0.", so
# for example a 3 here will become 0.3
#
%global baserelease 13
%global baserelease 14
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -604,6 +604,8 @@ Patch30: linux-2.6-tracehook.patch
Patch31: linux-2.6-utrace.patch
Patch32: linux-2.6-utrace-ptrace.patch
Patch100: fix-icebp-breakpoints.patch
Patch150: linux-2.6.29-sparc-IOC_TYPECHECK.patch
Patch160: linux-2.6-32bit-mmap-exec-randomization.patch
@ -1114,6 +1116,7 @@ ApplyPatch linux-2.6-utrace-ptrace.patch
# Architecture patches
# x86(-64)
ApplyPatch fix-icebp-breakpoints.patch
#
# Intel IOMMU
@ -1866,6 +1869,10 @@ fi
# || ||
%changelog
* Wed Sep 01 2010 Kyle McMartin <kyle@redhat.com> - 2.6.36-0.14.rc3.git0
- Fix icebp breakpoints, patch from Frederic Weisbecker.
(https://bugzilla.kernel.org/show_bug.cgi?id=16315#c26)
* Wed Sep 01 2010 Kyle McMartin <kyle@redhat.com> - 2.6.36-0.13.rc3.git0
- Swap back to roland's auto-updated utrace patches.