- avr32-fix-output-constraints-in-asm-bitopsh.patch removed from -mm tree

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

 



The patch titled

     AVR32: Fix output constraints in asm/bitops.h

has been removed from the -mm tree.  Its filename is

     avr32-fix-output-constraints-in-asm-bitopsh.patch

This patch was dropped because it was folded into avr32-arch.patch

------------------------------------------------------
Subject: AVR32: Fix output constraints in asm/bitops.h
From: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>

When copying a few files from one nfs-mounted directory to another,
I suddenly saw this:

Unable to handle kernel paging request at virtual address 00100028
[ 1001.372000] pc = 9002bed0
[ 1001.376000] ptbr = 90438610 pgd = 10400c66 pte = 00000000
[ 1001.380000]
[ 1001.380000] Oops in arch/avr32/mm/fault.c::do_page_fault, line 247[#3]:
[ 1001.380000] Modules linked in:
[ 1001.380000] PC is at page_cache_readahead_adaptive+0x32/0x90a
[ 1001.380000] LR is at 0x63
[ 1001.380000] pc : [<9002bed0>]    lr : [<00000063>]    Not tainted
[ 1001.380000] sp : 90495d34  r12: 90240c68  r11: 90495df4
[ 1001.380000] r10: 90497870  r9 : 00000028  r8 : 00100028
[ 1001.380000] r7 : 90495d80  r6 : 00000063  r5 : 90495df4  r4 : 00000000
[ 1001.380000] r3 : 00000000  r2 : 00000064  r1 : 00000063  r0 : 90497870

caused by the following invalid code in page_cache_readahead_adaptive():

9002bec8:       d2 53           ssrf 0x5
9002beca:       70 09           ld.w r9,r8[0x0]
9002becc:       12 98           mov r8,r9
9002bece:       b5 c9           cbr r9,0x14
9002bed0:       f1 79 00 00     stcond r8[0],r9

This is an inline assembly block from test_and_clear_bit(). Here, r8
is used both as "old" and as the memory address of *p because "old"
isn't marked as an earlyclobber operand.

Fix this and similar bugs by making all similar output constraints in
asm/bitops.h earlyclobber.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/asm-avr32/bitops.h |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff -puN include/asm-avr32/bitops.h~avr32-fix-output-constraints-in-asm-bitopsh include/asm-avr32/bitops.h
--- a/include/asm-avr32/bitops.h~avr32-fix-output-constraints-in-asm-bitopsh
+++ a/include/asm-avr32/bitops.h
@@ -40,7 +40,7 @@ static inline void set_bit(int nr, volat
 			"	sbr	%0, %3\n"
 			"	stcond	%1, %0\n"
 			"	brne	1b"
-			: "=r"(tmp), "=o"(*p)
+			: "=&r"(tmp), "=o"(*p)
 			: "m"(*p), "i"(nr)
 			: "cc");
 	} else {
@@ -51,7 +51,7 @@ static inline void set_bit(int nr, volat
 			"	or	%0, %3\n"
 			"	stcond	%1, %0\n"
 			"	brne	1b"
-			: "=r"(tmp), "=o"(*p)
+			: "=&r"(tmp), "=o"(*p)
 			: "m"(*p), "r"(mask)
 			: "cc");
 	}
@@ -79,7 +79,7 @@ static inline void clear_bit(int nr, vol
 			"	cbr	%0, %3\n"
 			"	stcond	%1, %0\n"
 			"	brne	1b"
-			: "=r"(tmp), "=o"(*p)
+			: "=&r"(tmp), "=o"(*p)
 			: "m"(*p), "i"(nr)
 			: "cc");
 	} else {
@@ -90,7 +90,7 @@ static inline void clear_bit(int nr, vol
 			"	andn	%0, %3\n"
 			"	stcond	%1, %0\n"
 			"	brne	1b"
-			: "=r"(tmp), "=o"(*p)
+			: "=&r"(tmp), "=o"(*p)
 			: "m"(*p), "r"(mask)
 			: "cc");
 	}
@@ -117,7 +117,7 @@ static inline void change_bit(int nr, vo
 		"	eor	%0, %3\n"
 		"	stcond	%1, %0\n"
 		"	brne	1b"
-		: "=r"(tmp), "=o"(*p)
+		: "=&r"(tmp), "=o"(*p)
 		: "m"(*p), "r"(mask)
 		: "cc");
 }
@@ -144,7 +144,7 @@ static inline int test_and_set_bit(int n
 			"	sbr	%0, %4\n"
 			"	stcond	%1, %0\n"
 			"	brne	1b"
-			: "=r"(tmp), "=o"(*p), "=r"(old)
+			: "=&r"(tmp), "=o"(*p), "=&r"(old)
 			: "m"(*p), "i"(nr)
 			: "memory", "cc");
 	} else {
@@ -154,7 +154,7 @@ static inline int test_and_set_bit(int n
 			"	or	%0, %2, %4\n"
 			"	stcond	%1, %0\n"
 			"	brne	1b"
-			: "=r"(tmp), "=o"(*p), "=r"(old)
+			: "=&r"(tmp), "=o"(*p), "=&r"(old)
 			: "m"(*p), "r"(mask)
 			: "memory", "cc");
 	}
@@ -184,7 +184,7 @@ static inline int test_and_clear_bit(int
 			"	cbr	%0, %4\n"
 			"	stcond	%1, %0\n"
 			"	brne	1b"
-			: "=r"(tmp), "=o"(*p), "=r"(old)
+			: "=&r"(tmp), "=o"(*p), "=&r"(old)
 			: "m"(*p), "i"(nr)
 			: "memory", "cc");
 	} else {
@@ -195,7 +195,7 @@ static inline int test_and_clear_bit(int
 			"	andn	%0, %4\n"
 			"	stcond	%1, %0\n"
 			"	brne	1b"
-			: "=r"(tmp), "=o"(*p), "=r"(old)
+			: "=&r"(tmp), "=o"(*p), "=&r"(old)
 			: "m"(*p), "r"(mask)
 			: "memory", "cc");
 	}
@@ -223,7 +223,7 @@ static inline int test_and_change_bit(in
 		"	eor	%0, %2, %4\n"
 		"	stcond	%1, %0\n"
 		"	brne	1b"
-		: "=r"(tmp), "=o"(*p), "=r"(old)
+		: "=&r"(tmp), "=o"(*p), "=&r"(old)
 		: "m"(*p), "r"(mask)
 		: "memory", "cc");
 
@@ -239,7 +239,7 @@ static inline unsigned long __ffs(unsign
 
 	asm("brev %1\n\t"
 	    "clz %0,%1"
-	    : "=r"(result), "=r"(word)
+	    : "=r"(result), "=&r"(word)
 	    : "1"(word));
 	return result;
 }
_

Patches currently in -mm which might be from hskinnemoen@xxxxxxxxx are

origin.patch
avr32-arch.patch
avr32-fix-output-constraints-in-asm-bitopsh.patch
avr32-standardize-pxx_page-macros-fix.patch
avr32-rename-at32stk100x-atstk100x.patch
avr32-dont-leave-dbe-set-when-resetting-cpu.patch
avr32-make-prot_write-prot_exec-imply-prot_read.patch
avr32-remove-set_wmb.patch
avr32-use-parse_early_param.patch
avr32-fix-exported-headers.patch
avr32-fix-__const_udelay-overflow-bug.patch
remove-zone_dma-remains-from-avr32.patch
avr32-mtd-static-memory-controller-driver-try-2.patch
avr32-mtd-at49bv6416-platform-device-for-atstk1000.patch
directed-yield-cpu_relax-variants-for-spinlocks-and-rw-locks.patch
generic-ioremap_page_range-implementation.patch
generic-ioremap_page_range-implementation-fix.patch
generic-ioremap_page_range-implementation-nommu-fix.patch
generic-ioremap_page_range-flush_cache_vmap.patch
generic-ioremap_page_range-alpha-conversion.patch
generic-ioremap_page_range-avr32-conversion.patch
generic-ioremap_page_range-cris-conversion.patch
generic-ioremap_page_range-i386-conversion.patch
generic-ioremap_page_range-i386-conversion-fix.patch
generic-ioremap_page_range-m32r-conversion.patch
generic-ioremap_page_range-mips-conversion.patch
generic-ioremap_page_range-mips-conversion-fix.patch
generic-ioremap_page_range-parisc-conversion.patch
generic-ioremap_page_range-s390-conversion.patch
generic-ioremap_page_range-sh-conversion.patch
generic-ioremap_page_range-sh64-conversion.patch
generic-ioremap_page_range-x86_64-conversion.patch
generic-ioremap_page_range-x86_64-conversion-fix.patch
avr32-implement-kernel_execve.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