rpms/kernel/F-9 linux-2.6-input-dell-keyboard-keyup.patch, NONE, 1.1 linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch, 1.2, 1.3 kernel.spec, 1.828, 1.829

Chuck Ebbert cebbert at fedoraproject.org
Thu Oct 30 20:56:05 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2002

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-input-dell-keyboard-keyup.patch 
	linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch 
Log Message:
Two more fixes from F10:
  Fix missing key-up events on Dell notebook keyboards.
  x86: don't dereference memory beyond end-of-stack.

linux-2.6-input-dell-keyboard-keyup.patch:

--- NEW FILE linux-2.6-input-dell-keyboard-keyup.patch ---
From: Matthew Garrett <mjg59 at srcf.ucam.org>
Date: Fri, 15 Aug 2008 17:54:51 +0000 (-0400)
Subject: Input: atkbd - expand Latitude's force release quirk to other Dells
X-Git-Tag: v2.6.28-rc1~289^2^2~15
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=61579ba83934d397a4fa2bb7372de9ae112587d5

Input: atkbd - expand Latitude's force release quirk to other Dells

Dell laptops fail to send key up events for several of their special
keys. There's an existing quirk in the kernel to handle this, but it's
limited to the Latitude range. This patch extends it to cover all
portable Dells.

Signed-off-by: Matthew Garrett <mjg at redhat.com>
Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
---

diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 4474572..22016ca 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -834,10 +834,10 @@ static void atkbd_disconnect(struct serio *serio)
 }
 
 /*
- * Most special keys (Fn+F?) on Dell Latitudes do not generate release
+ * Most special keys (Fn+F?) on Dell laptops do not generate release
  * events so we have to do it ourselves.
  */
-static void atkbd_latitude_keymap_fixup(struct atkbd *atkbd)
+static void atkbd_dell_laptop_keymap_fixup(struct atkbd *atkbd)
 {
 	const unsigned int forced_release_keys[] = {
 		0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8f, 0x93,
@@ -1451,13 +1451,13 @@ static int __init atkbd_setup_fixup(const struct dmi_system_id *id)
 
 static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
 	{
-		.ident = "Dell Latitude series",
+		.ident = "Dell Laptop",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-			DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"),
+			DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
 		},
 		.callback = atkbd_setup_fixup,
-		.driver_data = atkbd_latitude_keymap_fixup,
+		.driver_data = atkbd_dell_laptop_keymap_fixup,
 	},
 	{
 		.ident = "HP 2133",

linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch:

Index: linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch
===================================================================
RCS file: linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch
diff -N linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch	30 Oct 2008 20:56:04 -0000	1.3
@@ -0,0 +1,34 @@
+From: David Rientjes <rientjes at google.com>
+Date: Tue, 7 Oct 2008 21:15:11 +0000 (-0700)
+Subject: x86: avoid dereferencing beyond stack + THREAD_SIZE
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fx86%2Flinux-2.6-tip.git;a=commitdiff_plain;h=60e6258cd43f9b06884f04f0f7cefb9c40f17a32
+
+x86: avoid dereferencing beyond stack + THREAD_SIZE
+
+It's possible for get_wchan() to dereference past task->stack + THREAD_SIZE
+while iterating through instruction pointers if fp equals the upper boundary,
+causing a kernel panic.
+
+Signed-off-by: David Rientjes <rientjes at google.com>
+Signed-off-by: Ingo Molnar <mingo at elte.hu>
+---
+
+diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
+index e12e0e4..5a7c539 100644
+--- a/arch/x86/kernel/process_64.c
++++ b/arch/x86/kernel/process_64.c
+@@ -729,12 +729,12 @@ unsigned long get_wchan(struct task_struct *p)
+ 	if (!p || p == current || p->state==TASK_RUNNING)
+ 		return 0; 
+ 	stack = (unsigned long)task_stack_page(p);
+-	if (p->thread.sp < stack || p->thread.sp > stack+THREAD_SIZE)
++	if (p->thread.sp < stack || p->thread.sp >= stack+THREAD_SIZE)
+ 		return 0;
+ 	fp = *(u64 *)(p->thread.sp);
+ 	do { 
+ 		if (fp < (unsigned long)stack ||
+-		    fp > (unsigned long)stack+THREAD_SIZE)
++		    fp >= (unsigned long)stack+THREAD_SIZE)
+ 			return 0; 
+ 		ip = *(u64 *)(fp+8);
+ 		if (!in_sched_functions(ip))


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.828
retrieving revision 1.829
diff -u -r1.828 -r1.829
--- kernel.spec	30 Oct 2008 20:42:07 -0000	1.828
+++ kernel.spec	30 Oct 2008 20:56:04 -0000	1.829
@@ -599,6 +599,7 @@
 Patch23: linux-2.6.27-x86-tracehook-syscall-arg-order.patch
 
 Patch41: linux-2.6-sysrq-c.patch
+Patch44: linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch
 
 Patch60: linux-2.6-sched-features-disable-hrtick.patch
 Patch61: linux-2.6-sched_clock-prevent-scd-clock-from-moving-backwards
@@ -638,6 +639,7 @@
 Patch440: linux-2.6-net-tcp-option-ordering.patch
 
 Patch450: linux-2.6-input-kill-stupid-messages.patch
+Patch451: linux-2.6-input-dell-keyboard-keyup.patch
 Patch452: linux-2.6.27-hwmon-applesmc-2.6.28.patch
 Patch460: linux-2.6-serial-460800.patch
 Patch510: linux-2.6-silence-noise.patch
@@ -1088,6 +1090,8 @@
 ApplyPatch linux-2.6-x86-tune-generic.patch
 # don't oops if there's no IRQ stack available
 ApplyPatch linux-2.6-x86-check-for-null-irq-context.patch
+# don't try to read memory beyond end-of-stack
+ApplyPatch linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch
 
 #
 # PowerPC
@@ -1187,6 +1191,8 @@
 # Misc fixes
 # The input layer spews crap no-one cares about.
 ApplyPatch linux-2.6-input-kill-stupid-messages.patch
+# dell can't make keyboards
+ApplyPatch linux-2.6-input-dell-keyboard-keyup.patch
 # kill annoying applesmc debug messages
 ApplyPatch linux-2.6.27-hwmon-applesmc-2.6.28.patch
 
@@ -1884,6 +1890,11 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Thu Oct 30 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.4-16
+- Two more fixes from F10:
+  Fix missing key-up events on Dell notebook keyboards.
+  x86: don't dereference memory beyond end-of-stack.
+
 * Thu Oct 30 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.4-15
 - Two ACPI reboot / resume fixes from F10.
 




More information about the scm-commits mailing list