From: Greg Kroah-Hartman Date: Fri, 10 Feb 2006 04:59:29 +0000 (-0800) Subject: more patches checked into the queue X-Git-Tag: v2.6.15.5~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d99a8cf720819e851fca7f00f37fac7da1c517a;p=thirdparty%2Fkernel%2Fstable-queue.git more patches checked into the queue --- 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 index 00000000000..fefcce0dd26 --- /dev/null +++ b/queue/ppc32-put-cache-flush-routines-back-into-.relocate_code-section.patch @@ -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 +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 +Signed-off-by: Paul Mackerras +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..cb933db1ba8 --- /dev/null +++ b/queue/s390-klibc-build-fix-for-2.6.15.patch @@ -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 +To: schwidefsky@de.ibm.com +Message-ID: <20060201104110.GA5584@nancy> +Content-Disposition: inline +Cc: Bastian Blank , 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 +Signed-off-by: Greg Kroah-Hartman + + +--- + 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 index 00000000000..ec40dc81992 --- /dev/null +++ b/queue/series @@ -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 index 00000000000..2d826c7f9bf --- /dev/null +++ b/queue/shmdt-cannot-detach-not-alined-shm-segment-cleanly.patch @@ -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 + +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 +Cc: Manfred Spraul +Cc: Hugh Dickins +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + 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; +