- x86-enable-interrupts-in-user-path-of-page-fault.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     x86: enable interrupts in user path of page fault
has been removed from the -mm tree.  Its filename was
     x86-enable-interrupts-in-user-path-of-page-fault.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: x86: enable interrupts in user path of page fault
From: Steven Rostedt <rostedt@xxxxxxxxxxx>

This is a minor fix, but what is currently there is essentially wrong.  In
do_page_fault, if the faulting address from user code happens to be in
kernel address space (int *p = (int*)-1; p = 0xbed;) then the do_page_fault
handler will jump over the local_irq_enable with the

  goto bad_area_nosemaphore;

But the first line there sees this is user code and goes through the
process of sending a signal to send SIGSEGV to the user task.  This whole
time interrupts are disabled and the task can not be preempted by a higher
priority task.

This patch always enables interrupts in the user path of the
bad_area_nosemaphore.

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/i386/mm/fault.c   |    5 +++++
 arch/x86_64/mm/fault.c |    6 ++++++
 2 files changed, 11 insertions(+)

diff -puN arch/i386/mm/fault.c~x86-enable-interrupts-in-user-path-of-page-fault arch/i386/mm/fault.c
--- a/arch/i386/mm/fault.c~x86-enable-interrupts-in-user-path-of-page-fault
+++ a/arch/i386/mm/fault.c
@@ -458,6 +458,11 @@ bad_area:
 bad_area_nosemaphore:
 	/* User mode accesses just cause a SIGSEGV */
 	if (error_code & 4) {
+		/*
+		 * It's possible to have interrupts off here.
+		 */
+		local_irq_enable();
+
 		/* 
 		 * Valid to do another page fault here because this one came 
 		 * from user space.
diff -puN arch/x86_64/mm/fault.c~x86-enable-interrupts-in-user-path-of-page-fault arch/x86_64/mm/fault.c
--- a/arch/x86_64/mm/fault.c~x86-enable-interrupts-in-user-path-of-page-fault
+++ a/arch/x86_64/mm/fault.c
@@ -476,6 +476,12 @@ bad_area:
 bad_area_nosemaphore:
 	/* User mode accesses just cause a SIGSEGV */
 	if (error_code & PF_USER) {
+
+		/*
+		 * It's possible to have interrupts off here.
+		 */
+		local_irq_enable();
+
 		if (is_prefetch(regs, address, error_code))
 			return;
 
_

Patches currently in -mm which might be from rostedt@xxxxxxxxxxx are

origin.patch
rt-mutex-fix-stale-return-value.patch
rt-mutex-fix-chain-walk-early-wakeup-bug.patch
pi-futex-fix-exit-races-and-locking-problems.patch
futex-tidy-up-the-code.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux