[kernel] r16141 - in dists/lenny-security/linux-2.6/debian/patches: bugfix/x86 series
Dann Frazier
dannf at alioth.debian.org
Sat Aug 14 01:21:45 UTC 2010
Author: dannf
Date: Sat Aug 14 01:21:34 2010
New Revision: 16141
Log:
x86: don't send SIGBUS for kernel page faults
Added:
dists/lenny-security/linux-2.6/debian/patches/bugfix/x86/dont-send-SIGBUS-for-kernel-page-faults.patch
Modified:
dists/lenny-security/linux-2.6/debian/patches/series/24lenny1
Added: dists/lenny-security/linux-2.6/debian/patches/bugfix/x86/dont-send-SIGBUS-for-kernel-page-faults.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/lenny-security/linux-2.6/debian/patches/bugfix/x86/dont-send-SIGBUS-for-kernel-page-faults.patch Sat Aug 14 01:21:34 2010 (r16141)
@@ -0,0 +1,35 @@
+commit dd1a3004ef4eda44a464c36f88a52b58a6a55806
+Author: Linus Torvalds <torvalds at linux-foundation.org>
+Date: Fri Aug 13 09:49:20 2010 -0700
+
+ [Backported to Debian's 2.6.26 by dann frazier <dannf at debian.org>]
+
+ x86: don't send SIGBUS for kernel page faults
+
+ It's wrong for several reasons, but the most direct one is that the
+ fault may be for the stack accesses to set up a previous SIGBUS. When
+ we have a kernel exception, the kernel exception handler does all the
+ fixups, not some user-level signal handler.
+
+ Even apart from the nested SIGBUS issue, it's also wrong to give out
+ kernel fault addresses in the signal handler info block, or to send a
+ SIGBUS when a system call already returns EFAULT.
+
+ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+
+diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
+index 8bcb6f4..f48d1bc 100644
+--- a/arch/x86/mm/fault.c
++++ b/arch/x86/mm/fault.c
+@@ -896,8 +896,10 @@ do_sigbus:
+ up_read(&mm->mmap_sem);
+
+ /* Kernel mode? Handle exceptions or die */
+- if (!(error_code & PF_USER))
++ if (!(error_code & PF_USER)) {
+ goto no_context;
++ return;
++ }
+ #ifdef CONFIG_X86_32
+ /* User space => ok to do another page fault */
+ if (is_prefetch(regs, address, error_code))
Modified: dists/lenny-security/linux-2.6/debian/patches/series/24lenny1
==============================================================================
--- dists/lenny-security/linux-2.6/debian/patches/series/24lenny1 Sat Aug 14 01:21:09 2010 (r16140)
+++ dists/lenny-security/linux-2.6/debian/patches/series/24lenny1 Sat Aug 14 01:21:34 2010 (r16141)
@@ -9,3 +9,4 @@
+ bugfix/all/can-add-limit-for-nframes-and-clean-up-signed-variables.patch
+ bugfix/all/mm-keep-a-guard-page-below-a-grow-down-stack-segment.patch
+ bugfix/all/mm-fix-missing-page-table-unmap-for-stack-guard-page-failure-case.patch
++ bugfix/x86/dont-send-SIGBUS-for-kernel-page-faults.patch
More information about the Kernel-svn-changes
mailing list