r3035 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches patches/series

Simon Horman horms@costa.debian.org
Wed, 11 May 2005 07:31:29 +0000


Author: horms
Date: 2005-05-11 07:31:27 +0000 (Wed, 11 May 2005)
New Revision: 3035

Added:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/arch-sparc64-kernel-ptrace-cont-bogosity.dpatch
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-i2c-sysfs-permisions.dpatch
Removed:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/0007-1.2086.dpatch
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/0025-1.2104.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-16
Log:
* drivers-i2c-sysfs-permisions.dpatch:
  I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers
  (Simon Horman)
 
* arch-sparc64-kernel-ptrace-cont-bogosity.dpatch:
  SPARC: Fix PTRACE_CONT bogosity


Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2005-05-11 02:05:18 UTC (rev 3034)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2005-05-11 07:31:27 UTC (rev 3035)
@@ -134,8 +134,15 @@
     (closes: #295725)
     Ref: http://lists.debian.org/debian-sparc/2005/04/msg00203.html
 
- -- Simon Horman <horms@debian.org>  Tue, 10 May 2005 17:11:46 +0900
+  * drivers-i2c-sysfs-permisions.dpatch:
+    I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers
+    (Simon Horman)
 
+  * arch-sparc64-kernel-ptrace-cont-bogosity.dpatch:
+    SPARC: Fix PTRACE_CONT bogosity
+
+ -- Simon Horman <horms@debian.org>  Wed, 11 May 2005 12:50:35 +0900
+
 kernel-source-2.6.8 (2.6.8-15) unstable; urgency=high
 
   * [Security] Fix race in radeon driver which can result

Deleted: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/0007-1.2086.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/0007-1.2086.dpatch	2005-05-11 02:05:18 UTC (rev 3034)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/0007-1.2086.dpatch	2005-05-11 07:31:27 UTC (rev 3035)
@@ -1,108 +0,0 @@
-# origin: khali (BitKeeper)
-# cset: 1.2086 (2.6) key=4233d0b0SP5VmIKcsKJIyhyjL8yZ1Q
-# URL: http://linux.bkbits.net:8080/linux-2.6/cset@4233d0b0SP5VmIKcsKJIyhyjL8yZ1Q
-# inclusion: upstream
-# descrition: [PATCH] fix amd64 2.6.11 oops on modprobe (saa7110)
-# revision date: Fri, 08 Apr 2005 14:50:07 +0900
-#
-# S rset: ChangeSet|1.2085..1.2086
-# I rset: drivers/media/video/saa7110.c|1.17..1.18
-#
-# Key:
-# S: Skipped  ChangeSet file only
-# O: Original Followed by Updated
-# U: Updated  Included with updated range of versions
-# I: Included Included verbatim
-# E: Excluded Excluded on request from user
-# D: Deleted  Manually deleted by subsequent user edit
-# R: Revised  Manually revised by subsequent user edit
-#
-#
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-#   2005/03/12 21:33:36-08:00 khali@linux-fr.org 
-#   [PATCH] fix amd64 2.6.11 oops on modprobe (saa7110)
-#   
-#   This is a rewrite of the saa7110_write_block function, which was plain
-#   broken in the case where the underlying adapter supports I2C_FUNC_I2C.
-#   It also includes related fixes which ensure that different parts of the
-#   driver agree on the number of registers the chip has.
-#   
-#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
-#   Signed-off-by: Chris Wright <chrisw@osdl.org>
-#   Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-# 
-# drivers/media/video/saa7110.c
-#   2005/03/11 01:06:09-08:00 khali@linux-fr.org +16 -17
-#   fix amd64 2.6.11 oops on modprobe (saa7110)
-# 
-#
-===== drivers/media/video/saa7110.c 1.17 vs 1.18 =====
---- 1.17/drivers/media/video/saa7110.c	2005-01-08 14:44:25 +09:00
-+++ 1.18/drivers/media/video/saa7110.c	2005-03-11 18:06:09 +09:00
-@@ -60,8 +60,10 @@ MODULE_PARM_DESC(debug, "Debug level (0-
- 
- #define	I2C_SAA7110		0x9C	/* or 0x9E */
- 
-+#define SAA7110_NR_REG		0x35
-+
- struct saa7110 {
--	unsigned char reg[54];
-+	u8 reg[SAA7110_NR_REG];
- 
- 	int norm;
- 	int input;
-@@ -95,31 +97,28 @@ saa7110_write_block (struct i2c_client *
- 		     unsigned int       len)
- {
- 	int ret = -1;
--	u8 reg = *data++;
-+	u8 reg = *data;		/* first register to write to */
- 
--	len--;
-+	/* Sanity check */
-+	if (reg + (len - 1) > SAA7110_NR_REG)
-+		return ret;
- 
- 	/* the saa7110 has an autoincrement function, use it if
- 	 * the adapter understands raw I2C */
- 	if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
- 		struct saa7110 *decoder = i2c_get_clientdata(client);
- 		struct i2c_msg msg;
--		u8 block_data[54];
- 
--		msg.len = 0;
--		msg.buf = (char *) block_data;
-+		msg.len = len;
-+		msg.buf = (char *) data;
- 		msg.addr = client->addr;
--		msg.flags = client->flags;
--		while (len >= 1) {
--			msg.len = 0;
--			block_data[msg.len++] = reg;
--			while (len-- >= 1 && msg.len < 54)
--				block_data[msg.len++] =
--				    decoder->reg[reg++] = *data++;
--			ret = i2c_transfer(client->adapter, &msg, 1);
--		}
-+		msg.flags = 0;
-+		ret = i2c_transfer(client->adapter, &msg, 1);
-+
-+		/* Cache the written data */
-+		memcpy(decoder->reg + reg, data + 1, len - 1);
- 	} else {
--		while (len-- >= 1) {
-+		for (++data, --len; len; len--) {
- 			if ((ret = saa7110_write(client, reg++,
- 						 *data++)) < 0)
- 				break;
-@@ -192,7 +191,7 @@ saa7110_selmux (struct i2c_client *clien
- 	return 0;
- }
- 
--static const unsigned char initseq[] = {
-+static const unsigned char initseq[1 + SAA7110_NR_REG] = {
- 	0, 0x4C, 0x3C, 0x0D, 0xEF, 0xBD, 0xF2, 0x03, 0x00,
- 	/* 0x08 */ 0xF8, 0xF8, 0x60, 0x60, 0x00, 0x86, 0x18, 0x90,
- 	/* 0x10 */ 0x00, 0x59, 0x40, 0x46, 0x42, 0x1A, 0xFF, 0xDA,

Deleted: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/0025-1.2104.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/0025-1.2104.dpatch	2005-05-11 02:05:18 UTC (rev 3034)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/0025-1.2104.dpatch	2005-05-11 07:31:27 UTC (rev 3035)
@@ -1,66 +0,0 @@
-# origin: kaber (BitKeeper)
-# cset: 1.2104 (2.6) key=423bba8brL9iqryqalMjl7qMjwdfsw
-# URL: http://linux.bkbits.net:8080/linux-2.6/cset@423bba8brL9iqryqalMjl7qMjwdfsw
-# inclusion: upstream
-# descrition: [PATCH] Fix crash while reading /proc/net/route
-# revision date: Fri, 08 Apr 2005 14:55:03 +0900
-#
-# S rset: ChangeSet|1.2103..1.2104
-# I rset: net/ipv4/fib_hash.c|1.36..1.37
-#
-# Key:
-# S: Skipped  ChangeSet file only
-# O: Original Followed by Updated
-# U: Updated  Included with updated range of versions
-# I: Included Included verbatim
-# E: Excluded Excluded on request from user
-# D: Deleted  Manually deleted by subsequent user edit
-# R: Revised  Manually revised by subsequent user edit
-#
-#
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-#   2005/03/18 21:37:15-08:00 kaber@trash.net 
-#   [PATCH] Fix crash while reading /proc/net/route
-#   
-#   [IPV4]: Fix crash while reading /proc/net/route caused by stale pointers
-#   
-#   Signed-off-by: Patrick McHardy <kaber@trash.net>
-#   Signed-off-by: David S. Miller <davem@davemloft.net>
-#   Signed-off-by: Chris Wright <chrisw@osdl.org>
-#   Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-# 
-# net/ipv4/fib_hash.c
-#   2005/03/16 15:58:42-08:00 kaber@trash.net +11 -1
-#   Fix crash while reading /proc/net/route
-# 
-#
-===== net/ipv4/fib_hash.c 1.36 vs 1.37 =====
---- 1.36/net/ipv4/fib_hash.c	2005-02-28 04:07:04 +09:00
-+++ 1.37/net/ipv4/fib_hash.c	2005-03-17 08:58:42 +09:00
-@@ -919,13 +919,23 @@ out:
- 	return fa;
- }
- 
-+static struct fib_alias *fib_get_idx(struct seq_file *seq, loff_t pos)
-+{
-+	struct fib_alias *fa = fib_get_first(seq);
-+
-+	if (fa)
-+		while (pos && (fa = fib_get_next(seq)))
-+			--pos;
-+	return pos ? NULL : fa;
-+}
-+
- static void *fib_seq_start(struct seq_file *seq, loff_t *pos)
- {
- 	void *v = NULL;
- 
- 	read_lock(&fib_hash_lock);
- 	if (ip_fib_main_table)
--		v = *pos ? fib_get_next(seq) : SEQ_START_TOKEN;
-+		v = *pos ? fib_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
- 	return v;
- }
- 

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/arch-sparc64-kernel-ptrace-cont-bogosity.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/arch-sparc64-kernel-ptrace-cont-bogosity.dpatch	2005-05-11 02:05:18 UTC (rev 3034)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/arch-sparc64-kernel-ptrace-cont-bogosity.dpatch	2005-05-11 07:31:27 UTC (rev 3035)
@@ -0,0 +1,106 @@
+# origin: davem (BitKeeper)
+# cset: 1.2131 (2.6) key=4272d975TlaRBx1x175qg9WmMJoj_w
+# URL: http://linux.bkbits.net:8080/linux-2.6/cset@4272d975TlaRBx1x175qg9WmMJoj_w
+# inclusion: upstream
+# descrition: [PATCH] sparc: Fix PTRACE_CONT bogosity
+# revision date: Wed, 11 May 2005 11:59:09 +0900
+#
+# S rset: ChangeSet|1.2130..1.2131
+# I rset: arch/sparc64/kernel/ptrace.c|1.24..1.25
+# I rset: arch/sparc/kernel/ptrace.c|1.20..1.21
+#
+# Key:
+# S: Skipped  ChangeSet file only
+# O: Original Followed by Updated
+# U: Updated  Included with updated range of versions
+# I: Included Included verbatim
+# E: Excluded Excluded on request from user
+# D: Deleted  Manually deleted by subsequent user edit
+# R: Revised  Manually revised by subsequent user edit
+#
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2005/04/29 18:03:49-07:00 davem@davemloft.net 
+#   [PATCH] sparc: Fix PTRACE_CONT bogosity
+#   
+#   SunOS aparently had this weird PTRACE_CONT semantic which
+#   we copied.  If the addr argument is something other than
+#   1, it sets the process program counter to whatever that
+#   value is.
+#   
+#   This is different from every other Linux architecture, which
+#   don't do anything with the addr and data args.
+#   
+#   This difference in particular breaks the Linux native GDB support
+#   for fork and vfork tracing on sparc and sparc64.
+#   
+#   There is no interest in running SunOS binaries using this weird
+#   PTRACE_CONT behavior, so just delete it so we behave like other
+#   platforms do.
+#   
+#   From: "David S. Miller" <davem@davemloft.net>
+#   Signed-off-by: Chris Wright <chrisw@osdl.org>
+#   Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+# 
+# arch/sparc64/kernel/ptrace.c
+#   2005/04/16 20:52:21-07:00 davem@davemloft.net +0 -19
+#   sparc: Fix PTRACE_CONT bogosity
+# 
+# arch/sparc/kernel/ptrace.c
+#   2005/04/13 22:37:33-07:00 davem@davemloft.net +0 -12
+#   sparc: Fix PTRACE_CONT bogosity
+# 
+#
+===== arch/sparc64/kernel/ptrace.c 1.24 vs 1.25 =====
+--- 1.24/arch/sparc64/kernel/ptrace.c	2005-02-11 12:06:44 +09:00
++++ 1.25/arch/sparc64/kernel/ptrace.c	2005-04-17 12:52:21 +09:00
+@@ -514,25 +514,6 @@ asmlinkage void do_ptrace(struct pt_regs
+ 			pt_error_return(regs, EIO);
+ 			goto out_tsk;
+ 		}
+-		if (addr != 1) {
+-			unsigned long pc_mask = ~0UL;
+-
+-			if ((child->thread_info->flags & _TIF_32BIT) != 0)
+-				pc_mask = 0xffffffff;
+-
+-			if (addr & 3) {
+-				pt_error_return(regs, EINVAL);
+-				goto out_tsk;
+-			}
+-#ifdef DEBUG_PTRACE
+-			printk ("Original: %016lx %016lx\n",
+-				child->thread_info->kregs->tpc,
+-				child->thread_info->kregs->tnpc);
+-			printk ("Continuing with %016lx %016lx\n", addr, addr+4);
+-#endif
+-			child->thread_info->kregs->tpc = (addr & pc_mask);
+-			child->thread_info->kregs->tnpc = ((addr + 4) & pc_mask);
+-		}
+ 
+ 		if (request == PTRACE_SYSCALL) {
+ 			set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+===== arch/sparc/kernel/ptrace.c 1.20 vs 1.21 =====
+--- 1.20/arch/sparc/kernel/ptrace.c	2005-02-11 12:06:44 +09:00
++++ 1.21/arch/sparc/kernel/ptrace.c	2005-04-14 14:37:33 +09:00
+@@ -531,18 +531,6 @@ asmlinkage void do_ptrace(struct pt_regs
+ 			pt_error_return(regs, EIO);
+ 			goto out_tsk;
+ 		}
+-		if (addr != 1) {
+-			if (addr & 3) {
+-				pt_error_return(regs, EINVAL);
+-				goto out_tsk;
+-			}
+-#ifdef DEBUG_PTRACE
+-			printk ("Original: %08lx %08lx\n", child->thread.kregs->pc, child->thread.kregs->npc);
+-			printk ("Continuing with %08lx %08lx\n", addr, addr+4);
+-#endif
+-			child->thread.kregs->pc = addr;
+-			child->thread.kregs->npc = addr + 4;
+-		}
+ 
+ 		if (request == PTRACE_SYSCALL)
+ 			set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-i2c-sysfs-permisions.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-i2c-sysfs-permisions.dpatch	2005-05-11 02:05:18 UTC (rev 3034)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-i2c-sysfs-permisions.dpatch	2005-05-11 07:31:27 UTC (rev 3035)
@@ -0,0 +1,77 @@
+# origin: khali (BitKeeper)
+# cset: 1.2128 (2.6) key=4272d894uIuZustfsRpE8YmuC4tydA
+# URL: http://linux.bkbits.net:8080/linux-2.6/cset@4272d894uIuZustfsRpE8YmuC4tydA
+# inclusion: upstream
+# descrition: [PATCH] I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers
+# revision date: Wed, 11 May 2005 11:58:03 +0900
+#
+# S rset: ChangeSet|1.2127..1.2128
+# I rset: drivers/i2c/chips/via686a.c|1.38..1.39
+# D rset: fs/partitions/msdos.c|1.26..1.27
+# I rset: drivers/i2c/chips/it87.c|1.53..1.54
+#
+# Key:
+# S: Skipped  ChangeSet file only
+# O: Original Followed by Updated
+# U: Updated  Included with updated range of versions
+# I: Included Included verbatim
+# E: Excluded Excluded on request from user
+# D: Deleted  Manually deleted by subsequent user edit
+# R: Revised  Manually revised by subsequent user edit
+#
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2005/04/29 18:00:04-07:00 khali@linux-fr.org 
+#   [PATCH] I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers
+#   
+#   The it87 and via686a hardware monitoring drivers each create a sysfs
+#   file named "alarms" in R/W mode, while they should really create it in
+#   read-only mode. Since we don't provide a store function for these files,
+#   write attempts to these files will do something undefined (I guess) and
+#   bad (I am sure). My own try resulted in a locked terminal (where I
+#   attempted the write) and a 100% CPU load until next reboot.
+#   
+#   As a side note, wouldn't it make sense to check, when creating sysfs
+#   files, that readable files have a non-NULL show method, and writable
+#   files have a non-NULL store method? I know drivers are not supposed to
+#   do stupid things, but there is already a BUG_ON for several conditions
+#   in sysfs_create_file, so maybe we could add two more?
+#   
+#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
+#   Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+# 
+# drivers/i2c/chips/via686a.c
+#   2005/04/02 11:12:55-08:00 khali@linux-fr.org +1 -1
+#   I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers
+# 
+# drivers/i2c/chips/it87.c
+#   2005/04/02 11:12:46-08:00 khali@linux-fr.org +1 -1
+#   I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers
+# 
+#
+===== drivers/i2c/chips/via686a.c 1.38 vs 1.39 =====
+--- 1.38/drivers/i2c/chips/via686a.c	2005-02-03 15:34:47 +09:00
++++ 1.39/drivers/i2c/chips/via686a.c	2005-04-03 04:12:55 +09:00
+@@ -554,7 +554,7 @@ static ssize_t show_alarms(struct device
+ 	struct via686a_data *data = via686a_update_device(dev);
+ 	return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms));
+ }
+-static DEVICE_ATTR(alarms, S_IRUGO | S_IWUSR, show_alarms, NULL);
++static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
+ 
+ /* The driver. I choose to use type i2c_driver, as at is identical to both
+    smbus_driver and isa_driver, and clients could be of either kind */
+===== drivers/i2c/chips/it87.c 1.53 vs 1.54 =====
+--- 1.53/drivers/i2c/chips/it87.c	2005-02-03 15:34:21 +09:00
++++ 1.54/drivers/i2c/chips/it87.c	2005-04-03 04:12:46 +09:00
+@@ -631,7 +631,7 @@ static ssize_t show_alarms(struct device
+ 	struct it87_data *data = it87_update_device(dev);
+ 	return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms));
+ }
+-static DEVICE_ATTR(alarms, S_IRUGO | S_IWUSR, show_alarms, NULL);
++static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
+ 
+ static ssize_t
+ show_vrm_reg(struct device *dev, char *buf)

Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-16
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-16	2005-05-11 02:05:18 UTC (rev 3034)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-16	2005-05-11 07:31:27 UTC (rev 3035)
@@ -30,3 +30,5 @@
 + fs-jdb-slow-leak.dpatch
 + net-ipv4-icmp-quench.dpatch
 + sparc64-sunsu-init.dpatch
++ arch-sparc64-kernel-ptrace-cont-bogosity.dpatch
++ drivers-i2c-sysfs-permisions.dpatch