Skip to contentSkip to conversation

2.6.23-rc3-mm1

PATCH In review Andrew Morton 58 participants 208 messages Aug 22, 2007 – Sep 17, 2007 Page 2 of 2

Subsystems (21)
lore
Share & tools
lore
#173 lore raw

PATCH 1/1 remove parport_device_num()

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
+sysctl-parport-remove-binary-paths.patch
...
More sysctl work
...

parport_device_num() is no longer used.

---

 Documentation/parport-lowlevel.txt |   29 +++--------------------------
 drivers/parport/daisy.c            |   29 -----------------------------
 include/linux/parport.h            |    1 -
 3 files changed, 3 insertions(+), 56 deletions(-)

0066510df2b5d4972cfd6a4450af8b82c763adfd

Documentation/parport-lowlevel.txt +3 -26
index 8f23024..265fcdc 100644
@@ -25,7 +25,6 @@ Global functions:
   parport_open
   parport_close
   parport_device_id
-  parport_device_num
   parport_device_coords
   parport_find_class
   parport_find_device
@@ -735,7 +734,7 @@ NULL is returned.
 
 SEE ALSO
 
-parport_register_device, parport_device_num
+parport_register_device
 
 parport_close - unregister device for particular device number
 -------------
@@ -787,29 +786,7 @@ Many devices have ill-formed IEEE 1284 Device IDs.
 
 SEE ALSO
 
-parport_find_class, parport_find_device, parport_device_num
-
-parport_device_num - convert device coordinates to device number
-------------------
-
-SYNOPSIS
-
-#include <linux/parport.h>
-
-int parport_device_num (int parport, int mux, int daisy);
-
-DESCRIPTION
-
-Convert between device coordinates (port, multiplexor, daisy chain
-address) and device number (zero-based).
-
-RETURN VALUE
-
-Device number, or -1 if no device at given coordinates.
-
-SEE ALSO
-
-parport_device_coords, parport_open, parport_device_id
+parport_find_class, parport_find_device
 
 parport_device_coords - convert device number to device coordinates
 ------------------
@@ -833,7 +810,7 @@ Zero on success, in which case the coordinates are (*parport, *mux,
 
 SEE ALSO
 
-parport_device_num, parport_open, parport_device_id
+parport_open, parport_device_id
 
 parport_find_class - find a device by its class
 ------------------
drivers/parport/daisy.c +0 -29
index ff9f344..5bbff20 100644
@@ -275,35 +275,6 @@ void parport_close(struct pardevice *dev)
 	parport_unregister_device(dev);
 }
 
-/**
- *	parport_device_num - convert device coordinates
- *	@parport: parallel port number
- *	@mux: multiplexor port number (-1 for no multiplexor)
- *	@daisy: daisy chain address (-1 for no daisy chain address)
- *
- *	This tries to locate a device on the given parallel port,
- *	multiplexor port and daisy chain address, and returns its
- *	device number or %-ENXIO if no device with those coordinates
- *	exists.
- **/
-
-int parport_device_num(int parport, int mux, int daisy)
-{
-	int res = -ENXIO;
-	struct daisydev *dev;
-
-	spin_lock(&topology_lock);
-	dev = topology;
-	while (dev && dev->port->portnum != parport &&
-	       dev->port->muxport != mux && dev->daisy != daisy)
-		dev = dev->next;
-	if (dev)
-		res = dev->devnum;
-	spin_unlock(&topology_lock);
-
-	return res;
-}
-
 /* Send a daisy-chain-style CPP command packet. */
 static int cpp_daisy(struct parport *port, int cmd)
 {
include/linux/parport.h +0 -1
index 9cdd694..ec3f765 100644
@@ -510,7 +510,6 @@ extern struct pardevice *parport_open (int devnum, const char *name,
 				       int flags, void *handle);
 extern void parport_close (struct pardevice *dev);
 extern ssize_t parport_device_id (int devnum, char *buffer, size_t len);
-extern int parport_device_num (int parport, int mux, int daisy);
 extern void parport_daisy_deselect_all (struct parport *port);
 extern int parport_daisy_select (struct parport *port, int daisy, int mode);
 
#174 lore raw

PATCH 1/1 unexport noautodma

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
+ide-ide-remove-hwif-autodma-and-drive-autodma.patch
...
IDE tree updates
...

noautodma can now be unexported.

---
957dc7601c050cb14a7afc842db0c2d62aaf3509

drivers/ide/ide.c +0 -2
index b3b5f00..5b09066 100644
@@ -100,8 +100,6 @@ static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
 
 int noautodma = 0;
 
-EXPORT_SYMBOL(noautodma);
-
 #ifdef CONFIG_BLK_DEV_IDEACPI
 int ide_noacpi = 0;
 int ide_noacpitfs = 1;
#175 lore raw

PATCH 1/1 mousedev.c:mixdev_open_devices() bugfix

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-input.patch
...
git trees
...

This patch fixes an obvious bug in mixdev_open_devices().

---
bb574366744163ff84609843ee43e84a39f57d5a

drivers/input/mousedev.c +1 -1
index 2ad8633..4ca0ad3 100644
@@ -461,7 +461,7 @@ static void mixdev_open_devices(void)
 
 	list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) {
 		if (!mousedev->mixdev_open) {
-			if (mousedev_open_device(mousedev));
+			if (mousedev_open_device(mousedev))
 				continue;
 
 			mousedev->mixdev_open = 1;
#176 lore raw

PATCH 1/1 make do_restart_poll() static

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
+use-erestart_restartblock-if-poll-is-interrupted-by-a-signal.patch
...
The infamous misc
...

do_restart_poll() can become static.

---
59cd2d11f5f0189973bb280c59262eb50984cb88

fs/select.c +1 -1
index 5a3ab01..3e515aa 100644
@@ -711,7 +711,7 @@ out_fds:
 	return err;
 }
 
-long do_restart_poll(struct restart_block *restart_block)
+static long do_restart_poll(struct restart_block *restart_block)
 {
 	struct pollfd __user *ufds = (struct pollfd __user*)restart_block->arg0;
 	int nfds = restart_block->arg1;
#177 lore raw

PATCH 1/1 unexport snd_ctl_elem_{read,write}

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-alsa.patch
...
git trees
...

snd_ctl_elem_{read,write} no longer have any modular users.

---

 sound/core/control.c |    4 ----
 1 file changed, 4 deletions(-)

23e15051dde57c569e4c9aff1339aaf64185ea71

sound/core/control.c +0 -4
index 396e98e..6144d8a 100644
@@ -716,8 +716,6 @@ int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control)
 	return result;
 }
 
-EXPORT_SYMBOL(snd_ctl_elem_read);
-
 static int snd_ctl_elem_read_user(struct snd_card *card,
 				  struct snd_ctl_elem_value __user *_control)
 {
@@ -781,8 +779,6 @@ int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file,
 	return result;
 }
 
-EXPORT_SYMBOL(snd_ctl_elem_write);
-
 static int snd_ctl_elem_write_user(struct snd_ctl_file *file,
 				   struct snd_ctl_elem_value __user *_control)
 {
#178 lore raw

PATCH 1/1 iwl-base.c bugfixes

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-wireless.patch
...
git trees
...

This patch fixes two obvious bugs.

---

 drivers/net/wireless/iwl-base.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

600ffdc11b25ac0aee15271d1b2ce99a367efa31

drivers/net/wireless/iwl-base.c +2 -2
index b8293fe..f65c30e 100644
@@ -343,7 +343,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv,
 	 * command is very huge the system will not have two scan at the
 	 * same time */
 	len = sizeof(struct iwl_cmd) * slots_num;
-	if (txq_id == IWL_CMD_QUEUE_NUM);
+	if (txq_id == IWL_CMD_QUEUE_NUM)
 		len +=  IWL_MAX_SCAN_SIZE;
 	txq->cmd = pci_alloc_consistent(dev, len, &txq->dma_addr_cmd);
 	if (!txq->cmd)
@@ -390,7 +390,7 @@ void iwl_tx_queue_free(struct iwl_priv *priv, struct iwl_tx_queue *txq)
 		iwl_hw_txq_free_tfd(priv, txq);
 
 	len = sizeof(struct iwl_cmd) * q->n_window;
-	if (q->id == IWL_CMD_QUEUE_NUM);
+	if (q->id == IWL_CMD_QUEUE_NUM)
 		len += IWL_MAX_SCAN_SIZE;
 
 	pci_free_consistent(dev, len, txq->cmd, txq->dma_addr_cmd);
#180 lore raw

PATCH 1/1 unexport sys_{open,read}

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-alsa.patch
...
git trees
...

sys_{open,read} can finally be unexported.

---

 fs/open.c       |    1 -
 fs/read_write.c |    1 -
 2 files changed, 2 deletions(-)

6f6884f9ee675f2e804c6c58ca46337f9765dd0d

fs/open.c +0 -1
index 23f334d..c0814de 100644
@@ -1057,7 +1057,6 @@ asmlinkage long sys_open(const char __user *filename, int flags, int mode)
 	prevent_tail_call(ret);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(sys_open);
 
 asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
 			   int mode)
fs/read_write.c +0 -1
index 507ddff..d913d1e 100644
@@ -370,7 +370,6 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(sys_read);
 
 asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count)
 {
#14 lore raw

PATCH 1/1 make types.h usable for non-gcc C parsers

In reply to Gabriel C
Quoted 3 lines · Gabriel C

...
WARNING: "div64_64" [net/netfilter/xt_connbytes.ko] has no CRC!
...

Patch below.

Quoted 3 lines

Regards,

Gabriel

cu
Adrian

<-- snip -->

This patch makes the 64bit integers on 32bit architectures usable for all C parsers that know about "long long".

---

 include/asm-arm/types.h      |   10 +++++++---
 include/asm-avr32/types.h    |   10 +++++++---
 include/asm-blackfin/types.h |   11 +++++++----
 include/asm-cris/types.h     |   10 +++++++---
 include/asm-frv/types.h      |   10 +++++++---
 include/asm-h8300/types.h    |   10 +++++++---
 include/asm-i386/types.h     |   10 +++++++---
 include/asm-m32r/types.h     |   11 ++++++++---
 include/asm-m68k/types.h     |   10 +++++++---
 include/asm-mips/types.h     |   10 +++++++---
 include/asm-parisc/types.h   |   10 +++++++---
 include/asm-powerpc/types.h  |    9 ++++++---
 include/asm-s390/types.h     |    9 ++++++---
 include/asm-sh/types.h       |   10 +++++++---
 include/asm-sh64/types.h     |   10 +++++++---
 include/asm-v850/types.h     |   10 +++++++---
 include/asm-xtensa/types.h   |   10 +++++++---
 17 files changed, 118 insertions(+), 52 deletions(-)

4b6826d7a2f5b54a6a3b1cfa8cd40b1b27621be0

include/asm-arm/types.h +7 -3
index 3141451..1dae25b 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-avr32/types.h +7 -3
index 8999a38..2c14f49 100644
@@ -25,11 +25,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-blackfin/types.h +7 -4
index 9785a6d..d0666b9 100644
@@ -26,12 +26,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-/* HK0617   -- Changes to unsigned long temporarily */
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif				/* __ASSEMBLY__ */
 /*
  * These aren't exported outside the kernel to avoid name space clashes
include/asm-cris/types.h +7 -3
index 5a21c42..6c46a90 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-frv/types.h +7 -3
index 767e5ed..728c234 100644
@@ -30,11 +30,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-h8300/types.h +7 -3
index 56566e2..1fc2dd9 100644
@@ -27,11 +27,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
include/asm-i386/types.h +7 -3
index faca192..a2c3b35 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-m32r/types.h +8 -3
index b64c166..8071e22 100644
@@ -19,10 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
+
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-m68k/types.h +7 -3
index c35c09d..43e0186 100644
@@ -27,11 +27,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-mips/types.h +7 -3
index 2dd147f..fe1eb32 100644
@@ -34,11 +34,15 @@ typedef unsigned long __u64;
 
 #else
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif
 
 #endif /* __ASSEMBLY__ */
include/asm-parisc/types.h +7 -3
index 56c8480..5df2b11 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-powerpc/types.h +6 -3
index 695e2ce..2ce1998 100644
@@ -40,10 +40,13 @@ typedef unsigned int __u32;
 typedef __signed__ long __s64;
 typedef unsigned long __u64;
 #else
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
 #endif /* __powerpc64__ */
 
 typedef struct {
include/asm-s390/types.h +6 -3
index 2c5879a..9590d00 100644
@@ -28,10 +28,13 @@ typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
 #ifndef __s390x__
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
 #else /* __s390x__ */
 typedef __signed__ long __s64;
 typedef unsigned long __u64;
include/asm-sh/types.h +7 -3
index 7ba69d9..d747b87 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long__ typedef __signed__ long long __s64;
+__extension_long_long__ typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-sh64/types.h +7 -3
index 2c7ad73..e5e90ff 100644
@@ -30,11 +30,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-v850/types.h +7 -3
index 284bda8..6fac765 100644
@@ -27,11 +27,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* !__ASSEMBLY__ */
 
 /*
include/asm-xtensa/types.h +7 -3
index 958f362..184c058 100644
@@ -29,11 +29,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
#183 lore raw

2.6.23-rc3-mm1: m32r defconfig compile error

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-m32r.patch
...
git trees
...

<-- snip -->

...
AS arch/m32r/kernel/entry.o
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S: Assembler messages:
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S:358: Error: bad instruction `addi r0,#(((((0)+(64))+(32))+(32)))' make[2]: *** [arch/m32r/kernel/entry.o] Error 1

<-- snip -->

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#185 lore raw

PATCH 1/1 remove unwind exports

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
+x86_64-mm-unwinder.patch
...
x86 tree updates
...

This patch removes the unused unwind exports.

---

 kernel/unwind.c |    4 ----
 1 file changed, 4 deletions(-)

844ccf670a8204df45b89407bb0e5867f03d0f71

kernel/unwind.c +0 -4
index 8c267c7..adb1ebe 100644
@@ -1243,7 +1243,6 @@ int unwind(struct unwind_frame_info *frame)
 #undef CASES
 #undef FRAME_REG
 }
-EXPORT_SYMBOL(unwind);
 
 int unwind_init_frame_info(struct unwind_frame_info *info,
                            struct task_struct *tsk,
@@ -1255,7 +1254,6 @@ int unwind_init_frame_info(struct unwind_frame_info *info,
 
 	return 0;
 }
-EXPORT_SYMBOL(unwind_init_frame_info);
 
 /*
  * Prepare to unwind a blocked task.
@@ -1269,7 +1267,6 @@ int unwind_init_blocked(struct unwind_frame_info *info,
 
 	return 0;
 }
-EXPORT_SYMBOL(unwind_init_blocked);
 
 /*
  * Prepare to unwind the currently running thread.
@@ -1284,5 +1281,4 @@ int unwind_init_running(struct unwind_frame_info *info,
 
 	return arch_unwind_init_running(info, callback, arg);
 }
-EXPORT_SYMBOL(unwind_init_running);
 
#186 lore raw

PATCH 1/1 ivtv-fb.c bugfix

In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-dvb.patch
...
git trees
...

This patch fixes an obvious bug in ivtvfb_release_buffers().

---
093bdc9ba94bffbec2ed44743418899771488832

drivers/media/video/ivtv/ivtv-fb.c +2 -2
index 0080765..8a344d5 100644
@@ -1068,8 +1068,8 @@ static void ivtvfb_release_buffers (struct ivtv *itv)
 	struct osd_info *oi = itv->osd_info;
 
 	/* Release cmap */
-	if (oi->ivtvfb_info.cmap.len);
-	fb_dealloc_cmap(&oi->ivtvfb_info.cmap);
+	if (oi->ivtvfb_info.cmap.len)
+		fb_dealloc_cmap(&oi->ivtvfb_info.cmap);
 
 	/* Release pseudo palette */
 	if (oi->ivtvfb_info.pseudo_palette)
#188 lore raw

2.6.23-rc3-mm1: i386: -maccumulate-outgoing-args unconditionally

In reply to Andrew Morton

Review

Quoted 9 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...

(quoted diff) +2 -0
+x86_64-mm-unwinder.patch
...
+x86_64-mm-remove-maccumulate-outgoing-args.patch
...
 x86 tree updates
...

-maccumulate-outgoing-args on i386 count:
1 + 1 - 1 = 1

If the stack unwinder needs it please enable it only explicitely when the unwinder is enabled - we are talking about a 2.5% size increase with defconfig.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#15 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

In reply to Adrian Bunk
Quoted 2 lines · Adrian Bunk

This patch makes the 64bit integers on 32bit architectures usable for all C parsers that know about "long long".

ah, yet another attempt at this stuff

you probably need to update linux/types.h as well
-mike

#16 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

Quoted 7 lines · Mike Frysinger
Quoted 2 lines · Adrian Bunk

This patch makes the 64bit integers on 32bit architectures usable for all C parsers that know about "long long".

ah, yet another attempt at this stuff

you probably need to update linux/types.h as well

What problems do you observe with linux/types.h?

Quoted 1 line

-mike

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#17 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

Quoted 10 lines · Adrian Bunk
Quoted 7 lines · Mike Frysinger
Quoted 2 lines · Adrian Bunk

This patch makes the 64bit integers on 32bit architectures usable for all C parsers that know about "long long".

ah, yet another attempt at this stuff

you probably need to update linux/types.h as well

What problems do you observe with linux/types.h?

just grep for __GNUC__ ...

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)

typedef     __u64       uint64_t;
typedef     __u64       u_int64_t;
typedef     __s64       int64_t;

#endif

#if defined(__GNUC__) && !defined(__STRICT_ANSI__) typedef __u64 __bitwise __le64;
typedef __u64 __bitwise __be64;
#endif

you've made available __u64 and __s64, but not the rest ... -mike

#172 lore raw

Re: [-mm patch] make "struct menu_governor" static (again)

In reply to Adrian Bunk

This is already fixed in the most recent ACPI CPUIDLE tree.

Thanks,
Adam

Quoted 29 lines · Adrian Bunk
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-acpi.patch
...
git trees
...

"struct menu_governor" needlessly again became global.

---
cb33b296204127cf50df54b84b2d79e152fb924b

drivers/cpuidle/governors/menu.c +1 -1
index f5a8865..8d3fdc5 100644
@@ -117,7 +117,7 @@ static int menu_enable_device(struct cpuidle_device *dev)
 	return 0;
 }
 
-struct cpuidle_governor menu_governor = {
+static struct cpuidle_governor menu_governor = {
 	.name =		"menu",
 	.rating =	20,
 	.enable =	menu_enable_device,
#179 lore raw

Re: [-mm patch] iwl-base.c bugfixes

In reply to Adrian Bunk
Quoted 35 lines · Adrian Bunk
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-wireless.patch
...
git trees
...

This patch fixes two obvious bugs.

---

 drivers/net/wireless/iwl-base.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

600ffdc11b25ac0aee15271d1b2ce99a367efa31

drivers/net/wireless/iwl-base.c +1 -1
index b8293fe..f65c30e 100644
@@ -343,7 +343,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv,
         * command is very huge the system will not have two scan at the
         * same time */
        len = sizeof(struct iwl_cmd) * slots_num;
-       if (txq_id == IWL_CMD_QUEUE_NUM);
+       if (txq_id == IWL_CMD_QUEUE_NUM)
                len +=  IWL_MAX_SCAN_SIZE;
        txq->cmd = pci_alloc_consistent(dev, len, &txq->dma_addr_cmd);
        if (!txq->cmd)

drivers/net/wireless/iwl-base.c void iwl_tx_queue_free(struct iwl_priv *priv, struct iwl_tx_queue *txq) · line 396

Quoted 8 lines
drivers/net/wireless/iwl-base.c +1 -1
@@ -390,7 +390,7 @@ void iwl_tx_queue_free(struct iwl_priv *priv, struct iwl_tx_queue *txq)
                iwl_hw_txq_free_tfd(priv, txq);
 
        len = sizeof(struct iwl_cmd) * q->n_window;
-       if (q->id == IWL_CMD_QUEUE_NUM);
+       if (q->id == IWL_CMD_QUEUE_NUM)
                len += IWL_MAX_SCAN_SIZE;
 
        pci_free_consistent(dev, len, txq->cmd, txq->dma_addr_cmd);

Shame on me.
Thanks

Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#181 lore raw

Re: [-mm patch] unexport sys_{open,read}

In reply to Adrian Bunk
Quoted 11 lines · On Mon, 27 Aug 2007 23:27:23 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-alsa.patch
...
git trees
...

sys_{open,read} can finally be unexported.

isn't sys_close in the same boat?

#182 lore raw

Re: [-mm patch] unexport sys_{open,read}

Quoted 12 lines · Arjan van de Ven
Quoted 9 lines · On Mon, 27 Aug 2007 23:27:23 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-alsa.patch
...
git trees
...

Quoted 4 lines
Quoted 2 lines

sys_{open,read} can finally be unexported.

isn't sys_close in the same boat?

Still used in fs/binfmt_misc.c ...

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#184 lore raw

Re: 2.6.23-rc3-mm1: m32r defconfig compile error

In reply to Adrian Bunk

From: Adrian Bunk <[email protected]>
Subject: 2.6.23-rc3-mm1: m32r defconfig compile error
Date: Mon, 27 Aug 2007 23:27:48 +0200

Quoted 17 lines · Andrew Morton
Quoted 7 lines

...
Changes since 2.6.23-rc2-mm2:
...
git-m32r.patch
...
git trees
...

<-- snip -->

...
AS arch/m32r/kernel/entry.o
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S: Assembler messages:
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S:358: Error: bad instruction `addi r0,#(((((0)+(64))+(32))+(32)))' make[2]: *** [arch/m32r/kernel/entry.o] Error 1

Quoted 5 lines

<-- snip -->

cu
Adrian

Hello, Adrian,

Thank you for the report.

M32700UT/OPSPUT Users,

Please apply this patch to build an m32r 2.6.23-rc3-mm1 kernel.

This patch has also included to my m32r kernel development git repository.
git://www.linux-m32r.org/git/takata/linux-2.6_dev.git linux-m32r

Thanks,

-- Takata

[PATCH 2.6.23-rc3-mm1] m32r: build fix of entry.S

This patch is required to fix build errors for the modification:
m32r: Simplify ei_handler code
commit f6c7546d53a4288501dcdd96d5297214697e7237

---
 arch/m32r/kernel/entry.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/m32r/kernel/entry.S +2 -2
index c46cfaa..42b08bf 100644
@@ -355,7 +355,7 @@ ENTRY(ei_handler)
 	lduh	r0, @(low(M32R_INT0ICU_ISTS),r0)	; bit10-6 : ISN
 	slli	r0, #21
 	srli	r0, #27				; ISN
-	addi	r0, #(M32R_INT0ICU_IRQ_BASE)
+	add3	r0, r0, #(M32R_INT0ICU_IRQ_BASE)
 	bra	check_end
 	.fillinsn
 4:
@@ -367,7 +367,7 @@ ENTRY(ei_handler)
 	lduh	r0, @(low(M32R_INT2ICU_ISTS),r0)	; bit10-6 : ISN
 	slli	r0, #21
 	srli	r0, #27				; ISN
-	addi	r0, #(M32R_INT2ICU_IRQ_BASE)
+	add3	r0, r0, #(M32R_INT2ICU_IRQ_BASE)
 	; bra	check_end
 	.fillinsn
 5:
Signature · 5 lines
1.5.2.4

--
Hirokazu Takata <[email protected]>
Linux/M32R Project:  http://www.linux-m32r.org/
#187 lore raw

Re: [v4l-dvb-maintainer] [-mm patch] ivtv-fb.c bugfix

In reply to Adrian Bunk
Quoted 9 lines · On Monday 27 August 2007 23:29:29 Adrian Bunk wrote:
Quoted 7 lines · Andrew Morton

...
Changes since 2.6.23-rc2-mm2:
...
git-dvb.patch
...
git trees
...

Quoted 3 lines

This patch fixes an obvious bug in ivtvfb_release_buffers().

Ouch. Thanks.

Mauro, I've added this patch to my v4l-dvb tree. Can you pull from it?

Thanks,

Hans

Quoted 24 lines

---
093bdc9ba94bffbec2ed44743418899771488832

(quoted diff) +0 -0

b/drivers/media/video/ivtv/ivtv-fb.c index 0080765..8a344d5 100644

drivers/media/video/ivtv/ivtv-fb.c +2 -2
@@ -1068,8 +1068,8 @@ static void ivtvfb_release_buffers (struct ivtv
 *itv) struct osd_info *oi = itv->osd_info;
 
 	/* Release cmap */
-	if (oi->ivtvfb_info.cmap.len);
-	fb_dealloc_cmap(&oi->ivtvfb_info.cmap);
+	if (oi->ivtvfb_info.cmap.len)
+		fb_dealloc_cmap(&oi->ivtvfb_info.cmap);
 
 	/* Release pseudo palette */
 	if (oi->ivtvfb_info.pseudo_palette)

_______________________________________________
v4l-dvb-maintainer mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer

#18 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

In reply to Adrian Bunk
Quoted 15 lines · On Mon, 27 Aug 2007 23:27:43 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 3 lines · Gabriel C

...
WARNING: "div64_64" [net/netfilter/xt_connbytes.ko] has no CRC!
...

Patch below.

Quoted 3 lines

Regards,

Gabriel

cu
Adrian

Quoted 8 lines

<-- snip -->

This patch makes the 64bit integers on 32bit architectures usable for all C parsers that know about "long long".

Given that this patch (hopefully) fixes a problem in the current net-2.6.24 tree, I'm inclined to slip it into mainline immediately.

But I'd like a better description, please. Which "non-gcc parser" are we talking about here? Something under ./scripts/. Well, please identify it, and describe what the problem is, and how the proposed patch will address it.

Let's cc Sam too, as I guess he's the guy whose code just broke.

Thanks.

(patch retained for cc'ees)

Quoted 410 lines

---

 include/asm-arm/types.h      |   10 +++++++---
 include/asm-avr32/types.h    |   10 +++++++---
 include/asm-blackfin/types.h |   11 +++++++----
 include/asm-cris/types.h     |   10 +++++++---
 include/asm-frv/types.h      |   10 +++++++---
 include/asm-h8300/types.h    |   10 +++++++---
 include/asm-i386/types.h     |   10 +++++++---
 include/asm-m32r/types.h     |   11 ++++++++---
 include/asm-m68k/types.h     |   10 +++++++---
 include/asm-mips/types.h     |   10 +++++++---
 include/asm-parisc/types.h   |   10 +++++++---
 include/asm-powerpc/types.h  |    9 ++++++---
 include/asm-s390/types.h     |    9 ++++++---
 include/asm-sh/types.h       |   10 +++++++---
 include/asm-sh64/types.h     |   10 +++++++---
 include/asm-v850/types.h     |   10 +++++++---
 include/asm-xtensa/types.h   |   10 +++++++---
 17 files changed, 118 insertions(+), 52 deletions(-)

4b6826d7a2f5b54a6a3b1cfa8cd40b1b27621be0

include/asm-arm/types.h +7 -3
index 3141451..1dae25b 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-avr32/types.h +7 -3
index 8999a38..2c14f49 100644
@@ -25,11 +25,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-blackfin/types.h +7 -4
index 9785a6d..d0666b9 100644
@@ -26,12 +26,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-/* HK0617   -- Changes to unsigned long temporarily */
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif				/* __ASSEMBLY__ */
 /*
  * These aren't exported outside the kernel to avoid name space clashes
include/asm-cris/types.h +7 -3
index 5a21c42..6c46a90 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-frv/types.h +7 -3
index 767e5ed..728c234 100644
@@ -30,11 +30,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-h8300/types.h +7 -3
index 56566e2..1fc2dd9 100644
@@ -27,11 +27,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
include/asm-i386/types.h +7 -3
index faca192..a2c3b35 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-m32r/types.h +8 -3
index b64c166..8071e22 100644
@@ -19,10 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
+
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-m68k/types.h +7 -3
index c35c09d..43e0186 100644
@@ -27,11 +27,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-mips/types.h +7 -3
index 2dd147f..fe1eb32 100644
@@ -34,11 +34,15 @@ typedef unsigned long __u64;
 
 #else
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif
 
 #endif /* __ASSEMBLY__ */
include/asm-parisc/types.h +7 -3
index 56c8480..5df2b11 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-powerpc/types.h +6 -3
index 695e2ce..2ce1998 100644
@@ -40,10 +40,13 @@ typedef unsigned int __u32;
 typedef __signed__ long __s64;
 typedef unsigned long __u64;
 #else
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
 #endif /* __powerpc64__ */
 
 typedef struct {
include/asm-s390/types.h +6 -3
index 2c5879a..9590d00 100644
@@ -28,10 +28,13 @@ typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
 #ifndef __s390x__
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
 #else /* __s390x__ */
 typedef __signed__ long __s64;
 typedef unsigned long __u64;
include/asm-sh/types.h +7 -3
index 7ba69d9..d747b87 100644
@@ -19,11 +19,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long__ typedef __signed__ long long __s64;
+__extension_long_long__ typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-sh64/types.h +7 -3
index 2c7ad73..e5e90ff 100644
@@ -30,11 +30,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* __ASSEMBLY__ */
 
 /*
include/asm-v850/types.h +7 -3
index 284bda8..6fac765 100644
@@ -27,11 +27,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 #endif /* !__ASSEMBLY__ */
 
 /*
include/asm-xtensa/types.h +7 -3
index 958f362..184c058 100644
@@ -29,11 +29,15 @@ typedef unsigned short __u16;
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define __extension_long_long __extension__
+#else
+#define __extension_long_long
 #endif
 
+__extension_long_long typedef __signed__ long long __s64;
+__extension_long_long typedef unsigned long long __u64;
+
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
#19 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

Quoted 29 lines · Andrew Morton
Quoted 15 lines · On Mon, 27 Aug 2007 23:27:43 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 3 lines · Gabriel C

...
WARNING: "div64_64" [net/netfilter/xt_connbytes.ko] has no CRC!
...

Patch below.

Quoted 3 lines

Regards,

Gabriel

cu
Adrian

Quoted 8 lines

<-- snip -->

This patch makes the 64bit integers on 32bit architectures usable for all C parsers that know about "long long".

Given that this patch (hopefully) fixes a problem in the current net-2.6.24 tree, I'm inclined to slip it into mainline immediately.

Quoted 6 lines

But I'd like a better description, please. Which "non-gcc parser" are we talking about here? Something under ./scripts/. Well, please identify it, and describe what the problem is, and how the proposed patch will address it.

Let's cc Sam too, as I guess he's the guy whose code just broke.

If my analysis is correct then genksyms fails to produce a CRC for div64_64 because genksyms does not know the __extension__ keyword.
And this patch just paper over the real bug wich is in genksyms - right?

So we should fix the root cause here.

Googeling I did not find a good description of where __extension__ can be used so I fail to see where in the parse.y file I shal add the keyword. I think __extension__ may be used both as a part of an expression AND as part of a typedef (as in this case) but I wonder if this is where it is limited to be used.
I would like to have this sorted out so we do not do a half-backed solution, and the proposed patch as it just paper over the real bug is no good.

Sam

#189 lore raw

oops at sr_block_release [Re: 2.6.23-rc3-mm1]

In reply to Andrew Morton

Andrew Morton napsal(a):

Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

I got this during gxine initialization of ocko.tv live stream without any cd in cdroms:

BUG: unable to handle kernel NULL pointer dereference at virtual address 0000005c
printing eip: f88fbe7a *pde = 00000000
Oops: 0000 [#1] SMP
Modules linked in: ath5k arc4 ecb blkcipher cryptomgr crypto_algapi

rc80211_simple mac80211 cfg80211 nls_cp437 vfat fat usb_storage tun ipv6 floppy parport_pc parport ohci1394 ieee1394 usbhid sr_mod ehci_hcd cdrom ff_memless

Pid: 2809, comm: hald-addon-stor Not tainted (2.6.23-rc3-mm1 #315)
EIP: 0060:[<f88fbe7a>] EFLAGS: 00010246 CPU: 1
EIP is at sr_block_release+0xb/0x2c [sr_mod]
EAX: 00000000 EBX: 00000000 ECX: f88fbe6f EDX: 00000000
ESI: c21c36c0 EDI: c289a780 EBP: c3729f18 ESP: c3729f10
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process hald-addon-stor (pid: 2809, ti=c3729000 task=c1c2be40 task.ti=c3729000)

Stack: 00000000 c21c36c0 c3729f38 c018d7ad c21c36cc c1f9ff80 c21c3730 c21c36c0
       c2a6ada0 dcbb3f80 c3729f40 c018d7dc c3729f4c c018e103 00000010 c3729f74
       c016bc5f 00000000 00000000 c217fa80 c1f9ff80 c2a6ada0 dcbb3f80 c1cc6900
Call Trace:
 [<c0105022>] show_trace_log_lvl+0x1a/0x30
 [<c01050dd>] show_stack_log_lvl+0xa5/0xca
 [<c01051d2>] show_registers+0xd0/0x1c1
 [<c01053cd>] die+0x10a/0x24d
 [<c011afbe>] do_page_fault+0x496/0x608
 [<c03768e2>] error_code+0x72/0x78
 [<c018d7ad>] __blkdev_put+0x125/0x14a
 [<c018d7dc>] blkdev_put+0xa/0xc
 [<c018e103>] blkdev_close+0x29/0x2c
 [<c016bc5f>] __fput+0xa6/0x161
 [<c016bea4>] fput+0x22/0x3b
 [<c016960b>] filp_close+0x41/0x67
 [<c016a78c>] sys_close+0x60/0x9f
 [<c01040ce>] syscall_call+0x7/0xb
 =======================
Code: 0c 81 c3 4c 01 00 00 89 5c 24 08 89 44 24 04 c7 04 24 88 cd 8f f8 e8 99 84

82 c7 e9 04 fe ff ff 55 89 e5 56 53 8b 80 04 01 00 00 <8b> 40 5c 8b 70 3c 8d 46 18 e8 cf f6 fe ff 89 c3 85 c0 75 07 89
EIP: [<f88fbe7a>] sr_block_release+0xb/0x2c [sr_mod] SS:ESP 0068:c3729f10

regards,

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#157 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

In reply to Jiri Slaby

Does this went through to your boxes? Any progress, clue, idea?

Jiri Slaby napsal(a):

Quoted 117 lines

Andrew Morton napsal(a):

Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

Hi,

I've found a regression against 2.6.23-rc2-mm2. X server shutdown freezes (untainted) kernel hardly. Nothing on netconsole, X output follows:

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: Fedora Core 7 Red Hat, Inc.
Current Operating System: Linux bellona 2.6.23-rc3-mm1 #315 SMP Wed Aug 22 21:43:06 CEST 2007 i686
Build Date: 11 June 2007
Build ID: xorg-x11-server 1.3.0.0-9.fc7
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Aug 26 14:22:43 2007 (==) Using config file: "/etc/X11/xorg.conf"
(WW) RADEON: No matching Device section for instance (BusID PCI:1:0:1) found (**) RADEON(0): RADEONPreInit
(II) Module already built-in
(II) Module already built-in
(II) Module already built-in
(**) RADEON(0): RADEONScreenInit f0000000 0
(**) RADEON(0): Map: 0xf0000000, 0x04000000
(**) RADEON(0): RADEONSave
(**) RADEON(0): RADEONSaveMode(0x8240870)
(**) RADEON(0): Read: 0x0000000c 0x00030065 0x00000000
(**) RADEON(0): Read: rd=12, fd=101, pd=3
(**) RADEON(0): RADEONSaveMode returns 0x8240870
(**) RADEON(0): DRI New memory map param
(**) RADEON(0): RADEONInitMemoryMap() :

(**) RADEON(0):   mem_size         : 0x04000000
(**) RADEON(0):   MC_FB_LOCATION   : 0xf3fff000
(**) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0
(**) RADEON(0): RADEONModeInit()
1280x1024     108.00  1280 1328 1440 1688  1024 1025 1028 1066 (24,32) +H +V
1280x1024     108.00  1280 1328 1440 1688  1024 1025 1028 1066 (24,32) +H +V

(**) RADEON(0): Pitch = 10485920 bytes (virtualX = 1280, displayWidth = 1280) (**) RADEON(0): dc=10800, of=21600, fd=96, pd=2
(**) RADEON(0): RADEONInit returns 0x8241220
(**) RADEON(0): RADEONRestoreMode()
(**) RADEON(0): RADEONRestoreMode(0x8241220)
(**) RADEON(0): RADEONRestoreMemMapRegisters() :

(**) RADEON(0):   MC_FB_LOCATION   : 0xf3fff000
(**) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0
(**) RADEON(0):   Map Changed ! Applying ...
(**) RADEON(0):   Map applied, resetting engine ...

(**) RADEON(0): Updating display base addresses...
(**) RADEON(0): Memory map updated.
(**) RADEON(0): Programming CRTC1, offset: 0x00000000 (**) RADEON(0): Wrote: 0x0000000c 0x00010060 0x00000000 (0x0000a400) (**) RADEON(0): Wrote: rd=12, fd=96, pd=1
(**) RADEON(0): GRPH_BUFFER_CNTL from 20205c5c to 20125c5c (**) RADEON(0): RADEONSaveScreen(0)
(**) RADEON(0): Setting up initial surfaces
(**) RADEON(0): Initializing fb layer
(**) RADEON(0): Setting up accel memmap
(**) RADEON(0): Initializing backing store
(**) RADEON(0): DRI Finishing init !
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): GRPH_BUFFER_CNTL from 20205c5c to 20125c5c (**) RADEON(0): Setting up final surfaces
(**) RADEON(0): Initializing Acceleration
(**) RADEON(0): EngineInit (32/32)
(**) RADEON(0): Pitch for acceleration = 160
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): Initializing DPMS
(**) RADEON(0): Initializing Cursor
(**) RADEON(0): Initializing color map
(**) RADEON(0): Initializing DGA
(**) RADEON(0): Initializing Xv
(**) RADEON(0): RADEONScreenInit finished
(**) RADEON(0): RADEONSaveScreen(2)
(**) RADEON(0): RADEONCloseScreen
(**) RADEON(0): RADEONDRIStop
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): RADEONDisplayPowerManagementSet(0,0x0) (**) RADEON(0): RADEONRestore
(**) RADEON(0): RADEONRestoreMode()
(**) RADEON(0): RADEONRestoreMode(0x8240870)
(**) RADEON(0): RADEONRestoreMemMapRegisters() :

(**) RADEON(0):   MC_FB_LOCATION   : 0x1fff0000
(**) RADEON(0):   MC_AGP_LOCATION  : 0x27ff2000
(**) RADEON(0):   Map Changed ! Applying ...
(**) RADEON(0):   Map applied, resetting engine ...

(**) RADEON(0): Updating display base addresses...
(**) RADEON(0): Memory map updated.
(**) RADEON(0): Programming CRTC1, offset: 0x00000000 (**) RADEON(0): Wrote: 0x0000000c 0x00030065 0x00000000 (0x0000a400) (**) RADEON(0): Wrote: rd=12, fd=101, pd=3
(**) RADEON(0): Disposing accel...
(**) RADEON(0): Disposing cusor info
(**) RADEON(0): Disposing DGA
(**) RADEON(0): Unmapping memory
(**) RADEON(0): RADEONDRICloseScreen

the only difference is, that 2.6.23-rc2-mm2 writes further

FreeFontPath: FPE "/usr/share/X11/fonts/misc:unscaled" refcount is 2, should be 1; fixing.

and exits succesfully (note that these messages are taken on remote host, X runned remotely).

Both vesa and radeon + Option "NoAccel" "true" works obviously fine.

regards,

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#20 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

In reply to Sam Ravnborg

Hi,

Quoted 5 lines · Sam Ravnborg

Googeling I did not find a good description of where __extension__ can be used so I fail to see where in the parse.y file I shal add the keyword. I think __extension__ may be used both as a part of an expression AND as part of a typedef (as in this case) but I wonder if this is where it is limited to be used.

The grammatic rules involving __extension__ are these (the lhs stems from the standard directly):

external-declaration:
__extension__ external-declaration

struct-declaration:
__extension__ struct-declaration

nested-declaration:
__extension__ nested-declaration

unary-operator: one of

     __extension__ __real__ __imag__

The first three allow to put __extension__ in front of any external or local declaration (including decls inside blocks, in C99), ala:

  {
    x = 1+3;
    __extension__ int y = 3;
    x += y;
  }

the last one defines __extension__ as an unary operator, which can be applied to all cast-expressions (which in turn are just unary expressions). E.g.:

   x = 1 + __extension__ (2+3);

Note that the decls include the C99 nested-decls in for statements:

for (__extension__ long long i = 0; ...)

Note further that there's a small ambiguity in parsing when just looking forward one token, namely between decl and expression, like in this example:

{ __extension__ int i;

vs.

{ __extension__ i + 2;

Here you can't decide if __extension__ introduces an expression or a decl. Probably doesn't matter for your parser. Hope this helps.

Ciao,
Michael.

#21 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

In reply to Sam Ravnborg
Quoted 43 lines · On Tue, 28 Aug 2007 10:43:15 +0200 Sam Ravnborg wrote:
Quoted 29 lines · Andrew Morton
Quoted 15 lines · On Mon, 27 Aug 2007 23:27:43 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 3 lines · Gabriel C

...
WARNING: "div64_64" [net/netfilter/xt_connbytes.ko] has no CRC!
...

Patch below.

Quoted 3 lines

Regards,

Gabriel

cu
Adrian

Quoted 8 lines

<-- snip -->

This patch makes the 64bit integers on 32bit architectures usable for all C parsers that know about "long long".

Given that this patch (hopefully) fixes a problem in the current net-2.6.24 tree, I'm inclined to slip it into mainline immediately.

Quoted 6 lines

But I'd like a better description, please. Which "non-gcc parser" are we talking about here? Something under ./scripts/. Well, please identify it, and describe what the problem is, and how the proposed patch will address it.

Let's cc Sam too, as I guess he's the guy whose code just broke.

If my analysis is correct then genksyms fails to produce a CRC for div64_64 because genksyms does not know the __extension__ keyword.
And this patch just paper over the real bug wich is in genksyms - right?

So we should fix the root cause here.

Quoted 7 lines

Googeling I did not find a good description of where __extension__ can be used so I fail to see where in the parse.y file I shal add the keyword. I think __extension__ may be used both as a part of an expression AND as part of a typedef (as in this case) but I wonder if this is where it is limited to be used.
I would like to have this sorted out so we do not do a half-backed solution, and the proposed patch as it just paper over the real bug is no good.

I found only one gcc manual page on __extension__:

http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Alternate-Keywords.html#Alternate-Keywords

(also found for other gcc versions)

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#22 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

In reply to Andrew Morton
Quoted 20 lines · Andrew Morton
Quoted 18 lines · On Mon, 27 Aug 2007 23:27:43 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 3 lines · Gabriel C

...
WARNING: "div64_64" [net/netfilter/xt_connbytes.ko] has no CRC!
...

Patch below.

Quoted 3 lines

Regards,

Gabriel

cu
Adrian

<-- snip -->

Quoted 8 lines
Quoted 5 lines

This patch makes the 64bit integers on 32bit architectures usable for all C parsers that know about "long long".

Given that this patch (hopefully) fixes a problem in the current net-2.6.24 tree, I'm inclined to slip it into mainline immediately.

It fixes a bug exposed by a -mm only patch, not by the net tree (and 2.6.23-rc3-mm1 doesn't contain the net tree at all).

Quoted 5 lines

But I'd like a better description, please. Which "non-gcc parser" are we talking about here? Something under ./scripts/. Well, please identify it, and describe what the problem is, and how the proposed patch will address it.
...

It's about parsers like the Sun C compiler and the C parser shipped with genksyms.

We can fix the C parser shipped with genksyms, but we have nearly the same problem with userspace C parsers:

These are userspace headers, and we had a bug report that the Sun C compiler was not able to compile some userspace code.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#190 lore raw

Re: oops at sr_block_release [Re: 2.6.23-rc3-mm1]

In reply to Jiri Slaby

Hi Jiri,

Quoted 5 lines · Jiri Slaby

Andrew Morton napsal(a):

Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

I got this during gxine initialization of ocko.tv live stream without any cd in cdroms:

Yup, that's an old habit of hald-addon-storage ... doing open(2), ioctl(2) and close(2) on the cdrom block device even when it's idle, every 2 seconds.

Quoted 34 lines
BUG: unable to handle kernel NULL pointer dereference at virtual address 0000005c
printing eip: f88fbe7a *pde = 00000000
Oops: 0000 [#1] SMP
Modules linked in: ath5k arc4 ecb blkcipher cryptomgr crypto_algapi

rc80211_simple mac80211 cfg80211 nls_cp437 vfat fat usb_storage tun ipv6 floppy parport_pc parport ohci1394 ieee1394 usbhid sr_mod ehci_hcd cdrom ff_memless

Pid: 2809, comm: hald-addon-stor Not tainted (2.6.23-rc3-mm1 #315)
EIP: 0060:[<f88fbe7a>] EFLAGS: 00010246 CPU: 1
EIP is at sr_block_release+0xb/0x2c [sr_mod]
EAX: 00000000 EBX: 00000000 ECX: f88fbe6f EDX: 00000000
ESI: c21c36c0 EDI: c289a780 EBP: c3729f18 ESP: c3729f10
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process hald-addon-stor (pid: 2809, ti=c3729000 task=c1c2be40 task.ti=c3729000)

Stack: 00000000 c21c36c0 c3729f38 c018d7ad c21c36cc c1f9ff80 c21c3730 c21c36c0
       c2a6ada0 dcbb3f80 c3729f40 c018d7dc c3729f4c c018e103 00000010 c3729f74
       c016bc5f 00000000 00000000 c217fa80 c1f9ff80 c2a6ada0 dcbb3f80 c1cc6900
Call Trace:
 [<c0105022>] show_trace_log_lvl+0x1a/0x30
 [<c01050dd>] show_stack_log_lvl+0xa5/0xca
 [<c01051d2>] show_registers+0xd0/0x1c1
 [<c01053cd>] die+0x10a/0x24d
 [<c011afbe>] do_page_fault+0x496/0x608
 [<c03768e2>] error_code+0x72/0x78
 [<c018d7ad>] __blkdev_put+0x125/0x14a
 [<c018d7dc>] blkdev_put+0xa/0xc
 [<c018e103>] blkdev_close+0x29/0x2c
 [<c016bc5f>] __fput+0xa6/0x161
 [<c016bea4>] fput+0x22/0x3b
 [<c016960b>] filp_close+0x41/0x67
 [<c016a78c>] sys_close+0x60/0x9f
 [<c01040ce>] syscall_call+0x7/0xb
 =======================
Code: 0c 81 c3 4c 01 00 00 89 5c 24 08 89 44 24 04 c7 04 24 88 cd 8f f8 e8 99 84
Quoted 3 lines

82 c7 e9 04 fe ff ff 55 89 e5 56 53 8b 80 04 01 00 00 <8b> 40 5c 8b 70 3c 8d 46 18 e8 cf f6 fe ff 89 c3 85 c0 75 07 89
EIP: [<f88fbe7a>] sr_block_release+0xb/0x2c [sr_mod] SS:ESP 0068:c3729f10

blkdev_put(bdev, ...)

	__blkdev_put(bdev, ...)
		sr_block_release(bdev->bd_inode, ...)
		(sees bdev->bd_inode->i_bdev->bd_disk == NULL)

Doesn't seem like an sr_block_release() (or sr_mod) issue to me at all, looks more like a wierd race in the block_device code ... can you send or put up some link to your .config?

If this is reproducible (I bet it isn't, though) you could try bisecting.

Satyam

#191 lore raw

Re: oops at sr_block_release [Re: 2.6.23-rc3-mm1]

Satyam Sharma napsal(a):

Quoted 53 lines

Hi Jiri,

Quoted 4 lines · Jiri Slaby

Andrew Morton napsal(a):

Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

I got this during gxine initialization of ocko.tv live stream without any cd in cdroms:

Yup, that's an old habit of hald-addon-storage ... doing open(2), ioctl(2) and close(2) on the cdrom block device even when it's idle, every 2 seconds.

Quoted 34 lines
BUG: unable to handle kernel NULL pointer dereference at virtual address 0000005c
printing eip: f88fbe7a *pde = 00000000
Oops: 0000 [#1] SMP
Modules linked in: ath5k arc4 ecb blkcipher cryptomgr crypto_algapi

rc80211_simple mac80211 cfg80211 nls_cp437 vfat fat usb_storage tun ipv6 floppy parport_pc parport ohci1394 ieee1394 usbhid sr_mod ehci_hcd cdrom ff_memless

Pid: 2809, comm: hald-addon-stor Not tainted (2.6.23-rc3-mm1 #315)
EIP: 0060:[<f88fbe7a>] EFLAGS: 00010246 CPU: 1
EIP is at sr_block_release+0xb/0x2c [sr_mod]
EAX: 00000000 EBX: 00000000 ECX: f88fbe6f EDX: 00000000
ESI: c21c36c0 EDI: c289a780 EBP: c3729f18 ESP: c3729f10
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process hald-addon-stor (pid: 2809, ti=c3729000 task=c1c2be40 task.ti=c3729000)

Stack: 00000000 c21c36c0 c3729f38 c018d7ad c21c36cc c1f9ff80 c21c3730 c21c36c0
       c2a6ada0 dcbb3f80 c3729f40 c018d7dc c3729f4c c018e103 00000010 c3729f74
       c016bc5f 00000000 00000000 c217fa80 c1f9ff80 c2a6ada0 dcbb3f80 c1cc6900
Call Trace:
 [<c0105022>] show_trace_log_lvl+0x1a/0x30
 [<c01050dd>] show_stack_log_lvl+0xa5/0xca
 [<c01051d2>] show_registers+0xd0/0x1c1
 [<c01053cd>] die+0x10a/0x24d
 [<c011afbe>] do_page_fault+0x496/0x608
 [<c03768e2>] error_code+0x72/0x78
 [<c018d7ad>] __blkdev_put+0x125/0x14a
 [<c018d7dc>] blkdev_put+0xa/0xc
 [<c018e103>] blkdev_close+0x29/0x2c
 [<c016bc5f>] __fput+0xa6/0x161
 [<c016bea4>] fput+0x22/0x3b
 [<c016960b>] filp_close+0x41/0x67
 [<c016a78c>] sys_close+0x60/0x9f
 [<c01040ce>] syscall_call+0x7/0xb
 =======================
Code: 0c 81 c3 4c 01 00 00 89 5c 24 08 89 44 24 04 c7 04 24 88 cd 8f f8 e8 99 84
Quoted 3 lines

82 c7 e9 04 fe ff ff 55 89 e5 56 53 8b 80 04 01 00 00 <8b> 40 5c 8b 70 3c 8d 46 18 e8 cf f6 fe ff 89 c3 85 c0 75 07 89
EIP: [<f88fbe7a>] sr_block_release+0xb/0x2c [sr_mod] SS:ESP 0068:c3729f10

Quoted 8 lines

blkdev_put(bdev, ...)

	__blkdev_put(bdev, ...)
		sr_block_release(bdev->bd_inode, ...)
		(sees bdev->bd_inode->i_bdev->bd_disk == NULL)

Doesn't seem like an sr_block_release() (or sr_mod) issue to me at all, looks more like a wierd race in the block_device code ... can you send or put up some link to your .config?

http://www.fi.muni.cz/~xslaby/sklad/config-2.6.23-rc3-mm1

Quoted 1 line

If this is reproducible

:) no.

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#23 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

In reply to Adrian Bunk
Quoted 4 lines

It fixes a bug exposed by a -mm only patch, not by the net tree (and 2.6.23-rc3-mm1 doesn't contain the net tree at all).

Quoted 8 lines
Quoted 5 lines

But I'd like a better description, please. Which "non-gcc parser" are we talking about here? Something under ./scripts/. Well, please identify it, and describe what the problem is, and how the proposed patch will address it.
...

It's about parsers like the Sun C compiler and the C parser shipped with genksyms.

So it is about two bugs.
1) kbuild (genksyms) fails to generate CRC for some symbols
2) allow userspace to parse the header

As for 2 we already use sed to remove a lot of stuff in our headers so why do we use another approach here?

As for 1 I will try to teach genksyms to accept __extension__ but it seems leess trivial than I expected (most be fooling myself somehow).

Sam

#96 lore raw

PATCH 1/1 Fix lguest page-pinning logic ("lguest: bad stack page 0xc057a000")

In reply to Frederik Deweerdt

If the stack pointer is 0xc057a000, then the first stack page is at 0xc0579000 (the stack pointer is decremented before use). Not calculating this correctly caused guests with CONFIG_DEBUG_PAGEALLOC=y to be killed with a "bad stack page" message: the initial kernel stack was just preceeding the .smp_locks section which CONFIG_DEBUG_PAGEALLOC marks read-only when freeing.

Thanks to Frederik Deweerdt for the bug report!

drivers/lguest/interrupts_and_traps.c +5 -2
diff -r cb71c5b0bbb5 drivers/lguest/interrupts_and_traps.c
@@ -270,8 +270,11 @@ void pin_stack_pages(struct lguest *lg)
 	/* Depending on the CONFIG_4KSTACKS option, the Guest can have one or
 	 * two pages of stack space. */
 	for (i = 0; i < lg->stack_pages; i++)
-		/* The stack grows *upwards*, hence the subtraction */
-		pin_page(lg, lg->esp1 - i * PAGE_SIZE);
+		/* The stack grows *upwards*, so the address we're given is the
+		 * start of the page after the kernel stack.  Subtract one to
+		 * get back onto the first stack page, and keep subtracting to
+		 * get to the rest of the stack pages. */
+		pin_page(lg, lg->esp1 - 1 - i * PAGE_SIZE);
 }
 
 /* Direct traps also mean that we need to know whenever the Guest wants to use
#24 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

In reply to Sam Ravnborg
Quoted 9 lines · Sam Ravnborg
Quoted 8 lines
Quoted 5 lines

But I'd like a better description, please. Which "non-gcc parser" are we talking about here? Something under ./scripts/. Well, please identify it, and describe what the problem is, and how the proposed patch will address it.
...

It's about parsers like the Sun C compiler and the C parser shipped with genksyms.

Quoted 6 lines

So it is about two bugs.
1) kbuild (genksyms) fails to generate CRC for some symbols
2) allow userspace to parse the header

As for 2 we already use sed to remove a lot of stuff in our headers so why do we use another approach here?

the sed removes things permanently and is designed for scrubbing things that are kernel-only ... in this case, these typedefs are not kernel only, but exposed conditionally when the compiler/standard allows for it
-mike

#25 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

In reply to Sam Ravnborg
Quoted 13 lines · Sam Ravnborg
Quoted 4 lines

It fixes a bug exposed by a -mm only patch, not by the net tree (and 2.6.23-rc3-mm1 doesn't contain the net tree at all).

Quoted 8 lines
Quoted 5 lines

But I'd like a better description, please. Which "non-gcc parser" are we talking about here? Something under ./scripts/. Well, please identify it, and describe what the problem is, and how the proposed patch will address it.
...

It's about parsers like the Sun C compiler and the C parser shipped with genksyms.

Quoted 6 lines

So it is about two bugs.
1) kbuild (genksyms) fails to generate CRC for some symbols
2) allow userspace to parse the header

As for 2 we already use sed to remove a lot of stuff in our headers so why do we use another approach here?

This time it's the other way round:

We need __extension__ only in userspace.

Quoted 2 lines

As for 1 I will try to teach genksyms to accept __extension__ but it seems leess trivial than I expected (most be fooling myself somehow).

We anyway need a way to hide __extension__ from non-gcc userspace C compilers, and it can be hidden from genksyms the same way.

Quoted 1 line

Sam

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#26 lore raw

Re: [-mm patch] make types.h usable for non-gcc C parsers

Quoted 23 lines · Adrian Bunk
Quoted 13 lines · Sam Ravnborg
Quoted 4 lines

It fixes a bug exposed by a -mm only patch, not by the net tree (and 2.6.23-rc3-mm1 doesn't contain the net tree at all).

Quoted 8 lines
Quoted 5 lines

But I'd like a better description, please. Which "non-gcc parser" are we talking about here? Something under ./scripts/. Well, please identify it, and describe what the problem is, and how the proposed patch will address it.
...

It's about parsers like the Sun C compiler and the C parser shipped with genksyms.

Quoted 6 lines

So it is about two bugs.
1) kbuild (genksyms) fails to generate CRC for some symbols
2) allow userspace to parse the header

As for 2 we already use sed to remove a lot of stuff in our headers so why do we use another approach here?

This time it's the other way round:

Quoted 7 lines

We need __extension__ only in userspace.

Quoted 2 lines

As for 1 I will try to teach genksyms to accept __extension__ but it seems leess trivial than I expected (most be fooling myself somehow).

We anyway need a way to hide __extension__ from non-gcc userspace C compilers, and it can be hidden from genksyms the same way.

OK.
I have anyway added support for __extension__ in genksyms. See below patch.

Note: To try this patch out do the following in a fresh tree (no generated files):

$ rm scripts/genksyms/*_shipped
$ apply patch
$ make GENERATE_PARSER=1 ...

In kbuild.git the _shipped files are updated but that would just be noise here.

Sam

Quoted 1 line

From 26132bc829651acce2f124f78dfea43120e52c31 Mon Sep 17 00:00:00 2001

From: Sam Ravnborg <[email protected]>
Date: Tue, 28 Aug 2007 20:28:55 +0200
Subject: [PATCH] kbuild: __extension__ support in genksyms (fix unknown CRC warning)

Recently the __extension__ keyword has been introduced in the kernel. Teach genksyms about this keyword so it can generate correct CRC for exported symbols that uses a symbol marked __extension__. For now only the typedef variant:

	__extension__ typedef ...

is supported.
Later we may add more variants as needed.

This patch contains the actual source file changes. The following patch will hold modifications to the generated files (*_shipped) and only after the second patch the fix has effect.

---
 scripts/genksyms/keywords.gperf |    1 +
 scripts/genksyms/parse.y        |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)
scripts/genksyms/keywords.gperf +1 -0
index c75e0c8..5ef3733 100644
@@ -11,6 +11,7 @@ __attribute, ATTRIBUTE_KEYW
 __attribute__, ATTRIBUTE_KEYW
 __const, CONST_KEYW
 __const__, CONST_KEYW
+__extension__, EXTENSION_KEYW
 __inline, INLINE_KEYW
 __inline__, INLINE_KEYW
 __signed, SIGNED_KEYW
scripts/genksyms/parse.y +4 -1
index ca04c94..408cdf8 100644
@@ -61,6 +61,7 @@ remove_list(struct string_list **pb, struct string_list **pe)
 %token DOUBLE_KEYW
 %token ENUM_KEYW
 %token EXTERN_KEYW
+%token EXTENSION_KEYW
 %token FLOAT_KEYW
 %token INLINE_KEYW
 %token INT_KEYW
@@ -110,7 +111,9 @@ declaration:
 	;
 
 declaration1:
-	TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
+	EXTENSION_KEYW TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
+		{ $$ = $4; }
+	| TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
 		{ $$ = $3; }
 	| simple_declaration
 	| function_definition
Signature · 1 line
1.5.1.rc3.2928.g8e573-dirty
#135 lore raw

Re: [PATCH 1/2] sysctl: Properly register the irda binary sysctl numbers.

In reply to Eric W. Biederman
Quoted 3 lines · Eric W. Biederman

It looks like you don't have CONFIG_SYSCTL_SYSCALL defined, and it appears utsname_syscall and ipcdata_syscall both become NULL pointers if they aren't needed. So the complaint is a false positive.

Yep. Nothing I actually use needs SYSCTL_SYSCALL, so I turned it off to see what breaks...

#136 lore raw

Re: [PATCH 1/2] sysctl: Properly register the irda binary sysctl numbers.

In reply to [email protected]
Quoted 8 lines · [email protected] writes:
Quoted 3 lines · Eric W. Biederman

It looks like you don't have CONFIG_SYSCTL_SYSCALL defined, and it appears utsname_syscall and ipcdata_syscall both become NULL pointers if they aren't needed. So the complaint is a false positive.

Yep. Nothing I actually use needs SYSCTL_SYSCALL, so I turned it off to see what breaks...

Other then glibc (which uses it to see if we are on a SMP system, and has a fallback to /proc/sys) I only found 5 other applications binaries when I was looking hard.

Eric

#192 lore raw

Re: oops at sr_block_release [Re: 2.6.23-rc3-mm1]

In reply to Jiri Slaby
Quoted 40 lines · On Tue, 28 Aug 2007 13:32:57 +0200 Jiri Slaby <[email protected]> wrote:

Andrew Morton napsal(a):

Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

I got this during gxine initialization of ocko.tv live stream without any cd in cdroms:

BUG: unable to handle kernel NULL pointer dereference at virtual address 0000005c
printing eip: f88fbe7a *pde = 00000000
Oops: 0000 [#1] SMP
Modules linked in: ath5k arc4 ecb blkcipher cryptomgr crypto_algapi

rc80211_simple mac80211 cfg80211 nls_cp437 vfat fat usb_storage tun ipv6 floppy parport_pc parport ohci1394 ieee1394 usbhid sr_mod ehci_hcd cdrom ff_memless

Pid: 2809, comm: hald-addon-stor Not tainted (2.6.23-rc3-mm1 #315)
EIP: 0060:[<f88fbe7a>] EFLAGS: 00010246 CPU: 1
EIP is at sr_block_release+0xb/0x2c [sr_mod]
EAX: 00000000 EBX: 00000000 ECX: f88fbe6f EDX: 00000000
ESI: c21c36c0 EDI: c289a780 EBP: c3729f18 ESP: c3729f10
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process hald-addon-stor (pid: 2809, ti=c3729000 task=c1c2be40 task.ti=c3729000)

Stack: 00000000 c21c36c0 c3729f38 c018d7ad c21c36cc c1f9ff80 c21c3730 c21c36c0
       c2a6ada0 dcbb3f80 c3729f40 c018d7dc c3729f4c c018e103 00000010 c3729f74
       c016bc5f 00000000 00000000 c217fa80 c1f9ff80 c2a6ada0 dcbb3f80 c1cc6900
Call Trace:
 [<c0105022>] show_trace_log_lvl+0x1a/0x30
 [<c01050dd>] show_stack_log_lvl+0xa5/0xca
 [<c01051d2>] show_registers+0xd0/0x1c1
 [<c01053cd>] die+0x10a/0x24d
 [<c011afbe>] do_page_fault+0x496/0x608
 [<c03768e2>] error_code+0x72/0x78
 [<c018d7ad>] __blkdev_put+0x125/0x14a
 [<c018d7dc>] blkdev_put+0xa/0xc
 [<c018e103>] blkdev_close+0x29/0x2c
 [<c016bc5f>] __fput+0xa6/0x161
 [<c016bea4>] fput+0x22/0x3b
 [<c016960b>] filp_close+0x41/0x67
 [<c016a78c>] sys_close+0x60/0x9f
 [<c01040ce>] syscall_call+0x7/0xb
 =======================
Code: 0c 81 c3 4c 01 00 00 89 5c 24 08 89 44 24 04 c7 04 24 88 cd 8f f8 e8 99 84
Quoted 4 lines

82 c7 e9 04 fe ff ff 55 89 e5 56 53 8b 80 04 01 00 00 <8b> 40 5c 8b 70 3c 8d 46 18 e8 cf f6 fe ff 89 c3 85 c0 75 07 89
EIP: [<f88fbe7a>] sr_block_release+0xb/0x2c [sr_mod] SS:ESP 0068:c3729f10

Possibly due to remove-bdput-from-do_open-in-fs-block_devc.patch.

That patch is "wrong" and I think the problem which it attempts to address actually lies in the cdrom code. viro was taking a look at it but appears to have recoiled in horror. I'll drop remove-bdput-from-do_open-in-fs-block_devc.patch so let's just watch out for any reoccurrence, thanks.

#193 lore raw
In reply to Andrew Morton
Quoted 1 line · Andrew Morton

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

Sorry for not catching this one sooner, but AFAICT, Fedora didn't ship a glibc that trips over this (2.6.90-12) until Saturday and I installed it yesterday. -22-rc6-mm1 demonstrated the same issue as well.

The issue: vdso and gettimeofday seem to be having a quarrel.

At boot, the system clock is just fine. Right when it hits the 5-minute
uptime mark (and suspiciously close to the jiffie rollover), the date suddenly shoots forward 4096 seconds.

Dumb test script:

#!/bin/bash
log="uptime.uname -r"
touch /root/$log
tail -f /root/$log &
while /bin/true;
do
uptime >> /root/$log
date >> /root/$log
sleep 1
done

Exerpt from runtime:

19:57:55 up 1 min, 0 users, load average: 0.09, 0.05, 0.01
Tue Aug 28 19:57:55 EDT 2007
19:57:56 up 1 min, 0 users, load average: 0.09, 0.05, 0.01
Tue Aug 28 19:57:56 EDT 2007
19:57:57 up 2 min, 0 users, load average: 0.08, 0.05, 0.01
Tue Aug 28 19:57:57 EDT 2007
19:57:58 up 2 min, 0 users, load average: 0.08, 0.05, 0.01
...
20:00:55 up 4 min, 0 users, load average: 0.01, 0.03, 0.00
Tue Aug 28 20:00:55 EDT 2007
20:00:56 up 4 min, 0 users, load average: 0.01, 0.03, 0.00
Tue Aug 28 20:00:56 EDT 2007
20:00:57 up 5 min, 0 users, load average: 0.01, 0.03, 0.00
Tue Aug 28 21:09:15 EDT 2007
20:00:58 up 5 min, 0 users, load average: 0.01, 0.03, 0.00
Tue Aug 28 21:09:16 EDT 2007
20:00:59 up 5 min, 0 users, load average: 0.01, 0.03, 0.00
Tue Aug 28 21:09:17 EDT 2007

uptime keeps reporting the right time, date goes flying ahead. Once we get into this state, I can issue a 'date' command to set the *right* time, and then it will immediately reset back. Doing a 'touch foo; ls -l foo' shows the correct time.

Booting with vdso=0 makes the time/date run normally.

Ideas?

#194 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

On Wed, 29 Aug 2007 10:04:33 EDT, [email protected] said:

(Fixing the Subject: and updating the info)

Quoted 4 lines · Andrew Morton
Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

The issue: vdso and gettimeofday seem to be having a quarrel.

This is also open as a Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=262481

#195 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

Quoted 4 lines · On Wed, 29 Aug 2007 13:37:38 -0400 [email protected] wrote:

On Wed, 29 Aug 2007 10:04:33 EDT, [email protected] said:

(Fixing the Subject: and updating the info)

Quoted 8 lines
Quoted 4 lines · Andrew Morton
Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

The issue: vdso and gettimeofday seem to be having a quarrel.

This is also open as a Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=262481

So it's an interaction between the x86_64 vdso patches in Andi's tree and newer glibc, and we don't know which one is getting it wrong yet?

If I ever get another -mm out the door (have been without electricity for several days) I'll drop the vdso changes until this is sorted out.

#71 lore raw

Re: [Kgdb-bugreport] 2.6.23-rc3-mm1: kgdb build failure on powerpc

In reply to Jason Wessel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 23 lines · Jason Wessel
Quoted 12 lines · Andrew Morton
Quoted 2 lines · On Wed, 22 Aug 2007 17:44:12 -0500 Jason Wessel <[email protected]>…

+ while (!atomic_read(&debugger_active));

eek. We're in the process of hunting down and eliminating exactly this construct. There have been cases where the compiler cached the atomic_read() result in a register, turning the above into an infinite loop.

Quoted 6 lines

Plus we should never add power-burners like that into the kernel anyway. That loop should have a cpu_relax() in it. Which will also fix the
compiler problem described above.

Agreed, and fixed with a cpu_relax.

Quoted 2 lines

Thirdly, please always add a newline when coding statements like that:

Quoted 8 lines
Quoted 3 lines
    while (expr())
        ;

The other instances I found of the same problem in the kgdb core are fixed too.

I merged all the changes into the for_mm branch in the kgdb git tree.

Where is the kgdb git tree?

- -piet

Quoted 9 lines

Thanks,
Jason.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG1gS/JICwm/rv3hoRAhfRAJ42F3QlzGwG4aQbs9hHVMI4kJ9SWQCfXrku UGo97ByKsB9yhyIu5c+2Jh0=
=welB
-----END PGP SIGNATURE-----

#72 lore raw

Re: [Kgdb-bugreport] 2.6.23-rc3-mm1: kgdb build failure on powerpc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 26 lines · Pete/Piet Delaney
Quoted 25 lines · Jason Wessel
Quoted 11 lines · Andrew Morton
Quoted 2 lines · On Wed, 22 Aug 2007 17:44:12 -0500 Jason Wessel <[email protected]>…

+ while (!atomic_read(&debugger_active));

eek. We're in the process of hunting down and eliminating exactly this construct. There have been cases where the compiler cached the atomic_read() result in a register, turning the above into an infinite loop.

Quoted 6 lines

Plus we should never add power-burners like that into the kernel anyway. That loop should have a cpu_relax() in it. Which will also fix the
compiler problem described above.

Agreed, and fixed with a cpu_relax.

Quoted 5 lines

Thirdly, please always add a newline when coding statements like that:

    while (expr())
        ;
Quoted 6 lines
Quoted 4 lines

The other instances I found of the same problem in the kgdb core are fixed too.

I merged all the changes into the for_mm branch in the kgdb git tree.

Where is the kgdb git tree?

Trying:

git clone
http://master.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb.git

- -piet

Quoted 12 lines

-piet

Quoted 7 lines

Thanks,
Jason.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

- -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG1gnFJICwm/rv3hoRApOoAJ9BHXLsIuxDiOCaAFRfAZGwrDXATQCeLL3O bxtr3qz0soPRghPmtSZgOqc=
=kQd1
-----END PGP SIGNATURE-----

#73 lore raw

Re: [Kgdb-bugreport] 2.6.23-rc3-mm1: kgdb build failure on powerpc

In reply to Pete/Piet Delaney

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 26 lines · Pete/Piet Delaney
Quoted 25 lines · Jason Wessel
Quoted 11 lines · Andrew Morton
Quoted 2 lines · On Wed, 22 Aug 2007 17:44:12 -0500 Jason Wessel <[email protected]>…

+ while (!atomic_read(&debugger_active));

eek. We're in the process of hunting down and eliminating exactly this construct. There have been cases where the compiler cached the atomic_read() result in a register, turning the above into an infinite loop.

Quoted 6 lines

Plus we should never add power-burners like that into the kernel anyway. That loop should have a cpu_relax() in it. Which will also fix the
compiler problem described above.

Agreed, and fixed with a cpu_relax.

Quoted 5 lines

Thirdly, please always add a newline when coding statements like that:

    while (expr())
        ;
Quoted 6 lines
Quoted 4 lines

The other instances I found of the same problem in the kgdb core are fixed too.

I merged all the changes into the for_mm branch in the kgdb git tree.

Where is the kgdb git tree?

Why am I getting this when I do:

git clone
http://master.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb.git

-
----------------------------------------------------------------------------
error: Couldn't get
http://master.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb.git/refs/tags/v2.6.11
for tags/v2.6.11
The requested URL returned error: 404
error: Could not interpret tags/v2.6.11 as something to pull
rm: cannot remove directory `/nethome/piet/Src/linux/git/jwessel/linux-2.6-kgdb/.git/clone-tmp':
Directory not empty
/nethome/piet/Src/linux/git/jwessel$
-
----------------------------------------------------------------------------

We are getting a problem with VMware where kernel text is the schedler is getting wacked with four null bytes into the code. Thought I'd use the current linux-2.6-kgdb.git tree and possible the CONFIG_DEBUG_RODATA patch to make kernel text readonly:

https://www.x86-64.org/pipermail/patches/2007-March/003666.html

I thought the kernel text was RO and gdb had to disable it to insert a breakpoint.

- -piet

Quoted 12 lines

-piet

Quoted 7 lines

Thanks,
Jason.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

- -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG1hshJICwm/rv3hoRAhTGAJ46pq69zYHqRmT+yTmRx+RVh8aBtgCfdyFM gl91xCFTy0NJxHalVXpd9Os=
=c8FZ
-----END PGP SIGNATURE-----

#74 lore raw

Re: [Kgdb-bugreport] 2.6.23-rc3-mm1: kgdb build failure on powerpc

Quoted 42 lines · On Wed, 29 Aug 2007 18:19:29 -0700 Pete/Piet Delaney wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 26 lines · Pete/Piet Delaney
Quoted 25 lines · Jason Wessel
Quoted 11 lines · Andrew Morton
Quoted 2 lines · On Wed, 22 Aug 2007 17:44:12 -0500 Jason Wessel <[email protected]>…

+ while (!atomic_read(&debugger_active));

eek. We're in the process of hunting down and eliminating exactly this construct. There have been cases where the compiler cached the atomic_read() result in a register, turning the above into an infinite loop.

Quoted 6 lines

Plus we should never add power-burners like that into the kernel anyway. That loop should have a cpu_relax() in it. Which will also fix the
compiler problem described above.

Agreed, and fixed with a cpu_relax.

Quoted 5 lines

Thirdly, please always add a newline when coding statements like that:

    while (expr())
        ;
Quoted 6 lines
Quoted 4 lines

The other instances I found of the same problem in the kgdb core are fixed too.

I merged all the changes into the for_mm branch in the kgdb git tree.

Where is the kgdb git tree?

Why am I getting this when I do:

git clone
http://master.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb.git

Quoted 13 lines

-
----------------------------------------------------------------------------
error: Couldn't get
http://master.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb.git/refs/tags/v2.6.11
for tags/v2.6.11
The requested URL returned error: 404
error: Could not interpret tags/v2.6.11 as something to pull
rm: cannot remove directory `/nethome/piet/Src/linux/git/jwessel/linux-2.6-kgdb/.git/clone-tmp':
Directory not empty
/nethome/piet/Src/linux/git/jwessel$
-
----------------------------------------------------------------------------

See the URLs at the top of
http://git.kernel.org/?p=linux/kernel/git/jwessel/linux-2.6-kgdb.git;a=summary
and try one of those (the git one preferably).

Quoted 34 lines

We are getting a problem with VMware where kernel text is the schedler is getting wacked with four null bytes into the code. Thought I'd use the current linux-2.6-kgdb.git tree and possible the CONFIG_DEBUG_RODATA patch to make kernel text readonly:

https://www.x86-64.org/pipermail/patches/2007-March/003666.html

I thought the kernel text was RO and gdb had to disable it to insert a breakpoint.

- -piet

Quoted 12 lines

-piet

Quoted 7 lines

Thanks,
Jason.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

- -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

Quoted 10 lines

iD8DBQFG1hshJICwm/rv3hoRAhTGAJ46pq69zYHqRmT+yTmRx+RVh8aBtgCfdyFM gl91xCFTy0NJxHalVXpd9Os=
=c8FZ
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#76 lore raw

Re: [Kgdb-bugreport] 2.6.23-rc3-mm1: kgdb build failure on powerpc

In reply to Pete/Piet Delaney
Quoted 11 lines · Pete/Piet Delaney

We are getting a problem with VMware where kernel text is the schedler is getting wacked with four null bytes into the code. Thought I'd use the current linux-2.6-kgdb.git tree and possible the CONFIG_DEBUG_RODATA patch to make kernel text readonly:

https://www.x86-64.org/pipermail/patches/2007-March/003666.html

I thought the kernel text was RO and gdb had to disable it to insert a breakpoint.

If you are going to make all the kernel text RO, then you are going to have to add some code to the kgdb write memory so as to unprotect a given page or all the breakpoint writes are going to fail. Alternatively you can use HW breakpoints. But, I have no idea if your VM Ware simulated HW emulate HW breakpoint registers or not.

Jason.

#196 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to Andrew Morton

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 2 lines · Andrew Morton

So it's an interaction between the x86_64 vdso patches in Andi's tree and newer glibc, and we don't know which one is getting it wrong yet?

glibc does nothing but call the code in the vdso. We have a function pointer variable which either has the old vsyscall value or the address of the function in the vdso. Everything else is identical. Unless the interface of the vdso function is different (which it shouldn't) I don't think you can blame glibc.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFG1i+K2ijCOnn/RHQRArogAKC3zBeyOzqJRF+x2zj3fBg9iGLdyQCgx9Z3 dv3Izh65+kxKedza6RH3MHk=
=qEdC
-----END PGP SIGNATURE-----

#197 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to Andrew Morton
Quoted 5 lines · Andrew Morton

So it's an interaction between the x86_64 vdso patches in Andi's tree and newer glibc, and we don't know which one is getting it wrong yet?

If I ever get another -mm out the door (have been without electricity for several days) I'll drop the vdso changes until this is sorted out.

Don't bother, I tested this last night against a vanilla 2.6.23-rc3 kernel and it had the same issue as well. So Andi's vdso patches in his tree and/or the -mm kernel aren't to blame - it's in mainline as well. And it's been in for a while - I also hit it with a 2.6.22-rc6-mm1 kernel.

#199 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to Andrew Morton
Quoted 11 lines · Andrew Morton
Quoted 4 lines
Quoted 1 line

The issue: vdso and gettimeofday seem to be having a quarrel.

This is also open as a Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=262481

So it's an interaction between the x86_64 vdso patches in Andi's tree and newer glibc, and we don't know which one is getting it wrong yet?

If I ever get another -mm out the door (have been without electricity for several days) I'll drop the vdso changes until this is sorted out. -

Problem is present in stock 2.6.23-rc too. Still don't know whether it is the new glibc code or the vdso that's causing it, though.

#203 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to Andrew Morton
Quoted 4 lines · Andrew Morton

So it's an interaction between the x86_64 vdso patches in Andi's tree and newer glibc, and we don't know which one is getting it wrong yet?

Just found this duplicated code in 2.6.23-rc4, maybe it was supposed to be something else? The second one was added in the x86_64 vdso patch.

arch/x86_64/kernel/vsyscall.c:

void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)

{
        unsigned long flags;

        write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags);
        /* copy vsyscall data */
        vsyscall_gtod_data.clock.vread = clock->vread;
        vsyscall_gtod_data.clock.cycle_last = clock->cycle_last;
        vsyscall_gtod_data.clock.mask = clock->mask;
        vsyscall_gtod_data.clock.mult = clock->mult;
        vsyscall_gtod_data.clock.shift = clock->shift;
        vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec;
        vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;  <===
        vsyscall_gtod_data.sys_tz = sys_tz;
        vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;  <===
        vsyscall_gtod_data.wall_to_monotonic = wall_to_monotonic;
        write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags);
}
#97 lore raw

Re: [PATCH] Fix lguest page-pinning logic ("lguest: bad stack page 0xc057a000")

In reply to Rusty Russell
Quoted 7 lines · Rusty Russell

If the stack pointer is 0xc057a000, then the first stack page is at 0xc0579000 (the stack pointer is decremented before use). Not calculating this correctly caused guests with CONFIG_DEBUG_PAGEALLOC=y to be killed with a "bad stack page" message: the initial kernel stack was just preceeding the .smp_locks section which CONFIG_DEBUG_PAGEALLOC marks read-only when freeing.

Hello Rusty,

I just could try the patch, sorry for the delay. Albeit it allows to progress a little further in the boot process, lguest seems to like that "section that was just freed" :)

Please note that:
- It could progress to "Freeing SMP alternatives: 13k freed", which is new. Indeed, your patch made the Host to pin 0xc04d3000, which is the good page.
- 0xc04d4000 is the __smp_locks section:

 $ objdump -h vmlinux
 [...]
 20 .data.init_task 00001000  c04d3000  004d3000  003d4000  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 21 .smp_locks    000036c8  c04d4000  004d4000  003d5000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 [...]
[    0.128503] SMP alternatives: switching to UP code
[    0.132846] Freeing SMP alternatives: 13k freed
[    0.135177] BUG: unable to handle kernel paging request at virtual address c04d4000
[    0.135417]  printing eip:
[    0.135505] c01051df
[    0.135564] *pde = 00005067
[    0.135645] *pte = 004d4000
[    0.135756] Oops: 0000 [#1]
[    0.135825] PREEMPT SMP DEBUG_PAGEALLOC
[    0.136039] Modules linked in:
[    0.136205] CPU:    0
[    0.136206] EIP:    0061:[<c01051df>]    Not tainted VLI
[    0.136207] EFLAGS: 00010097   (2.6.23-rc3 #5)
[    0.136665] EIP is at dump_trace+0x5f/0x97
[    0.136738] eax: c0614954   ebx: c04d3ffc   ecx: c0497b00   edx: c04ef641
[    0.136883] esi: c04d3000   edi: c04d3ffd   ebp: c04d3da0   esp: c04d3d90
[    0.137058] ds: 0069   es: 0069   fs: 00d8  gs: 0000  ss: 0069
[    0.137235] Process swapper (pid: 0, ti=c04d3000 task=c04953e0 task.ti=c04d3000)
[    0.137447] Stack: c0109d95 c0614954 c04953e0 00000000 c04d3db4 c010a1f1 c0497b00 c0614954
[    0.137831]        c0614954 c04d3dc4 c0140921 c0144252 c04959c8 c04d3dec c014272f c02eccf5
[    0.138119]        c04959c8 c0614938 c04d3dec 00000001 c04959c8 c0614938 c04953e0 c04d3e4c
[    0.138497] Call Trace:
[    0.138603]  [<c0105231>] show_trace_log_lvl+0x1a/0x2f
[    0.138798]  [<c01052e1>] show_stack_log_lvl+0x9b/0xa3
[    0.138942]  [<c01054c1>] show_registers+0x1d8/0x30d
[    0.139120]  [<c010571d>] die+0x127/0x20a
[    0.139272]  [<c011c470>] do_page_fault+0x512/0x5e6
[    0.139470]  [<c038ec02>] error_code+0x72/0x78
[    0.139678]  [<c010a1f1>] save_stack_trace+0x23/0x3e
[    0.139869]  [<c0140921>] save_trace+0x3a/0x8e
[    0.140049]  [<c014272f>] mark_lock+0x7b/0x471
[    0.140223]  [<c01436fc>] __lock_acquire+0x51a/0xc99
[    0.140374]  [<c0143f0c>] lock_acquire+0x91/0xb5
[    0.140546]  [<c038e491>] _spin_lock_irq+0x47/0x71
[    0.140693]  [<c01354c9>] alloc_pid+0x1ce/0x22f
[    0.140867]  [<c0125ce5>] do_fork+0x15/0x1bf
[    0.141011]  [<c0102339>] kernel_thread+0x88/0x90
[    0.141170]  [<c038b2b8>] rest_init+0x14/0x63
[    0.141345]  [<c04d895e>] start_kernel+0x317/0x31f
[    0.141565]  [<c04ef641>] lguest_init+0x2af/0x2d5
[    0.141736] BUG: unable to handle kernel paging request at virtual address c04d4000
[    0.142195]  printing eip:
[    0.142259] c01051df
[    0.142335] *pde = 00005067
[    0.142418] *pte = 004d4000
[    0.142501] Oops: 0000 [#2]
[    0.142581] PREEMPT SMP DEBUG_PAGEALLOC
[    0.142775] Modules linked in:
[    0.142929] CPU:    0
[    0.142930] EIP:    0061:[<c01051df>]    Not tainted VLI
[    0.142931] EFLAGS: 00010097   (2.6.23-rc3 #5)
[    0.143296] EIP is at dump_trace+0x5f/0x97
[    0.143409] eax: c0430e58   ebx: c04d3ffc   ecx: c0497058   edx: 00000000
[    0.143611] esi: c04d3000   edi: c04d3ffd   ebp: c04d3c1c   esp: c04d3c0c
[    0.143800] ds: 007b   es: 007b   fs: 00d8  gs: 0000  ss: 0069
[    0.143988] Process swapper (pid: 0, ti=c04d3000 task=c04953e0 task.ti=c04d3000)
[    0.144213] Stack: 34373331 c0430e58 00000018 00000000 c04d3c30 c0105231 c0497058 c0430e58
[    0.144634]        c04d3df3 c04d3c54 c01052e1 c0430e58 c0430e58 c04d3d58 c04d3d90 00000000
[    0.145055]        0000002b c04d3d58 c04d3cc0 c01054c1 c0430e58 00000010 c0495614 00000000
[    0.145439] Call Trace:
[    0.145511]  [<c0105231>] show_trace_log_lvl+0x1a/0x2f
[    0.145607]  [<c01052e1>] show_stack_log_lvl+0x9b/0xa3
[    0.145723]  [<c01054c1>] show_registers+0x1d8/0x30d
[    0.145849]  [<c010571d>] die+0x127/0x20a
[    0.145980]  [<c011c470>] do_page_fault+0x512/0x5e6
[    0.146125]  [<c038ec02>] error_code+0x72/0x78
[    0.146281]  [<c0105231>] show_trace_log_lvl+0x1a/0x2f
[    0.146423]  [<c01052e1>] show_stack_log_lvl+0x9b/0xa3
[    0.146587]  [<c01054c1>] show_registers+0x1d8/0x30d
[    0.146746]  [<c010571d>] die+0x127/0x20a
[    0.146895]  [<c011c470>] do_page_fault+0x512/0x5e6
[    0.147061]  [<c038ec02>] error_code+0x72/0x78
[    0.147213]  [<c010a1f1>] save_stack_trace+0x23/0x3e
[    0.147361]  [<c0140921>] save_trace+0x3a/0x8e
[    0.147531]  [<c014272f>] mark_lock+0x7b/0x471
[    0.147681]  [<c01436fc>] __lock_acquire+0x51a/0xc99
[    0.147839]  [<c0143f0c>] lock_acquire+0x91/0xb5
[    0.147987]  [<c038e491>] _spin_lock_irq+0x47/0x71
[    0.148136]  [<c01354c9>] alloc_pid+0x1ce/0x22f
[    0.148284]  [<c0125ce5>] do_fork+0x15/0x1bf
[    0.148458]  [<c0102339>] kernel_thread+0x88/0x90
[    0.148619]  [<c038b2b8>] rest_init+0x14/0x63
[    0.148766]  [<c04d895e>] start_kernel+0x317/0x31f
[    0.148923]  [<c04ef641>] lguest_init+0x2af/0x2d5
[    0.149076] BUG: unable to handle kernel paging request at virtual address c04d4000
[    0.149297]  printing eip:
[    0.149371] c01051df
[    0.149473] *pde = 00005067
[    0.149547] *pte = 004d4000
[    0.149623] Recursive die() failure, output suppressed
[    0.149807] Kernel panic - not syncing: Attempted to kill the idle task!

Regards,
Frederik

#98 lore raw

Re: [PATCH] Fix lguest page-pinning logic ("lguest: bad stack page 0xc057a000")

Quoted 8 lines · Frederik Deweerdt
Quoted 7 lines · Rusty Russell

If the stack pointer is 0xc057a000, then the first stack page is at 0xc0579000 (the stack pointer is decremented before use). Not calculating this correctly caused guests with CONFIG_DEBUG_PAGEALLOC=y to be killed with a "bad stack page" message: the initial kernel stack was just preceeding the .smp_locks section which CONFIG_DEBUG_PAGEALLOC marks read-only when freeing.

Quoted 5 lines

Hello Rusty,

I just could try the patch, sorry for the delay. Albeit it allows to progress a little further in the boot process, lguest seems to like that "section that was just freed" :)

Yes, I got this too, then had to jump on a plane (and away from my test box).

Turns out this actually isn't my bug (yay!).

See next patch...
Rusty.

#99 lore raw

PATCH 1/1 Fix out-by-one error in traps.c

In reply to Frederik Deweerdt

We don't care if ebp is on the stack, we care about ebp + 4. Without this, lguest (with CONFIG_DEBUG_LOCKDEP) can touch a page unmapped by CONFIG_DEBUG_PAGEALLOC.

arch/i386/kernel/traps.c +1 -1
diff -r b0b1ab8ecf48 arch/i386/kernel/traps.c
@@ -100,7 +100,7 @@ print_context_stack(struct thread_info *tinfo,
 	unsigned long addr;
 
 #ifdef	CONFIG_FRAME_POINTER
-	while (valid_stack_ptr(tinfo, (void *)ebp)) {
+	while (valid_stack_ptr(tinfo, (void *)ebp + 4)) {
 		unsigned long new_ebp;
 		addr = *(unsigned long *)(ebp + 4);
 		ops->address(data, addr);
#100 lore raw

Re: [PATCH] Fix out-by-one error in traps.c

Quoted 4 lines · Rusty Russell

We don't care if ebp is on the stack, we care about ebp + 4. Without this, lguest (with CONFIG_DEBUG_LOCKDEP) can touch a page unmapped by CONFIG_DEBUG_PAGEALLOC.

Hmm.. This *really* cannot happen with a normal kernel - it implies that the stack has crossed into an invalid page.

Why is that allowed with lguest? What kind of code could validly *ever* come in here and cause problems?

I'm getting the nervous feeling that lguest is really doing things that shouldn't be done, or is using normal kernel functions in ways that they should not be used.

In other words, yes, we load off "ebp+4", but I really don't see it being a valid situation wher ebp itself isn't also a valid stack frame. The stack is not sized for "off-by-one" errors - we're supposed to always have plenty of stack space free, and if you care about "off-by-one", you're not just living on the edge, you're way beyond it!

IOW, please explain why/how lguest ever triggers a case where this would possibly matter!

Linus

#101 lore raw

Re: [PATCH] Fix out-by-one error in traps.c

Quoted 9 lines · Linus Torvalds
Quoted 4 lines · Rusty Russell

We don't care if ebp is on the stack, we care about ebp + 4. Without this, lguest (with CONFIG_DEBUG_LOCKDEP) can touch a page unmapped by CONFIG_DEBUG_PAGEALLOC.

Hmm.. This *really* cannot happen with a normal kernel - it implies that the stack has crossed into an invalid page.

AFAICT, a corrupt stack could lead us to touch a page which isn't mapped. If we assume the stack isn't corrupt, we don't have to do the valid_stack_ptr() check at all...

Quoted 2 lines

Why is that allowed with lguest? What kind of code could validly *ever* come in here and cause problems?

head.S pushes a "$0" on the stack to stop the unwinder, lguest doesn't.

Here's the lguest fix, but I still think the real fix posted previously is more important.

Cheers,
Rusty.
===
lguest doesn't terminate stack, upsets unwinder

Copy head.S, which puts a 0 on the stack to terminate ebp-chasing backtrace code.

drivers/lguest/lguest_asm.S +2 -0
diff -r 926e5cc964fd drivers/lguest/lguest_asm.S
@@ -19,6 +19,8 @@
  	movl $(init_thread_union+THREAD_SIZE),%esp
 	movl %esi, %eax
 	addl $__PAGE_OFFSET, %eax
+	/* Fake value to stop backtraces with CONFIG_FRAME_POINTER */
+	pushl $0
 	jmp lguest_init
 
 /*G:055 We create a macro which puts the assembler code between lgstart_ and
#102 lore raw

Re: [PATCH] Fix out-by-one error in traps.c

Quoted 8 lines · Rusty Russell
Quoted 3 lines · Linus Torvalds

Hmm.. This *really* cannot happen with a normal kernel - it implies that the stack has crossed into an invalid page.

AFAICT, a corrupt stack could lead us to touch a page which isn't mapped. If we assume the stack isn't corrupt, we don't have to do the valid_stack_ptr() check at all...

Fair enough. That said, you seem to see this even without a corrupt stack.

Quoted 4 lines
Quoted 2 lines

Why is that allowed with lguest? What kind of code could validly *ever* come in here and cause problems?

head.S pushes a "$0" on the stack to stop the unwinder, lguest doesn't.

The unwinder should stop when it sees an invalid frame pointer, and even without the push 0 I'd have expected it to be invalid.

But I suspect lguest triggers another thing: you actually make the stack start at the *very*top* of the stack area. Afaik, normal x86 does not. A normal x86 kernel will start off with a pt_regs[] setup, I think - ie the kernel stack is always set up so that it has the "return to user mode" information.

And *that* difference may be what triggers this for lguest, even though it can never trigger for a "real" kernel.

But your patch does improve the sanity checking of the frame pointer. That said, I think the following patch improves it more: does this also work for you? (Totally untested, but it looks like the RightThing(tm) to do)

Linus

---

arch/i386/kernel/traps.c +4 -4
index cfffe3d..b9998f3 100644
@@ -100,10 +100,10 @@ asmlinkage void machine_check(void);
 int kstack_depth_to_print = 24;
 static unsigned int code_bytes = 64;
 
-static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
+static inline int valid_stack_ptr(struct thread_info *tinfo, void *p, unsigned size)
 {
 	return	p > (void *)tinfo &&
-		p < (void *)tinfo + THREAD_SIZE - 3;
+		p <= (void *)tinfo + THREAD_SIZE - size;
 }
 
 static inline unsigned long print_context_stack(struct thread_info *tinfo,
@@ -113,7 +113,7 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
 	unsigned long addr;
 
 #ifdef	CONFIG_FRAME_POINTER
-	while (valid_stack_ptr(tinfo, (void *)ebp)) {
+	while (valid_stack_ptr(tinfo, (void *)ebp, 2*sizeof(unsigned long))) {
 		unsigned long new_ebp;
 		addr = *(unsigned long *)(ebp + 4);
 		ops->address(data, addr);
@@ -129,7 +129,7 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
 		ebp = new_ebp;
 	}
 #else
-	while (valid_stack_ptr(tinfo, stack)) {
+	while (valid_stack_ptr(tinfo, stack, sizeof(*stack))) {
 		addr = *stack++;
 		if (__kernel_text_address(addr))
 			ops->address(data, addr);
#103 lore raw

Re: [PATCH] Fix out-by-one error in traps.c

Quoted 4 lines · Linus Torvalds
Quoted 1 line · Rusty Russell

head.S pushes a "$0" on the stack to stop the unwinder, lguest doesn't.

Quoted 8 lines

The unwinder should stop when it sees an invalid frame pointer, and even without the push 0 I'd have expected it to be invalid.

But I suspect lguest triggers another thing: you actually make the stack start at the *very*top* of the stack area. Afaik, normal x86 does not. A normal x86 kernel will start off with a pt_regs[] setup, I think - ie the kernel stack is always set up so that it has the "return to user mode" information.

This is only for the initial booting stack (init_thread_union); see arch/i386/kernel/head.S:

	/* Set up the stack pointer */
	lss stack_start,%esp
	...
	pushl $0		# fake return address for unwinder
	...
.data
ENTRY(stack_start)
	.long init_thread_union+THREAD_SIZE
	.long __BOOT_DS

lguest_asm.S missed the pushl $0 (lguest doesn't boot via head.S. I'd like to change that for 2.6.24, but it involved perturbing that code so maybe not).

Quoted 3 lines

But your patch does improve the sanity checking of the frame pointer. That said, I think the following patch improves it more: does this also work for you? (Totally untested, but it looks like the RightThing(tm) to do)

Yes, looks good. Perhaps one additional magic num removal:

arch/i386/kernel/traps.c static inline unsigned long print_context_stack(struct thread_info *tinfo, · line 118

Quoted 5 lines

#ifdef CONFIG_FRAME_POINTER

arch/i386/kernel/traps.c +1 -1
-	while (valid_stack_ptr(tinfo, (void *)ebp)) {
+	while (valid_stack_ptr(tinfo, (void *)ebp, 2*sizeof(unsigned long))) {
 		unsigned long new_ebp;
 		addr = *(unsigned long *)(ebp + 4);

*((unsigned long *)ebp + 1)?

Thanks,
Rusty.

#104 lore raw

Re: [PATCH] Fix out-by-one error in traps.c

Quoted 7 lines · Rusty Russell

This is only for the initial booting stack (init_thread_union); see arch/i386/kernel/head.S:

	/* Set up the stack pointer */
	lss stack_start,%esp
	...
	pushl $0		# fake return address for unwinder

Ok, we should fix that. We should just make it look like all other stack frames.

There is other code in the kernel that "knows" that all kernel stacks have the fields for the user stack return on it, namely the ptrace code etc. Now, the initial stack is hopefully never *accessed* by that kind of code, but this kind of special-case code is just wrong.

Quoted 5 lines
Quoted 3 lines

But your patch does improve the sanity checking of the frame pointer. That said, I think the following patch improves it more: does this also work for you? (Totally untested, but it looks like the RightThing(tm) to do)

Yes, looks good. Perhaps one additional magic num removal:

Well, we might as well then just make the code readable instead. IOW, how about this one, which just declares a structure that describes the stack frame thing? That just makes everything clearer, since we can then use "sizeof(that structure)" instead of using the magic "2*sizeof(unsigned long)".

Linus

---

arch/i386/kernel/traps.c +21 -12
index cfffe3d..47b0bef 100644
@@ -100,36 +100,45 @@ asmlinkage void machine_check(void);
 int kstack_depth_to_print = 24;
 static unsigned int code_bytes = 64;
 
-static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
+static inline int valid_stack_ptr(struct thread_info *tinfo, void *p, unsigned size)
 {
 	return	p > (void *)tinfo &&
-		p < (void *)tinfo + THREAD_SIZE - 3;
+		p <= (void *)tinfo + THREAD_SIZE - size;
 }
 
+/* The form of the top of the frame on the stack */
+struct stack_frame {
+	struct stack_frame *next_frame;
+	unsigned long return_address;
+};
+
 static inline unsigned long print_context_stack(struct thread_info *tinfo,
 				unsigned long *stack, unsigned long ebp,
 				struct stacktrace_ops *ops, void *data)
 {
-	unsigned long addr;
-
 #ifdef	CONFIG_FRAME_POINTER
-	while (valid_stack_ptr(tinfo, (void *)ebp)) {
-		unsigned long new_ebp;
-		addr = *(unsigned long *)(ebp + 4);
+	struct stack_frame *frame = (struct stack_frame *)ebp;
+	while (valid_stack_ptr(tinfo, frame, sizeof(*frame))) {
+		struct stack_frame *next;
+		unsigned long addr;
+
+		addr = frame->return_address;
 		ops->address(data, addr);
 		/*
 		 * break out of recursive entries (such as
 		 * end_of_stack_stop_unwind_function). Also,
 		 * we can never allow a frame pointer to
 		 * move downwards!
-	 	 */
-	 	new_ebp = *(unsigned long *)ebp;
-		if (new_ebp <= ebp)
+		 */
+		next = frame->next_frame;
+		if (next <= frame)
 			break;
-		ebp = new_ebp;
+		frame = next;
 	}
 #else
-	while (valid_stack_ptr(tinfo, stack)) {
+	while (valid_stack_ptr(tinfo, stack, sizeof(*stack))) {
+		unsigned long addr;
+
 		addr = *stack++;
 		if (__kernel_text_address(addr))
 			ops->address(data, addr);
#198 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to [email protected]
Quoted 5 lines · On 08/30/2007 10:08 AM, [email protected] wrote:
Quoted 3 lines · Andrew Morton

So it's an interaction between the x86_64 vdso patches in Andi's tree and newer glibc, and we don't know which one is getting it wrong yet?

Quoted 8 lines
Quoted 2 lines

If I ever get another -mm out the door (have been without electricity for several days) I'll drop the vdso changes until this is sorted out.

Don't bother, I tested this last night against a vanilla 2.6.23-rc3 kernel and it had the same issue as well. So Andi's vdso patches in his tree and/or the -mm kernel aren't to blame - it's in mainline as well. And it's been in for a while - I also hit it with a 2.6.22-rc6-mm1 kernel.

We also have:

http://lkml.org/lkml/2007/7/29/376

(Time repeatedly jumps backwards ~4400 seconds.)

#204 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to Chuck Ebbert
Quoted 12 lines
        write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags);
        /* copy vsyscall data */
        vsyscall_gtod_data.clock.vread = clock->vread;
        vsyscall_gtod_data.clock.cycle_last = clock->cycle_last;
        vsyscall_gtod_data.clock.mask = clock->mask;
        vsyscall_gtod_data.clock.mult = clock->mult;
        vsyscall_gtod_data.clock.shift = clock->shift;
        vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec;
        vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;  <===
        vsyscall_gtod_data.sys_tz = sys_tz;
        vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;  <===

Must have been a (harmless) merging mistake, but I bet gcc optimizes it out anyways.

-Andi

#105 lore raw

Re: [PATCH] Fix out-by-one error in traps.c

In reply to Linus Torvalds
Quoted 10 lines · Linus Torvalds
Quoted 7 lines · Rusty Russell

This is only for the initial booting stack (init_thread_union); see arch/i386/kernel/head.S:

	/* Set up the stack pointer */
	lss stack_start,%esp
	...
	pushl $0		# fake return address for unwinder
Quoted 7 lines

Ok, we should fix that. We should just make it look like all other stack frames.

There is other code in the kernel that "knows" that all kernel stacks have the fields for the user stack return on it, namely the ptrace code etc. Now, the initial stack is hopefully never *accessed* by that kind of code, but this kind of special-case code is just wrong.

Yes, but -ETIMEDOUT. Maybe for 2.6.24...

Quoted 5 lines

IOW, how
about this one, which just declares a structure that describes the stack frame thing? That just makes everything clearer, since we can then use "sizeof(that structure)" instead of using the magic "2*sizeof(unsigned long)".

Much nicer, thanks.

Rusty.

#155 lore raw

Clock trouble retest results with 2.6.23-rc4-mm1 (was: 2.6.23-rc3-mm1)

In reply to Andrew Morton

Am 25.08.2007 05:30 schrieb Andrew Morton:

Quoted 8 lines · On Sat, 25 Aug 2007 02:47:59 +0200 Tilman Schmidt <[email protected]> wrote:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

- on console early during boot, also in SuSE's /var/log/boot.msg:

your system time is not correct:
Wed Jul 13 13:15:31 UTC 1910
setting system time to:
Tue Jul 24 00:00:00 UTC 2007

With 2.6.23-rc4-mm1 this doesn't happen anymore, so whatever it was seems to be fixed.

Quoted 2 lines
Quoted 2 lines
tmp/bootmsg-2.6.23-rc3-mm1 renamed from tmp/bootmsg-2.6.23-rc3 +0 -0

[...]

Quoted 5 lines
Quoted 5 lines

<6>..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
-<6>checking TSC synchronization [CPU#0 -> CPU#1]: passed. +<6>checking TSC synchronization [CPU#0 -> CPU#1]:
+<4>Measured 32 cycles TSC warp between CPUs, turning off TSC clock. +<4>Marking TSC unstable due to: check_tsc_sync_source failed.

This still happens identically with 2.6.23-rc4-mm1. Mainline kernels like my TSC, -mm kernels don't.

Quoted 4 lines
Quoted 2 lines

-<7>hpet_resources: 0xfed00000 is busy
+<4>hpet_acpi_add: no address or irqs in _CRS

oh boy

2.6.23-rc4-mm1 reverts to mainline behaviour here. (ie. "busy" instead of "no address or irqs") Dunno if that's good or bad.

Quoted 3 lines
Quoted 1 line

+<4>thermal: Unknown symbol acpi_processor_set_thermal_limit

I think there are acpi fixes in Len's latest tree which will fix this.

Gone in 2.6.23-rc4-mm1.

HTH
Tilman

Signature · 4 lines
Tilman Schmidt                          E-Mail: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
#205 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to Andi Kleen
Quoted 12 lines · Andi Kleen
Quoted 11 lines
        write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags);
        /* copy vsyscall data */
        vsyscall_gtod_data.clock.vread = clock->vread;
        vsyscall_gtod_data.clock.cycle_last = clock->cycle_last;
        vsyscall_gtod_data.clock.mask = clock->mask;
        vsyscall_gtod_data.clock.mult = clock->mult;
        vsyscall_gtod_data.clock.shift = clock->shift;
        vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec;
        vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;  <===
        vsyscall_gtod_data.sys_tz = sys_tz;
        vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;  <===
Quoted 3 lines

Must have been a (harmless) merging mistake, but I bet gcc optimizes it out anyways.

I did find this after some digging:

In the vdso code:

static inline long vgetns(void)

{
        cycles_t (*vread)(void);
        vread = gtod->clock.vread;
        return ((vread() - gtod->clock.cycle_last) * gtod->clock.mult) >>
                gtod->clock.shift;
}

Looks like an open-coded version of this in the kernel timekeeping code:

static inline s64 __get_nsec_offset(void)

{
        cycle_t cycle_now, cycle_delta;
        s64 ns_offset;

        /* read clocksource: */
        cycle_now = clocksource_read(clock);

        /* calculate the delta since the last update_wall_time: */
        cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;

        /* convert to nanoseconds: */
        ns_offset = cyc2ns(clock, cycle_delta);

        return ns_offset;
}

But the vdso version isn't doing any masking. And the mask is different for different clocksources, so it has to track the underlying kernel's clocksource when it gets changed.

#206 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

Quoted 12 lines

In the vdso code:

static inline long vgetns(void)

{
        cycles_t (*vread)(void);
        vread = gtod->clock.vread;
        return ((vread() - gtod->clock.cycle_last) * gtod->clock.mult) >>
                gtod->clock.shift;
}
Quoted 1 line

Looks like an open-coded version of this in the kernel timekeeping code:

vdso code needs to be all inlined because the vdso runs in ring 3 and cannot access other kernel code.

It was opencoded it to have more control over the code (vdso requirements are a bit peculiar).

Quoted 3 lines

But the vdso version isn't doing any masking. And the mask is different for different clocksources, so it has to track the underlying kernel's clocksource when it gets changed.

vdso effectively only supports TSC and HPET (the other clock sources are not accessible from ring 3)

TSC doesn't need a mask, but many HPETs need a 32bit mask; good point.

Does adding the mask to vgetns make the clock problems go away?

-Andi

#200 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to Chuck Ebbert
Quoted 9 lines · Chuck Ebbert
Quoted 8 lines · Andrew Morton
Quoted 4 lines
Quoted 1 line

The issue: vdso and gettimeofday seem to be having a quarrel.

This is also open as a Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=262481

So it's an interaction between the x86_64 vdso patches in Andi's tree and newer glibc, and we don't know which one is getting it wrong yet?

Quoted 6 lines
Quoted 3 lines

If I ever get another -mm out the door (have been without electricity for several days) I'll drop the vdso changes until this is sorted out. -

Problem is present in stock 2.6.23-rc too. Still don't know whether it is the new glibc code or the vdso that's causing it, though.

Updating on this issue: Both myself and another person have reported on
the RedHat bugzilla that it's a clocksource issue - if you are using the hpet clocksource, the time warps, but booting with clocksource=acpi_pm works.

This ring any bells?

#207 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to Andi Kleen
Quoted 2 lines · Andi Kleen

vdso effectively only supports TSC and HPET (the other clock sources are not accessible from ring 3)

Ahh.. that explains why acpi_pm clocksource doesn't trip over the problem....

#201 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to [email protected]
Quoted 6 lines

Updating on this issue: Both myself and another person have reported on
the RedHat bugzilla that it's a clocksource issue - if you are using the hpet clocksource, the time warps, but booting with clocksource=acpi_pm works.

This ring any bells?

Does this patch fix it?
-Andi

Add missing mask operation to vdso

vdso vgetns() didn't mask the time source offset calculation, which could lead to time problems with 32bit HPET. Add the masking.

Thanks to Chuck Ebbert for tracking down.

arch/x86_64/vdso/vclock_gettime.c +3 -2
Index: linux/arch/x86_64/vdso/vclock_gettime.c
===================================================================
@@ -34,10 +34,11 @@ static long vdso_fallback_gettime(long c
 
 static inline long vgetns(void)
 {
+	long v;
 	cycles_t (*vread)(void);
 	vread = gtod->clock.vread;
-	return ((vread() - gtod->clock.cycle_last) * gtod->clock.mult) >>
-		gtod->clock.shift;
+	v = (vread() - gtod->clock.cycle_last) & gtod->clock.mask;
+	return (v * gtod->clock.mult) >> gtod->clock.shift;
 }
 
 static noinline int do_realtime(struct timespec *ts)
#158 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

In reply to Jiri Slaby
Quoted 117 lines · Jiri Slaby

Does this went through to your boxes? Any progress, clue, idea?

Jiri Slaby napsal(a):

Quoted 114 lines

Andrew Morton napsal(a):

Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

Hi,

I've found a regression against 2.6.23-rc2-mm2. X server shutdown freezes (untainted) kernel hardly. Nothing on netconsole, X output follows:

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: Fedora Core 7 Red Hat, Inc.
Current Operating System: Linux bellona 2.6.23-rc3-mm1 #315 SMP Wed Aug 22 21:43:06 CEST 2007 i686
Build Date: 11 June 2007
Build ID: xorg-x11-server 1.3.0.0-9.fc7
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Aug 26 14:22:43 2007 (==) Using config file: "/etc/X11/xorg.conf"
(WW) RADEON: No matching Device section for instance (BusID PCI:1:0:1) found (**) RADEON(0): RADEONPreInit
(II) Module already built-in
(II) Module already built-in
(II) Module already built-in
(**) RADEON(0): RADEONScreenInit f0000000 0
(**) RADEON(0): Map: 0xf0000000, 0x04000000
(**) RADEON(0): RADEONSave
(**) RADEON(0): RADEONSaveMode(0x8240870)
(**) RADEON(0): Read: 0x0000000c 0x00030065 0x00000000
(**) RADEON(0): Read: rd=12, fd=101, pd=3
(**) RADEON(0): RADEONSaveMode returns 0x8240870
(**) RADEON(0): DRI New memory map param
(**) RADEON(0): RADEONInitMemoryMap() :

(**) RADEON(0):   mem_size         : 0x04000000
(**) RADEON(0):   MC_FB_LOCATION   : 0xf3fff000
(**) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0
(**) RADEON(0): RADEONModeInit()
1280x1024     108.00  1280 1328 1440 1688  1024 1025 1028 1066 (24,32) +H +V
1280x1024     108.00  1280 1328 1440 1688  1024 1025 1028 1066 (24,32) +H +V

(**) RADEON(0): Pitch = 10485920 bytes (virtualX = 1280, displayWidth = 1280) (**) RADEON(0): dc=10800, of=21600, fd=96, pd=2
(**) RADEON(0): RADEONInit returns 0x8241220
(**) RADEON(0): RADEONRestoreMode()
(**) RADEON(0): RADEONRestoreMode(0x8241220)
(**) RADEON(0): RADEONRestoreMemMapRegisters() :

(**) RADEON(0):   MC_FB_LOCATION   : 0xf3fff000
(**) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0
(**) RADEON(0):   Map Changed ! Applying ...
(**) RADEON(0):   Map applied, resetting engine ...

(**) RADEON(0): Updating display base addresses...
(**) RADEON(0): Memory map updated.
(**) RADEON(0): Programming CRTC1, offset: 0x00000000 (**) RADEON(0): Wrote: 0x0000000c 0x00010060 0x00000000 (0x0000a400) (**) RADEON(0): Wrote: rd=12, fd=96, pd=1
(**) RADEON(0): GRPH_BUFFER_CNTL from 20205c5c to 20125c5c (**) RADEON(0): RADEONSaveScreen(0)
(**) RADEON(0): Setting up initial surfaces
(**) RADEON(0): Initializing fb layer
(**) RADEON(0): Setting up accel memmap
(**) RADEON(0): Initializing backing store
(**) RADEON(0): DRI Finishing init !
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): GRPH_BUFFER_CNTL from 20205c5c to 20125c5c (**) RADEON(0): Setting up final surfaces
(**) RADEON(0): Initializing Acceleration
(**) RADEON(0): EngineInit (32/32)
(**) RADEON(0): Pitch for acceleration = 160
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): Initializing DPMS
(**) RADEON(0): Initializing Cursor
(**) RADEON(0): Initializing color map
(**) RADEON(0): Initializing DGA
(**) RADEON(0): Initializing Xv
(**) RADEON(0): RADEONScreenInit finished
(**) RADEON(0): RADEONSaveScreen(2)
(**) RADEON(0): RADEONCloseScreen
(**) RADEON(0): RADEONDRIStop
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): RADEONDisplayPowerManagementSet(0,0x0) (**) RADEON(0): RADEONRestore
(**) RADEON(0): RADEONRestoreMode()
(**) RADEON(0): RADEONRestoreMode(0x8240870)
(**) RADEON(0): RADEONRestoreMemMapRegisters() :

(**) RADEON(0):   MC_FB_LOCATION   : 0x1fff0000
(**) RADEON(0):   MC_AGP_LOCATION  : 0x27ff2000
(**) RADEON(0):   Map Changed ! Applying ...
(**) RADEON(0):   Map applied, resetting engine ...

(**) RADEON(0): Updating display base addresses...
(**) RADEON(0): Memory map updated.
(**) RADEON(0): Programming CRTC1, offset: 0x00000000 (**) RADEON(0): Wrote: 0x0000000c 0x00030065 0x00000000 (0x0000a400) (**) RADEON(0): Wrote: rd=12, fd=101, pd=3
(**) RADEON(0): Disposing accel...
(**) RADEON(0): Disposing cusor info
(**) RADEON(0): Disposing DGA
(**) RADEON(0): Unmapping memory
(**) RADEON(0): RADEONDRICloseScreen

the only difference is, that 2.6.23-rc2-mm2 writes further

FreeFontPath: FPE "/usr/share/X11/fonts/misc:unscaled" refcount is 2, should be 1; fixing.

and exits succesfully (note that these messages are taken on remote host, X runned remotely).

Both vesa and radeon + Option "NoAccel" "true" works obviously fine.

Also intel on integrated i915 causes this (NoAccell has no effect in this case). Note that also 2.6.23-rc4-mm1 is affected by this behaviour.
I have a trace for you:
http://www.fi.muni.cz/~xslaby/sklad/panics/x-freeze.png
(this is the only what I'm able to grab so far)

regards,

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#159 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

Quoted 117 lines · On Sun, 09 Sep 2007 13:44:56 +0200 Jiri Slaby <[email protected]> wrote:
Quoted 116 lines · Jiri Slaby

Does this went through to your boxes? Any progress, clue, idea?

Jiri Slaby napsal(a):

Quoted 113 lines

Andrew Morton napsal(a):

Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

Hi,

I've found a regression against 2.6.23-rc2-mm2. X server shutdown freezes (untainted) kernel hardly. Nothing on netconsole, X output follows:

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: Fedora Core 7 Red Hat, Inc.
Current Operating System: Linux bellona 2.6.23-rc3-mm1 #315 SMP Wed Aug 22 21:43:06 CEST 2007 i686
Build Date: 11 June 2007
Build ID: xorg-x11-server 1.3.0.0-9.fc7
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Aug 26 14:22:43 2007 (==) Using config file: "/etc/X11/xorg.conf"
(WW) RADEON: No matching Device section for instance (BusID PCI:1:0:1) found (**) RADEON(0): RADEONPreInit
(II) Module already built-in
(II) Module already built-in
(II) Module already built-in
(**) RADEON(0): RADEONScreenInit f0000000 0
(**) RADEON(0): Map: 0xf0000000, 0x04000000
(**) RADEON(0): RADEONSave
(**) RADEON(0): RADEONSaveMode(0x8240870)
(**) RADEON(0): Read: 0x0000000c 0x00030065 0x00000000
(**) RADEON(0): Read: rd=12, fd=101, pd=3
(**) RADEON(0): RADEONSaveMode returns 0x8240870
(**) RADEON(0): DRI New memory map param
(**) RADEON(0): RADEONInitMemoryMap() :

(**) RADEON(0):   mem_size         : 0x04000000
(**) RADEON(0):   MC_FB_LOCATION   : 0xf3fff000
(**) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0
(**) RADEON(0): RADEONModeInit()
1280x1024     108.00  1280 1328 1440 1688  1024 1025 1028 1066 (24,32) +H +V
1280x1024     108.00  1280 1328 1440 1688  1024 1025 1028 1066 (24,32) +H +V

(**) RADEON(0): Pitch = 10485920 bytes (virtualX = 1280, displayWidth = 1280) (**) RADEON(0): dc=10800, of=21600, fd=96, pd=2
(**) RADEON(0): RADEONInit returns 0x8241220
(**) RADEON(0): RADEONRestoreMode()
(**) RADEON(0): RADEONRestoreMode(0x8241220)
(**) RADEON(0): RADEONRestoreMemMapRegisters() :

(**) RADEON(0):   MC_FB_LOCATION   : 0xf3fff000
(**) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0
(**) RADEON(0):   Map Changed ! Applying ...
(**) RADEON(0):   Map applied, resetting engine ...

(**) RADEON(0): Updating display base addresses...
(**) RADEON(0): Memory map updated.
(**) RADEON(0): Programming CRTC1, offset: 0x00000000 (**) RADEON(0): Wrote: 0x0000000c 0x00010060 0x00000000 (0x0000a400) (**) RADEON(0): Wrote: rd=12, fd=96, pd=1
(**) RADEON(0): GRPH_BUFFER_CNTL from 20205c5c to 20125c5c (**) RADEON(0): RADEONSaveScreen(0)
(**) RADEON(0): Setting up initial surfaces
(**) RADEON(0): Initializing fb layer
(**) RADEON(0): Setting up accel memmap
(**) RADEON(0): Initializing backing store
(**) RADEON(0): DRI Finishing init !
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): GRPH_BUFFER_CNTL from 20205c5c to 20125c5c (**) RADEON(0): Setting up final surfaces
(**) RADEON(0): Initializing Acceleration
(**) RADEON(0): EngineInit (32/32)
(**) RADEON(0): Pitch for acceleration = 160
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): Initializing DPMS
(**) RADEON(0): Initializing Cursor
(**) RADEON(0): Initializing color map
(**) RADEON(0): Initializing DGA
(**) RADEON(0): Initializing Xv
(**) RADEON(0): RADEONScreenInit finished
(**) RADEON(0): RADEONSaveScreen(2)
(**) RADEON(0): RADEONCloseScreen
(**) RADEON(0): RADEONDRIStop
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): RADEONDisplayPowerManagementSet(0,0x0) (**) RADEON(0): RADEONRestore
(**) RADEON(0): RADEONRestoreMode()
(**) RADEON(0): RADEONRestoreMode(0x8240870)
(**) RADEON(0): RADEONRestoreMemMapRegisters() :

(**) RADEON(0):   MC_FB_LOCATION   : 0x1fff0000
(**) RADEON(0):   MC_AGP_LOCATION  : 0x27ff2000
(**) RADEON(0):   Map Changed ! Applying ...
(**) RADEON(0):   Map applied, resetting engine ...

(**) RADEON(0): Updating display base addresses...
(**) RADEON(0): Memory map updated.
(**) RADEON(0): Programming CRTC1, offset: 0x00000000 (**) RADEON(0): Wrote: 0x0000000c 0x00030065 0x00000000 (0x0000a400) (**) RADEON(0): Wrote: rd=12, fd=101, pd=3
(**) RADEON(0): Disposing accel...
(**) RADEON(0): Disposing cusor info
(**) RADEON(0): Disposing DGA
(**) RADEON(0): Unmapping memory
(**) RADEON(0): RADEONDRICloseScreen

the only difference is, that 2.6.23-rc2-mm2 writes further

FreeFontPath: FPE "/usr/share/X11/fonts/misc:unscaled" refcount is 2, should be 1; fixing.

and exits succesfully (note that these messages are taken on remote host, X runned remotely).

Quoted 8 lines
Quoted 1 line
Quoted 1 line

Both vesa and radeon + Option "NoAccel" "true" works obviously fine.

Also intel on integrated i915 causes this (NoAccell has no effect in this case). Note that also 2.6.23-rc4-mm1 is affected by this behaviour.
I have a trace for you:
http://www.fi.muni.cz/~xslaby/sklad/panics/x-freeze.png
(this is the only what I'm able to grab so far)

afacit everything on that call trace is good. I guess it's possible that one of the higher-level loops has gone infinite (eg, the one in agp_remove_controller()).

Are you able to get netconsole working, and run sysrq-P and sysrq-T ten or so times, see if it's always stuck in the same place on the same CPU?

#160 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

Removed [email protected] (dead e-mail)

Quoted 5 lines · Andrew Morton
Quoted 3 lines · On Sun, 09 Sep 2007 13:44:56 +0200 Jiri Slaby <[email protected]> wrote:
Quoted 2 lines · Jiri Slaby

Does this went through to your boxes? Any progress, clue, idea?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Jiri Slaby napsal(a):

Quoted 6 lines

Andrew Morton napsal(a):

Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

Hi,

I've found a regression against 2.6.23-rc2-mm2. X server shutdown freezes (untainted) kernel hardly. Nothing on netconsole, X output follows:

--------------------------------^^^

sorry, both netconsole and my usb devices (including my keyboard -- no numlock led switch) are dead. The trace I've taken appears on the screen after a while.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: Fedora Core 7 Red Hat, Inc.
Current Operating System: Linux bellona 2.6.23-rc3-mm1 #315 SMP Wed Aug 22

[...]

Quoted 20 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines

(**) RADEON(0): RADEONDRICloseScreen

the only difference is, that 2.6.23-rc2-mm2 writes further

FreeFontPath: FPE "/usr/share/X11/fonts/misc:unscaled" refcount is 2, should be 1; fixing.

and exits succesfully (note that these messages are taken on remote host, X runned remotely).

Quoted 7 lines
Quoted 1 line
Quoted 1 line

Both vesa and radeon + Option "NoAccel" "true" works obviously fine.

Also intel on integrated i915 causes this (NoAccell has no effect in this case). Note that also 2.6.23-rc4-mm1 is affected by this behaviour.
I have a trace for you:
http://www.fi.muni.cz/~xslaby/sklad/panics/x-freeze.png
(this is the only what I'm able to grab so far)

Quoted 3 lines

afacit everything on that call trace is good. I guess it's possible that one of the higher-level loops has gone infinite (eg, the one in agp_remove_controller()).

There is no loop in this function. Anyway, going to track this whole issue down. Hold on.

Quoted 3 lines

Are you able to get netconsole working, and run sysrq-P and sysrq-T ten or so times, see if it's always stuck in the same place on the same CPU?

thanks so far,

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#161 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

In reply to Andrew Morton
Quoted 127 lines · Andrew Morton
Quoted 117 lines · On Sun, 09 Sep 2007 13:44:56 +0200 Jiri Slaby <[email protected]> wrote:
Quoted 116 lines · Jiri Slaby

Does this went through to your boxes? Any progress, clue, idea?

Jiri Slaby napsal(a):

Quoted 113 lines

Andrew Morton napsal(a):

Quoted 1 line

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/

Hi,

I've found a regression against 2.6.23-rc2-mm2. X server shutdown freezes (untainted) kernel hardly. Nothing on netconsole, X output follows:

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: Fedora Core 7 Red Hat, Inc.
Current Operating System: Linux bellona 2.6.23-rc3-mm1 #315 SMP Wed Aug 22 21:43:06 CEST 2007 i686
Build Date: 11 June 2007
Build ID: xorg-x11-server 1.3.0.0-9.fc7
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Aug 26 14:22:43 2007 (==) Using config file: "/etc/X11/xorg.conf"
(WW) RADEON: No matching Device section for instance (BusID PCI:1:0:1) found (**) RADEON(0): RADEONPreInit
(II) Module already built-in
(II) Module already built-in
(II) Module already built-in
(**) RADEON(0): RADEONScreenInit f0000000 0
(**) RADEON(0): Map: 0xf0000000, 0x04000000
(**) RADEON(0): RADEONSave
(**) RADEON(0): RADEONSaveMode(0x8240870)
(**) RADEON(0): Read: 0x0000000c 0x00030065 0x00000000
(**) RADEON(0): Read: rd=12, fd=101, pd=3
(**) RADEON(0): RADEONSaveMode returns 0x8240870
(**) RADEON(0): DRI New memory map param
(**) RADEON(0): RADEONInitMemoryMap() :

(**) RADEON(0):   mem_size         : 0x04000000
(**) RADEON(0):   MC_FB_LOCATION   : 0xf3fff000
(**) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0
(**) RADEON(0): RADEONModeInit()
1280x1024     108.00  1280 1328 1440 1688  1024 1025 1028 1066 (24,32) +H +V
1280x1024     108.00  1280 1328 1440 1688  1024 1025 1028 1066 (24,32) +H +V

(**) RADEON(0): Pitch = 10485920 bytes (virtualX = 1280, displayWidth = 1280) (**) RADEON(0): dc=10800, of=21600, fd=96, pd=2
(**) RADEON(0): RADEONInit returns 0x8241220
(**) RADEON(0): RADEONRestoreMode()
(**) RADEON(0): RADEONRestoreMode(0x8241220)
(**) RADEON(0): RADEONRestoreMemMapRegisters() :

(**) RADEON(0):   MC_FB_LOCATION   : 0xf3fff000
(**) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0
(**) RADEON(0):   Map Changed ! Applying ...
(**) RADEON(0):   Map applied, resetting engine ...

(**) RADEON(0): Updating display base addresses...
(**) RADEON(0): Memory map updated.
(**) RADEON(0): Programming CRTC1, offset: 0x00000000 (**) RADEON(0): Wrote: 0x0000000c 0x00010060 0x00000000 (0x0000a400) (**) RADEON(0): Wrote: rd=12, fd=96, pd=1
(**) RADEON(0): GRPH_BUFFER_CNTL from 20205c5c to 20125c5c (**) RADEON(0): RADEONSaveScreen(0)
(**) RADEON(0): Setting up initial surfaces
(**) RADEON(0): Initializing fb layer
(**) RADEON(0): Setting up accel memmap
(**) RADEON(0): Initializing backing store
(**) RADEON(0): DRI Finishing init !
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): GRPH_BUFFER_CNTL from 20205c5c to 20125c5c (**) RADEON(0): Setting up final surfaces
(**) RADEON(0): Initializing Acceleration
(**) RADEON(0): EngineInit (32/32)
(**) RADEON(0): Pitch for acceleration = 160
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): Initializing DPMS
(**) RADEON(0): Initializing Cursor
(**) RADEON(0): Initializing color map
(**) RADEON(0): Initializing DGA
(**) RADEON(0): Initializing Xv
(**) RADEON(0): RADEONScreenInit finished
(**) RADEON(0): RADEONSaveScreen(2)
(**) RADEON(0): RADEONCloseScreen
(**) RADEON(0): RADEONDRIStop
(**) RADEON(0): EngineRestore (32/32)
(**) RADEON(0): RADEONDisplayPowerManagementSet(0,0x0) (**) RADEON(0): RADEONRestore
(**) RADEON(0): RADEONRestoreMode()
(**) RADEON(0): RADEONRestoreMode(0x8240870)
(**) RADEON(0): RADEONRestoreMemMapRegisters() :

(**) RADEON(0):   MC_FB_LOCATION   : 0x1fff0000
(**) RADEON(0):   MC_AGP_LOCATION  : 0x27ff2000
(**) RADEON(0):   Map Changed ! Applying ...
(**) RADEON(0):   Map applied, resetting engine ...

(**) RADEON(0): Updating display base addresses...
(**) RADEON(0): Memory map updated.
(**) RADEON(0): Programming CRTC1, offset: 0x00000000 (**) RADEON(0): Wrote: 0x0000000c 0x00030065 0x00000000 (0x0000a400) (**) RADEON(0): Wrote: rd=12, fd=101, pd=3
(**) RADEON(0): Disposing accel...
(**) RADEON(0): Disposing cusor info
(**) RADEON(0): Disposing DGA
(**) RADEON(0): Unmapping memory
(**) RADEON(0): RADEONDRICloseScreen

the only difference is, that 2.6.23-rc2-mm2 writes further

FreeFontPath: FPE "/usr/share/X11/fonts/misc:unscaled" refcount is 2, should be 1; fixing.

and exits succesfully (note that these messages are taken on remote host, X runned remotely).

Quoted 7 lines
Quoted 1 line
Quoted 1 line

Both vesa and radeon + Option "NoAccel" "true" works obviously fine.

Also intel on integrated i915 causes this (NoAccell has no effect in this case). Note that also 2.6.23-rc4-mm1 is affected by this behaviour.
I have a trace for you:
http://www.fi.muni.cz/~xslaby/sklad/panics/x-freeze.png
(this is the only what I'm able to grab so far)

Quoted 7 lines

afacit everything on that call trace is good. I guess it's possible that one of the higher-level loops has gone infinite (eg, the one in agp_remove_controller()).

Are you able to get netconsole working, and run sysrq-P and sysrq-T ten or so times, see if it's always stuck in the same place on the same CPU?

Hm, I suspect Andi's x86_64-mm-cpa-clflush.patch or something like that. It loops in flush_kernel_map in list_for_each_entry on the first CPU. The a->l list is somehow corrupted I guess.

regards,

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#162 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

Quoted 3 lines

Hm, I suspect Andi's x86_64-mm-cpa-clflush.patch or something like that. It loops in flush_kernel_map in list_for_each_entry on the first CPU. The a->l list is somehow corrupted I guess.

Does it still happen with the latest version

ftp://ftp.firstfloor.org/pub/ak/x86_64/quilt/patches/cpa-clflush

?

(you might need to replace the other cpa-* patches too because they depend on each other)

-Andi

#163 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

Quoted 5 lines · Andi Kleen
Quoted 3 lines

Hm, I suspect Andi's x86_64-mm-cpa-clflush.patch or something like that. It loops in flush_kernel_map in list_for_each_entry on the first CPU. The a->l list is somehow corrupted I guess.

Does it still happen with the latest version

I think so :)

$ diff -u x86_64-mm-cpa-clflush.patch cpa-clflush |wc -l
0
Quoted 6 lines

ftp://ftp.firstfloor.org/pub/ak/x86_64/quilt/patches/cpa-clflush

?

(you might need to replace the other cpa-* patches too because they depend on each other)

And are there any changes against the -rc4-mm1 in those patches?

BTW it is reproducible for me on two different machines (i386-x86_64, radeon-intel), don't you have the problem too?

regards,

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#164 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

Quoted 2 lines · Jiri Slaby

BTW it is reproducible for me on two different machines (i386-x86_64, radeon-intel), don't you have the problem too?

No problems here with a radeon, no.

Does your CPU have clflush or not in /proc/cpuinfo?

-Andi

#165 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

Quoted 7 lines · Andi Kleen
Quoted 2 lines · Jiri Slaby

BTW it is reproducible for me on two different machines (i386-x86_64, radeon-intel), don't you have the problem too?

No problems here with a radeon, no.

Does your CPU have clflush or not in /proc/cpuinfo?

yes:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz
stepping : 11
cpu MHz : 2992.543
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 5991.99
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz
stepping : 11
cpu MHz : 2992.543
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 5985.42
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#166 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

In reply to Andi Kleen
Quoted 7 lines · Andi Kleen
Quoted 2 lines · Jiri Slaby

BTW it is reproducible for me on two different machines (i386-x86_64, radeon-intel), don't you have the problem too?

No problems here with a radeon, no.

Does your CPU have clflush or not in /proc/cpuinfo?

BTW this is how my flush_kernel_map looks like:

static void flush_kernel_map(void *arg)

{
        struct flush_arg *a = (struct flush_arg *)arg;
        struct page *pg;
        unsigned int xx = 0;

        /* When clflush is available use it because it is
           much cheaper than WBINVD. */
        printk("%s: 1\n", __func__);
        if (a->full_flush || !cpu_has_clflush)
                asm volatile("wbinvd" ::: "memory");
        else list_for_each_entry(pg, &a->l, lru) {
        printk("%s: %10u 1a\n", __func__, xx++);
                if (PageFlush(pg))
                        clflush_cache_range(page_address(pg), PAGE_SIZE);
        }
        printk("%s: 2\n", __func__);
        __flush_tlb_all();
        printk("%s: 3\n", __func__);
}

It outputs 1a in the infinite loop with incrementing xx. But only in this case, some global_flush_tlb are OK. e.g.:

Sep 10 01:39:19 localhost kernel: agpgart: Detected an Intel G33 Chipset.
Sep 10 01:39:19 localhost kernel: global_flush_tlb: 1
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 1
Sep 10 01:39:19 localhost kernel: flush_kernel_map:          0 1a
Sep 10 01:39:19 localhost kernel: flush_kernel_map:          1 1a
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 2
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 3
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 1
Sep 10 01:39:19 localhost kernel: flush_kernel_map:          0 1a
Sep 10 01:39:19 localhost kernel: flush_kernel_map:          1 1a
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 2
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 3
Sep 10 01:39:19 localhost kernel: global_flush_tlb: 2
Sep 10 01:39:19 localhost kernel: global_flush_tlb: 3
Sep 10 01:39:19 localhost kernel: agpgart: Detected 6140K stolen memory.

It seems, that the list is broken only on X shutdown. How can be deferred-pages list inited in some bad manner, when list_replace_init is called on it? Weird.

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#167 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

Quoted 10 lines · Jiri Slaby
Quoted 7 lines · Andi Kleen
Quoted 2 lines · Jiri Slaby

BTW it is reproducible for me on two different machines (i386-x86_64, radeon-intel), don't you have the problem too?

No problems here with a radeon, no.

Does your CPU have clflush or not in /proc/cpuinfo?

BTW this is how my flush_kernel_map looks like:

Can you stick a printk into change_page_attr to log in which order it changes pages (including their addresses and the pgattr)?

-Andi

#168 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

Quoted 5 lines · Andi Kleen
Quoted 4 lines · Jiri Slaby
Quoted 3 lines · Andi Kleen
Quoted 2 lines · Jiri Slaby

BTW it is reproducible for me on two different machines (i386-x86_64, radeon-intel), don't you have the problem too?

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

No problems here with a radeon, no.

Does your CPU have clflush or not in /proc/cpuinfo?

BTW this is how my flush_kernel_map looks like:

Can you stick a printk into change_page_attr to log in which order it changes pages (including their addresses and the pgattr)?

printk("%s: %p %p %.16lx %d\n", __func__, page, page_address(page), pgprot_val(prot), numpages);
http://www.fi.muni.cz/~xslaby/sklad/panics/x-freeze_chpa.png

What other info needed?

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#202 lore raw

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

In reply to Andi Kleen
Quoted 9 lines · Andi Kleen
Quoted 5 lines

Updating on this issue: Both myself and another person have reported on
the RedHat bugzilla that it's a clocksource issue - if you are using the hpet clocksource, the time warps, but booting with clocksource=acpi_pm works.

This ring any bells?

Does this patch fix it?
-Andi

Quoted 8 lines

Add missing mask operation to vdso

vdso vgetns() didn't mask the time source offset calculation, which could lead to time problems with 32bit HPET. Add the masking.

Thanks to Chuck Ebbert for tracking down.

Confirming that does indeed fix it - booted with hpet clocksource and vdso=1, and the time didn't warp at the 5-minute mark.

#169 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

In reply to Jiri Slaby
Quoted 2 lines

What other info needed?

I'm seeing this on my 965gm chipset with Andi's clflush patches on x86 32-bit, it looks like an interaction with the agp code which does a big bunch of change page attr to allocate the AGP aperture backed memory..

I think the code might have worked in a previous iteration on my 64-bit 965G machine at home but I'm on the road and won't be back anytime soon..

I'll see what I can figure out from my laptop...

Dave.

#170 lore raw

Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1]

In reply to Jiri Slaby
Quoted 49 lines · Jiri Slaby
Quoted 6 lines · Andi Kleen
Quoted 2 lines · Jiri Slaby

BTW it is reproducible for me on two different machines (i386-x86_64, radeon-intel), don't you have the problem too?

No problems here with a radeon, no.

Does your CPU have clflush or not in /proc/cpuinfo?

BTW this is how my flush_kernel_map looks like:

static void flush_kernel_map(void *arg)

{
        struct flush_arg *a = (struct flush_arg *)arg;
        struct page *pg;
        unsigned int xx = 0;

        /* When clflush is available use it because it is
           much cheaper than WBINVD. */
        printk("%s: 1\n", __func__);
        if (a->full_flush || !cpu_has_clflush)
                asm volatile("wbinvd" ::: "memory");
        else list_for_each_entry(pg, &a->l, lru) {
        printk("%s: %10u 1a\n", __func__, xx++);
                if (PageFlush(pg))
                        clflush_cache_range(page_address(pg), PAGE_SIZE);
        }
        printk("%s: 2\n", __func__);
        __flush_tlb_all();
        printk("%s: 3\n", __func__);
}

It outputs 1a in the infinite loop with incrementing xx. But only in this case, some global_flush_tlb are OK. e.g.:

Sep 10 01:39:19 localhost kernel: agpgart: Detected an Intel G33 Chipset.
Sep 10 01:39:19 localhost kernel: global_flush_tlb: 1
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 1
Sep 10 01:39:19 localhost kernel: flush_kernel_map:          0 1a
Sep 10 01:39:19 localhost kernel: flush_kernel_map:          1 1a
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 2
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 3
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 1
Sep 10 01:39:19 localhost kernel: flush_kernel_map:          0 1a
Sep 10 01:39:19 localhost kernel: flush_kernel_map:          1 1a
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 2
Sep 10 01:39:19 localhost kernel: flush_kernel_map: 3
Sep 10 01:39:19 localhost kernel: global_flush_tlb: 2
Sep 10 01:39:19 localhost kernel: global_flush_tlb: 3
Sep 10 01:39:19 localhost kernel: agpgart: Detected 6140K stolen memory.
Quoted 2 lines

It seems, that the list is broken only on X shutdown. How can be deferred-pages list inited in some bad manner, when list_replace_init is called on it? Weird.

Ok, here comes a BUG with trace:
set status page addr 0x00033000
list_add corruption. next->prev should be prev (ffffffff8068ae70), but was ffffffff80697a50. (next=ffff81000117fbd0).

------------[ cut here ]------------
kernel BUG at /home/l/latest/xxx/lib/list_debug.c:27!
invalid opcode: 0000 [1] SMP
last sysfs file: /devices/pci0000:00/0000:00:02.0/enable
CPU 0
Modules linked in: ipv6 floppy sr_mod rtc_cmos rtc_core cdrom ehci_hcd rtc_lib
usbhid
Pid: 1639, comm: X Not tainted 2.6.23-rc4-mm1_64 #23
RIP: 0010:[<ffffffff80332f49>]  [<ffffffff80332f49>] __list_add+0x39/0x60
RSP: 0018:ffff81000547bd48  EFLAGS: 00010296
RAX: 0000000000000079 RBX: ffff81000117a380 RCX: ffffffff8068b450
RDX: ffff81000317d6a0 RSI: 0000000000000001 RDI: ffffffff8068b420
RBP: ffff81000547bd48 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000006da2
R13: ffff810006c10d10 R14: ffff810006da2000 R15: 8000000000000163
FS:  00007f7a05258710(0000) GS:ffffffff806d1000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000a33040 CR3: 0000000004a43000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process X (pid: 1639, threadinfo ffff81000547a000, task ffff81000317d6a0)
Stack:  ffff81000547bd58 ffffffff80332f7c ffff81000547bdc8 ffffffff80225c56
 ffffffff80225cb5 8000000000000163 ffffffff806830e8 ffffffff806830a0
 ffffffff806830a0 ffff810006da2000 ffff81000547bda8 0000000000006da2
Call Trace:
 [<ffffffff80332f7c>] list_add+0xc/0x10
 [<ffffffff80225c56>] __change_page_attr+0x376/0x390
 [<ffffffff80225cb5>] change_page_attr_addr+0x45/0x140
 [<ffffffff80225d16>] change_page_attr_addr+0xa6/0x140
 [<ffffffff80225de3>] change_page_attr+0x33/0x40
 [<ffffffff80387b64>] agp_generic_destroy_page+0x44/0x70
 [<ffffffff80388645>] agp_free_memory+0x65/0xd0
 [<ffffffff80386d49>] agp_free_memory_wrap+0x39/0x60
 [<ffffffff803873fb>] agp_release+0xdb/0x1c0
 [<ffffffff80299551>] __fput+0xd1/0x1b0
 [<ffffffff802996b6>] fput+0x16/0x20
 [<ffffffff802964e6>] filp_close+0x56/0x90
 [<ffffffff80297bed>] sys_close+0xad/0x110
 [<ffffffff8020bd0e>] system_call+0x7e/0x83

INFO: lockdep is turned off.

Code: 0f 0b eb fe 0f 1f 00 48 89 f1 4c 89 c2 48 89 c6 48 c7 c7 e8
RIP  [<ffffffff80332f49>] __list_add+0x39/0x60
 RSP <ffff81000547bd48>

regards,

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University