summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle McMartin <kyle@dreadnought.i.jkkm.org>2010-09-01 16:21:51 -0400
committerKyle McMartin <kyle@dreadnought.i.jkkm.org>2010-09-01 16:21:51 -0400
commit3de7ad47f321d24e60efaebe1674ac57e363faed (patch)
tree3cb6d449de174739861ebdb37047024ea1e104d1
parent07d33223125db2a9a5d6941a13b1e766f5e788ec (diff)
downloadkernel-3de7ad47f321d24e60efaebe1674ac57e363faed.tar.gz
kernel-3de7ad47f321d24e60efaebe1674ac57e363faed.tar.xz
kernel-3de7ad47f321d24e60efaebe1674ac57e363faed.zip
fix icebp breakpoints
-rw-r--r--fix-icebp-breakpoints.patch50
-rw-r--r--kernel.spec9
2 files changed, 58 insertions, 1 deletions
diff --git a/fix-icebp-breakpoints.patch b/fix-icebp-breakpoints.patch
new file mode 100644
index 000000000..a84994df3
--- /dev/null
+++ b/fix-icebp-breakpoints.patch
@@ -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;
diff --git a/kernel.spec b/kernel.spec
index a33a576c0..e6eb8261a 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -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.