Patch "powerpc/hw_brk: Fix off by one error when validating DAWR region end" has been added to the 3.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    powerpc/hw_brk: Fix off by one error when validating DAWR region end

to the 3.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-hw_brk-fix-off-by-one-error-when-validating-dawr-region-end.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From e2a800beaca1f580945773e57d1a0e7cd37b1056 Mon Sep 17 00:00:00 2001
From: Michael Neuling <mikey@xxxxxxxxxxx>
Date: Mon, 1 Jul 2013 14:19:50 +1000
Subject: powerpc/hw_brk: Fix off by one error when validating DAWR region end

From: Michael Neuling <mikey@xxxxxxxxxxx>

commit e2a800beaca1f580945773e57d1a0e7cd37b1056 upstream.

The Data Address Watchpoint Register (DAWR) on POWER8 can take a 512
byte range but this range must not cross a 512 byte boundary.

Unfortunately we were off by one when calculating the end of the region,
hence we were not allowing some breakpoint regions which were actually
valid.  This fixes this error.

Signed-off-by: Michael Neuling <mikey@xxxxxxxxxxx>
Reported-by: Edjunior Barbosa Machado <emachado@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 arch/powerpc/kernel/hw_breakpoint.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/powerpc/kernel/hw_breakpoint.c
+++ b/arch/powerpc/kernel/hw_breakpoint.c
@@ -176,7 +176,7 @@ int arch_validate_hwbkpt_settings(struct
 		length_max = 512 ; /* 64 doublewords */
 		/* DAWR region can't cross 512 boundary */
 		if ((bp->attr.bp_addr >> 10) != 
-		    ((bp->attr.bp_addr + bp->attr.bp_len) >> 10))
+		    ((bp->attr.bp_addr + bp->attr.bp_len - 1) >> 10))
 			return -EINVAL;
 	}
 	if (info->len >


Patches currently in stable-queue which might be from mikey@xxxxxxxxxxx are

queue-3.10/powerpc-tm-fix-writing-top-half-of-msr-on-32-bit-signals.patch
queue-3.10/powerpc-tm-fix-return-of-active-64bit-signals.patch
queue-3.10/powerpc-tm-fix-return-of-32bit-rt-signals-to-active-transactions.patch
queue-3.10/powerpc-tm-fix-restoration-of-msr-on-32bit-signal-return.patch
queue-3.10/powerpc-hw_brk-fix-clearing-of-extraneous-irq.patch
queue-3.10/powerpc-hw_brk-fix-off-by-one-error-when-validating-dawr-region-end.patch
queue-3.10/powerpc-hw_brk-fix-setting-of-length-for-exact-mode-breakpoints.patch
queue-3.10/powerpc-tm-fix-32-bit-non-rt-signals.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]