[kernel] r8208 - in dists/sid/linux-2.6/debian: . patches/bugfix

maximilian attems maks-guest at alioth.debian.org
Thu Jan 25 09:58:20 CET 2007


Author: maks-guest
Date: Thu Jan 25 09:58:20 2007
New Revision: 8208

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/don-t-leak-nt-bit-into-next-task.patch
   dists/sid/linux-2.6/debian/patches/bugfix/ib-srp-fix-fmr-mapping-for-32-bit-kernels-and-addresses-above-4g.patch
   dists/sid/linux-2.6/debian/patches/bugfix/scsi-add-missing-cdb-clearing-in-scsi_execute.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
Log:
unclear if 2.6.18.7 comes out,
push the patches that were queued for it.


Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	(original)
+++ dists/sid/linux-2.6/debian/changelog	Thu Jan 25 09:58:20 2007
@@ -1,3 +1,12 @@
+linux-2.6 (2.6.18.dfsg.1-10) unstable; urgency=low
+
+  * Add patches out of stable queue 2.6.18
+   - [amd64] Don't leak NT bit into next task
+   - IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G
+   - SCSI: add missing cdb clearing in scsi_execute()
+
+ -- maximilian attems <maks at stro.at>  Thu, 25 Jan 2007 09:52:09 +0100
+
 linux-2.6 (2.6.18.dfsg.1-9) unstable; urgency=low
 
   [ Martin Michlmayr ]

Added: dists/sid/linux-2.6/debian/patches/bugfix/don-t-leak-nt-bit-into-next-task.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/don-t-leak-nt-bit-into-next-task.patch	Thu Jan 25 09:58:20 2007
@@ -0,0 +1,73 @@
+From 658fdbef66e5e9be79b457edc2cbbb3add840aa9 Mon Sep 17 00:00:00 2001
+From: Chuck Ebbert <76306.1226 at compuserve.com>
+To: linux-stable <stable at kernel.org>
+Message-ID: <200612152142_MC3-1-D531-A859 at compuserve.com>
+Date: Tue, 26 Sep 2006 10:52:41 +0200
+Subject: Don't leak NT bit into next task
+
+From: Andi Kleen <ak at suse.de>
+
+SYSENTER can cause a NT to be set which might cause crashes on the IRET
+in the next task.
+
+Following similar i386 patch from Linus.
+
+Signed-off-by: Andi Kleen <ak at suse.de>
+[backport from Chuck Ebbert]
+Signed-off-by: Chuck Ebbert <76306.1226 at compuserve.com>
+Signed-off-by: Chris Wright <chrisw at sous-sol.org>
+---
+ arch/x86_64/kernel/entry.S   |    4 ++++
+ arch/x86_64/kernel/setup64.c |    4 ++++
+ include/asm-x86_64/system.h  |    5 +++--
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+--- linux-2.6.18.6.orig/arch/x86_64/kernel/entry.S
++++ linux-2.6.18.6/arch/x86_64/kernel/entry.S
+@@ -146,6 +146,10 @@
+ /* rdi:	prev */	
+ ENTRY(ret_from_fork)
+ 	CFI_DEFAULT_STACK
++	push kernel_eflags(%rip)
++	CFI_ADJUST_CFA_OFFSET 4
++	popf				# reset kernel eflags
++	CFI_ADJUST_CFA_OFFSET -4
+ 	call schedule_tail
+ 	GET_THREAD_INFO(%rcx)
+ 	testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),threadinfo_flags(%rcx)
+--- linux-2.6.18.6.orig/arch/x86_64/kernel/setup64.c
++++ linux-2.6.18.6/arch/x86_64/kernel/setup64.c
+@@ -178,6 +178,8 @@ void __cpuinit check_efer(void)
+         }       
+ }
+ 
++unsigned long kernel_eflags;
++
+ /*
+  * cpu_init() initializes state that is per-CPU. Some data is already
+  * initialized (naturally) in the bootstrap process, such as the GDT
+@@ -290,4 +292,6 @@ void __cpuinit cpu_init (void)
+ 	set_debugreg(0UL, 7);
+ 
+ 	fpu_init(); 
++
++	raw_local_save_flags(kernel_eflags);
+ }
+--- linux-2.6.18.6.orig/include/asm-x86_64/system.h
++++ linux-2.6.18.6/include/asm-x86_64/system.h
+@@ -14,12 +14,13 @@
+ #define __RESTORE(reg,offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t"
+ 
+ /* frame pointer must be last for get_wchan */
+-#define SAVE_CONTEXT    "pushq %%rbp ; movq %%rsi,%%rbp\n\t"
+-#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp\n\t"
++#define SAVE_CONTEXT    "pushf ; pushq %%rbp ; movq %%rsi,%%rbp\n\t"
++#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp ; popf\t"
+ 
+ #define __EXTRA_CLOBBER  \
+ 	,"rcx","rbx","rdx","r8","r9","r10","r11","r12","r13","r14","r15"
+ 
++/* Save restore flags to clear handle leaking NT */
+ #define switch_to(prev,next,last) \
+ 	asm volatile(SAVE_CONTEXT						    \
+ 		     "movq %%rsp,%P[threadrsp](%[prev])\n\t" /* save RSP */	  \

Added: dists/sid/linux-2.6/debian/patches/bugfix/ib-srp-fix-fmr-mapping-for-32-bit-kernels-and-addresses-above-4g.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/ib-srp-fix-fmr-mapping-for-32-bit-kernels-and-addresses-above-4g.patch	Thu Jan 25 09:58:20 2007
@@ -0,0 +1,51 @@
+From stable-bounces at linux.kernel.org  Fri Dec 15 21:04:20 2006
+To: stable at kernel.org
+From: Roland Dreier <rdreier at cisco.com>
+Date: Fri, 15 Dec 2006 20:58:14 -0800
+Message-ID: <adaslfgigih.fsf at cisco.com>
+Subject: IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G
+
+struct srp_device.fmr_page_mask was unsigned long, which means that
+the top part of addresses above 4G was being chopped off on 32-bit
+architectures.  Of course nothing good happens when data from SRP
+targets is DMAed to the wrong place.
+
+Fix this by changing fmr_page_mask to u64, to match the addresses
+actually used by IB devices.
+
+Thanks to Brian Cain <Brian.Cain at ge.com> and David McMillen
+<davem at systemfabricworks.com> for help diagnosing the bug and testing
+the fix.
+
+Signed-off-by: Roland Dreier <rolandd at cisco.com>
+Signed-off-by: Chris Wright <chrisw at sous-sol.org>
+---
+I just asked Linus to pull this.  It fixes nasty corruption/crash
+problems on 32-bit systems with > 4G of memory.
+
+ drivers/infiniband/ulp/srp/ib_srp.c |    2 +-
+ drivers/infiniband/ulp/srp/ib_srp.h |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.18.6.orig/drivers/infiniband/ulp/srp/ib_srp.c
++++ linux-2.6.18.6/drivers/infiniband/ulp/srp/ib_srp.c
+@@ -1851,7 +1851,7 @@ static void srp_add_one(struct ib_device
+ 	 */
+ 	srp_dev->fmr_page_shift = max(9, ffs(dev_attr->page_size_cap) - 1);
+ 	srp_dev->fmr_page_size  = 1 << srp_dev->fmr_page_shift;
+-	srp_dev->fmr_page_mask  = ~((unsigned long) srp_dev->fmr_page_size - 1);
++	srp_dev->fmr_page_mask  = ~((u64) srp_dev->fmr_page_size - 1);
+ 
+ 	INIT_LIST_HEAD(&srp_dev->dev_list);
+ 
+--- linux-2.6.18.6.orig/drivers/infiniband/ulp/srp/ib_srp.h
++++ linux-2.6.18.6/drivers/infiniband/ulp/srp/ib_srp.h
+@@ -87,7 +87,7 @@ struct srp_device {
+ 	struct ib_fmr_pool     *fmr_pool;
+ 	int			fmr_page_shift;
+ 	int			fmr_page_size;
+-	unsigned long		fmr_page_mask;
++	u64			fmr_page_mask;
+ };
+ 
+ struct srp_host {

Added: dists/sid/linux-2.6/debian/patches/bugfix/scsi-add-missing-cdb-clearing-in-scsi_execute.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/scsi-add-missing-cdb-clearing-in-scsi_execute.patch	Thu Jan 25 09:58:20 2007
@@ -0,0 +1,33 @@
+From stable-bounces at linux.kernel.org  Sat Dec 16 03:08:38 2006
+Date: Sat, 16 Dec 2006 20:02:32 +0900
+From: Tejun Heo <htejun at gmail.com>
+To: jens.axboe at oracle.com, dougg at torque.net, linux-ide at vger.kernel.org,         linux-scsi at vger.kernel.org, stable at kernel.org
+Message-ID: <20061216110232.GF5400 at htj.dyndns.org>
+Subject: SCSI: add missing cdb clearing in scsi_execute()
+
+Clear-garbage-after-CDB patch missed scsi_execute() and it causes some
+ODDs (HL-DT-ST DVD-RAM GSA-H30N) choke during SCSI scan.  Note that
+this patch is only for -stable.  There is another more reliable fix
+for this problem proposed for devel tree.
+
+http://thread.gmane.org/gmane.linux.ide/14605/focus=14605
+
+Signed-off-by: Tejun Heo <htejun at gmail.com>
+Cc: Jens Axboe <jens.axboe at oracle.com>
+Cc: Douglas Gilbert <dougg at torque.net>
+Signed-off-by: Chris Wright <chrisw at sous-sol.org>
+
+---
+ drivers/scsi/scsi_lib.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- linux-2.6.18.6.orig/drivers/scsi/scsi_lib.c
++++ linux-2.6.18.6/drivers/scsi/scsi_lib.c
+@@ -191,6 +191,7 @@ int scsi_execute(struct scsi_device *sde
+ 		goto out;
+ 
+ 	req->cmd_len = COMMAND_SIZE(cmd[0]);
++	memset(req->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */
+ 	memcpy(req->cmd, cmd, req->cmd_len);
+ 	req->sense = sense;
+ 	req->sense_len = 0;



More information about the Kernel-svn-changes mailing list