]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more patches checked into the queue
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 10 Feb 2006 04:59:29 +0000 (20:59 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 10 Feb 2006 04:59:29 +0000 (20:59 -0800)
queue/ppc32-put-cache-flush-routines-back-into-.relocate_code-section.patch [new file with mode: 0644]
queue/s390-klibc-build-fix-for-2.6.15.patch [new file with mode: 0644]
queue/series [new file with mode: 0644]
queue/shmdt-cannot-detach-not-alined-shm-segment-cleanly.patch [new file with mode: 0644]

diff --git a/queue/ppc32-put-cache-flush-routines-back-into-.relocate_code-section.patch b/queue/ppc32-put-cache-flush-routines-back-into-.relocate_code-section.patch
new file mode 100644 (file)
index 0000000..fefcce0
--- /dev/null
@@ -0,0 +1,82 @@
+From stable-bounces@linux.kernel.org Mon Jan 30 09:44:07 2006
+Date: Mon, 30 Jan 2006 10:43:50 -0700
+From: Tom Rini <trini@kernel.crashing.org>
+To: stable@kernel.org
+Message-ID: <20060130174350.GG22672@smtp.west.cox.net>
+Content-Disposition: inline
+Cc: 
+Subject: ppc32: Put cache flush routines back into .relocate_code section
+
+[PATCH] ppc32: Put cache flush routines back into .relocate_code section
+
+In 2.6.14, we had the following definition of _GLOBAL() in
+include/asm-ppc/processor.h:
+
+#define _GLOBAL(n)\
+        .stabs __stringify(n:F-1),N_FUN,0,0,n;\
+        .globl n;\
+n:
+
+In 2.6.15, as part of the great powerpc merge, we moved this definition to
+include/asm-powerpc/ppc_asm.h, where it appears (to 32-bit code) as:
+
+#define _GLOBAL(n)      \
+        .text;          \
+        .stabs __stringify(n:F-1),N_FUN,0,0,n;\
+        .globl n;       \
+n:
+
+Mostly, this is fine.  However, we also have the following, in
+arch/ppc/boot/common/util.S:
+
+        .section ".relocate_code","xa"
+[...]
+_GLOBAL(flush_instruction_cache)
+[...]
+_GLOBAL(flush_data_cache)
+[...]
+
+The addition of the .text section definition in the definition of
+_GLOBAL overrides the .relocate_code section definition.  As a result,
+these two functions don't end up in .relocate_code, so they don't get
+relocated correctly, and the boot fails.
+
+There's another suspicious-looking usage at kernel/swsusp.S:37 that
+someone should look into.  I did not exhaustively search the source
+tree, though.
+
+The following is the minimal patch that fixes the immediate problem.
+I could easily be convinced that the _GLOBAL definition should be
+modified to remove the ".text;" line either instead of, or in addition
+to, this fix.
+
+Signed-off-by: Paul Janzen <pcj@linux.sez.to>
+Signed-off-by: Paul Mackerras <paulus@samba.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/ppc/boot/common/util.S |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- linux-2.6.15.3.orig/arch/ppc/boot/common/util.S
++++ linux-2.6.15.3/arch/ppc/boot/common/util.S
+@@ -234,7 +234,8 @@ udelay:
+  * First, flush the data cache in case it was enabled and may be
+  * holding instructions for copy back.
+  */
+-_GLOBAL(flush_instruction_cache)
++        .globl flush_instruction_cache
++flush_instruction_cache:
+       mflr    r6
+       bl      flush_data_cache
+@@ -279,7 +280,8 @@ _GLOBAL(flush_instruction_cache)
+  * Flush data cache
+  * Do this by just reading lots of stuff into the cache.
+  */
+-_GLOBAL(flush_data_cache)
++        .globl flush_data_cache
++flush_data_cache:
+       lis     r3,cache_flush_buffer@h
+       ori     r3,r3,cache_flush_buffer@l
+       li      r4,NUM_CACHE_LINES
diff --git a/queue/s390-klibc-build-fix-for-2.6.15.patch b/queue/s390-klibc-build-fix-for-2.6.15.patch
new file mode 100644 (file)
index 0000000..cb933db
--- /dev/null
@@ -0,0 +1,43 @@
+From stable-bounces@linux.kernel.org Wed Feb  1 02:41:48 2006
+Date: Wed, 1 Feb 2006 11:41:10 +0100
+From: maximilian attems <maks@sternwelten.at>
+To: schwidefsky@de.ibm.com
+Message-ID: <20060201104110.GA5584@nancy>
+Content-Disposition: inline
+Cc: Bastian Blank <waldi@debian.org>, klibc@zytor.com, stable@kernel.org,
+        linux-390@vm.marist.edu
+Subject: s390 klibc build fix for 2.6.15
+
+klibc doesn't currently build on s390 since
+commit 1e8e338325fa0f2bd5c1c800086e900cf188d2cd
+
+belows patch adds some kernel ifdef for the newly added section.
+
+Signed-off-by: maximilian attems <maks@sternwelten.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ include/asm-s390/setup.h |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- linux-2.6.15.3.orig/include/asm-s390/setup.h
++++ linux-2.6.15.3/include/asm-s390/setup.h
+@@ -67,6 +67,8 @@ extern unsigned int console_irq;
+ #define SET_CONSOLE_3215      do { console_mode = 2; } while (0)
+ #define SET_CONSOLE_3270      do { console_mode = 3; } while (0)
++#ifdef __KERNEL__
++
+ struct ipl_list_header {
+       u32 length;
+       u8  reserved[3];
+@@ -114,6 +116,8 @@ extern u16 ipl_devno;
+                                IPL_PARMBLOCK_ORIGIN)
+ #define IPL_PARMBLOCK_SIZE    (IPL_PARMBLOCK_START->hdr.length)
++#endif /* __KERNEL__ */
++
+ #else 
+ #ifndef __s390x__
diff --git a/queue/series b/queue/series
new file mode 100644 (file)
index 0000000..ec40dc8
--- /dev/null
@@ -0,0 +1,3 @@
+ppc32-put-cache-flush-routines-back-into-.relocate_code-section.patch
+s390-klibc-build-fix-for-2.6.15.patch
+shmdt-cannot-detach-not-alined-shm-segment-cleanly.patch
diff --git a/queue/shmdt-cannot-detach-not-alined-shm-segment-cleanly.patch b/queue/shmdt-cannot-detach-not-alined-shm-segment-cleanly.patch
new file mode 100644 (file)
index 0000000..2d826c7
--- /dev/null
@@ -0,0 +1,45 @@
+From stable-bounces@linux.kernel.org Thu Feb  9 02:04:21 2006
+Message-Id: <200602091003.k19A3frh008321@shell0.pdx.osdl.net>
+To: kamezawa.hiroyu@jp.fujitsu.com, hugh@veritas.com, manfred@colorfullife.com,
+        stable@kernel.org, mm-commits@vger.kernel.org
+From: akpm@osdl.org
+Date: Thu, 09 Feb 2006 02:03:17 -0800
+Cc: 
+Subject: shmdt cannot detach not-alined shm segment cleanly.
+
+
+From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+
+sys_shmdt() can manage shm segments which are covered by multiple vmas.  (This
+can happen when a user uses mprotect() after shmat().)
+
+This works well if shm is aligned to PAGE_SIZE, but if not, the last
+segment cannot be detached.  It is because a comparison in sys_shmdt()
+
+       (vma->vm_end - addr) < size
+               addr == return address of shmat()
+               size == shmsize, argments to shmget()
+
+size should be aligned to PAGE_SIZE before being compared with vma->vm_end,
+which is aligned.
+
+Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+Cc: Manfred Spraul <manfred@colorfullife.com>
+Cc: Hugh Dickins <hugh@veritas.com>
+Cc: <stable@kernel.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ ipc/shm.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- linux-2.6.15.3.orig/ipc/shm.c
++++ linux-2.6.15.3/ipc/shm.c
+@@ -863,6 +863,7 @@ asmlinkage long sys_shmdt(char __user *s
+        * could possibly have landed at. Also cast things to loff_t to
+        * prevent overflows and make comparisions vs. equal-width types.
+        */
++      size = PAGE_ALIGN(size);
+       while (vma && (loff_t)(vma->vm_end - addr) <= size) {
+               next = vma->vm_next;