2002-01-08 00:51:59

by Marcelo Tosatti

[permalink] [raw]
Subject: Linux 2.4.18-pre2


Hi,

Here goes pre2.


pre2:

- APIC LVTERR fixes (Mikael Pettersson)
- Fix ppdev ioctl oops and deadlock (Tim Waugh)
- parport fixes (Tim Waugh)
- orinoco wireless driver update (David Gibson)
- Fix oopsable race in binfmt_elf.c (Alexander Viro)
- Small sx16 driver bugfix (Heinz-Ado Arnolds)
- sbp2 deadlock fix (Andrew Morton)
- Fix JFFS2 write error handling (David Woodhouse)
- Intermezzo update (Peter J. Braam)
- Proper AGP support for Intel 830MP chipsets (Nicolas Aspert)
- Alpha fixes (Jay Estabrook)
- 53c700 SCSI driver update (James Bottomley)
- Fix coredump mmap_sem deadlock on IA64 (David Mosberger)
- 3ware driver update (Adam Radford)
- Fix elevator insertion point on failed
request merge (Jens Axboe)
- Remove bogus rpciod_tcp_dispatcher definition (David Woodhouse)
- Reiserfs fixes (Oleg Drokin)
- de4x5 endianess fixes (Kip Walker)
- ISDN CAPI cleanup (Kai Germaschewski)
- Make refill_inactive() correctly account
progress (me)

pre1:

- S390 merge (IBM)
- SuperH merge (SuperH team)
- PPC merge (Benjamin Herrenschmidt)
- PCI DMA update (David S. Miller)
- radeonfb update (Ani Joshi)
- aty128fb update (Ani Joshi)
- Add nVidia GeForce3 support to rivafb (Ani Joshi)
- Add PM support to opl3sa2 (Zwane Mwaikambo)
- Basic ethtool support for 3com, starfire
and pcmcia net drivers (Jeff Garzik)
- Add MII ethtool interface (Jeff Garzik)
- starfire,sundance,dl2k,sis900,8139{too,cp},
natsemi driver updates (Jeff Garzik)
- ufs/minix: mark inodes as bad in case of read
failure (Christoph Hellwig)
- ReiserFS fixes (Oleg Drokin)
- sonypi update (Stelian Pop)
- n_hdlc update (Paul Fulghum)
- Fix compile error on aty_base.c (Tobias Ringstrom)
- Document cpu_to_xxxx() on kernel-hacking doc (Rusty Russell)
- USB update (Greg KH)
- Fix sysctl console loglevel bug on
IA64 (and possibly other archs) (Jesper Juhl)
- Update Athlon/VIA PCI quirks (Calin A. Culianu)
- blkmtd update (Simon Evans)
- boot protocol update (makes the highest
possible initrd address available to the
bootloader) (H. Peter Anvin)
- NFS fixes (Trond Myklebust)




2002-01-08 03:21:05

by Louis E Garcia II

[permalink] [raw]
Subject: Re: Linux 2.4.18-pre2

The radeonfb is still broken from the update in pre1. I have attached
the missing parts of that update. This is from Ani Joshi himself.

--Louis






Attachments:
radeonfb-updatefix.patch.bz2 (1.12 kB)

2002-01-08 04:24:39

by CaT

[permalink] [raw]
Subject: netfilter oops (Was: Re: Linux 2.4.18-pre2)

On Mon, Jan 07, 2002 at 09:38:17PM -0200, Marcelo Tosatti wrote:
> Here goes pre2.
>
>
> pre2:
*snip*

As I was off the net for 2 weeks I wanted to wait for the next pre
release before reporting this bug (incase I missed something and someone
solved it anyways). Anyhow I'm assuming it still applies to pre2 as
there has been no mention of netfilter changes in the changelog, so...

With 18-pre1, 17-rc2 and 17-preX (can't remember now. It's been a week
or so :/) I can get the kernel to consistantly crash after a few minutes
by compiling it with ipchains compatability and using masqueraded net
connections. If I connect to the getway in quetion without hitting the
masq rules I'm fine. I can also use the net from the gateway, but if I
try to use the net from a box behind it and that box gets masqueraded I
get a kernel lockup and an oops after a minute or so of use. Unfortunately
the oops doesn't actually get recorded anywhere and all I can remember
from it is that it was dieing in 'Swapper task' (or something similar).

I did a bit more experimentation and removed all the netfilter changes
done since 2.4.16 and I no longer got oopses so one of the changes after
2.4.16 broke things.

Unfortunately, I am no longer near said gateway. I -can- try and
duplicate this as soon as I get a version of linux compiling on a debian
woody system.

If you have any questions/requests/whatnots then please yell. If I
succeed in duplicateing this and get a recorded oops I'll send that in
also.

Thanks.

--
SOCCER PLAYER IN GENITAL-BITING SCANDAL --- "It was something between
friends that I thought would have no importance until this morning when
I got up and saw all the commotion in the news," Gallardo told a news
conference. "It stunned me."
Reyes told Marca that he had "felt a slight pinch."

2002-01-08 15:18:41

by Marcelo Tosatti

[permalink] [raw]
Subject: Re: netfilter oops (Was: Re: Linux 2.4.18-pre2)



On Tue, 8 Jan 2002, CaT wrote:

> On Mon, Jan 07, 2002 at 09:38:17PM -0200, Marcelo Tosatti wrote:
> > Here goes pre2.
> >
> >
> > pre2:
> *snip*
>
> As I was off the net for 2 weeks I wanted to wait for the next pre
> release before reporting this bug (incase I missed something and someone
> solved it anyways). Anyhow I'm assuming it still applies to pre2 as
> there has been no mention of netfilter changes in the changelog, so...
>
> With 18-pre1, 17-rc2 and 17-preX (can't remember now. It's been a week
> or so :/) I can get the kernel to consistantly crash after a few minutes
> by compiling it with ipchains compatability and using masqueraded net
> connections. If I connect to the getway in quetion without hitting the
> masq rules I'm fine. I can also use the net from the gateway, but if I
> try to use the net from a box behind it and that box gets masqueraded I
> get a kernel lockup and an oops after a minute or so of use. Unfortunately
> the oops doesn't actually get recorded anywhere and all I can remember
> from it is that it was dieing in 'Swapper task' (or something similar).
>
> I did a bit more experimentation and removed all the netfilter changes
> done since 2.4.16 and I no longer got oopses so one of the changes after
> 2.4.16 broke things.
>
> Unfortunately, I am no longer near said gateway. I -can- try and
> duplicate this as soon as I get a version of linux compiling on a debian
> woody system.
>
> If you have any questions/requests/whatnots then please yell. If I
> succeed in duplicateing this and get a recorded oops I'll send that in
> also.

Please use a serial console to get the oops or write it down in paper.

Thanks

2002-01-08 21:21:06

by Rasmus Andersen

[permalink] [raw]
Subject: Re: Linux 2.4.18-pre2

Hi Marcelo.

This is a resend of a patch I sent you earlier, rediffed. Explanation
below.

---
The following patch makes drivers/char/generic_serial.c check the
return code of copy_{from,to}_user, coverts a cli/sti to
save_flags/cli/restore_flags and does some minor cleanup. It
also makes the rio_linux, serial_tx3912, sh-sci and sx drivers
propagate the copy_xxx_user return codes upwards.

The patch has been blessed by Rogier Wolff, the maintainer.
---

diff -uar linux-2418p2-clean/drivers/char/generic_serial.c linux-2418p2/drivers/char/generic_serial.c
--- linux-2418p2-clean/drivers/char/generic_serial.c Fri Sep 14 00:21:32 2001
+++ linux-2418p2/drivers/char/generic_serial.c Tue Jan 8 22:10:22 2002
@@ -143,7 +143,12 @@
/* Can't copy more? break out! */
if (c <= 0) break;
if (from_user)
- copy_from_user (port->xmit_buf + port->xmit_head, buf, c);
+ if (copy_from_user (port->xmit_buf + port->xmit_head,
+ buf, c)) {
+ up (& port->port_write_sem);
+ return -EFAULT;
+ }
+
else
memcpy (port->xmit_buf + port->xmit_head, buf, c);

@@ -214,8 +219,13 @@
while (1) {
c = count;

- /* This is safe because we "OWN" the "head". Noone else can
- change the "head": we own the port_write_sem. */
+ /* Note: This part can be done without
+ * interrupt routine protection since
+ * the interrupt routines may only modify
+ * shared variables in safe ways, in the worst
+ * case causing us to loop twice in the code
+ * below. See comments below. */
+
/* Don't overrun the end of the buffer */
t = SERIAL_XMIT_SIZE - port->xmit_head;
if (t < c) c = t;
@@ -506,7 +516,7 @@

void gs_shutdown_port (struct gs_port *port)
{
- long flags;
+ unsigned long flags;

func_enter();

@@ -589,6 +599,7 @@
int do_clocal = 0;
int CD;
struct tty_struct *tty;
+ unsigned long flags;

func_enter ();

@@ -604,7 +615,7 @@
* until it's done, and then try again.
*/
if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
- interruptible_sleep_on(&port->close_wait);
+ interruptible_sleep_on(&port->close_wait);
if (port->flags & ASYNC_HUP_NOTIFY)
return -EAGAIN;
else
@@ -668,10 +679,11 @@
add_wait_queue(&port->open_wait, &wait);

gs_dprintk (GS_DEBUG_BTR, "after add waitq.\n");
+ save_flags(flags);
cli();
if (!tty_hung_up_p(filp))
port->count--;
- sti();
+ restore_flags(flags);
port->blocked_open++;
while (1) {
CD = port->rd->get_CD (port);
@@ -1003,7 +1015,8 @@
{
struct serial_struct sio;

- copy_from_user(&sio, sp, sizeof(struct serial_struct));
+ if (copy_from_user(&sio, sp, sizeof(struct serial_struct)))
+ return(-EFAULT);

if (!capable(CAP_SYS_ADMIN)) {
if ((sio.baud_base != port->baud_base) ||
@@ -1033,7 +1046,7 @@
* Generate the serial struct info.
*/

-void gs_getserial(struct gs_port *port, struct serial_struct *sp)
+int gs_getserial(struct gs_port *port, struct serial_struct *sp)
{
struct serial_struct sio;

@@ -1055,7 +1068,10 @@
if (port->rd->getserial)
port->rd->getserial (port, &sio);

- copy_to_user(sp, &sio, sizeof(struct serial_struct));
+ if (copy_to_user(sp, &sio, sizeof(struct serial_struct)))
+ return -EFAULT;
+ return 0;
+
}


diff -uar linux-2418p2-clean/drivers/char/rio/rio_linux.c linux-2418p2/drivers/char/rio/rio_linux.c
--- linux-2418p2-clean/drivers/char/rio/rio_linux.c Thu Oct 25 22:53:47 2001
+++ linux-2418p2/drivers/char/rio/rio_linux.c Tue Jan 8 22:10:22 2002
@@ -742,7 +742,7 @@
case TIOCGSERIAL:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg,
sizeof(struct serial_struct))) == 0)
- gs_getserial(&PortP->gs, (struct serial_struct *) arg);
+ rc = gs_getserial(&PortP->gs, (struct serial_struct *) arg);
break;
case TCSBRK:
if ( PortP->State & RIO_DELETED ) {
diff -uar linux-2418p2-clean/drivers/char/serial_tx3912.c linux-2418p2/drivers/char/serial_tx3912.c
--- linux-2418p2-clean/drivers/char/serial_tx3912.c Fri Nov 9 23:01:21 2001
+++ linux-2418p2/drivers/char/serial_tx3912.c Tue Jan 8 22:10:22 2002
@@ -673,7 +673,7 @@
case TIOCGSERIAL:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg,
sizeof(struct serial_struct))) == 0)
- gs_getserial(&port->gs, (struct serial_struct *) arg);
+ rc = gs_getserial(&port->gs, (struct serial_struct *) arg);
break;
case TIOCSSERIAL:
if ((rc = verify_area(VERIFY_READ, (void *) arg,
diff -uar linux-2418p2-clean/drivers/char/sh-sci.c linux-2418p2/drivers/char/sh-sci.c
--- linux-2418p2-clean/drivers/char/sh-sci.c Mon Oct 15 22:36:48 2001
+++ linux-2418p2/drivers/char/sh-sci.c Tue Jan 8 22:10:22 2002
@@ -919,7 +919,7 @@
case TIOCGSERIAL:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg,
sizeof(struct serial_struct))) == 0)
- gs_getserial(&port->gs, (struct serial_struct *) arg);
+ rc = gs_getserial(&port->gs, (struct serial_struct *) arg);
break;
case TIOCSSERIAL:
if ((rc = verify_area(VERIFY_READ, (void *) arg,
diff -uar linux-2418p2-clean/drivers/char/sx.c linux-2418p2/drivers/char/sx.c
--- linux-2418p2-clean/drivers/char/sx.c Tue Jan 8 22:09:24 2002
+++ linux-2418p2/drivers/char/sx.c Tue Jan 8 22:10:22 2002
@@ -1817,7 +1817,7 @@
case TIOCGSERIAL:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg,
sizeof(struct serial_struct))) == 0)
- gs_getserial(&port->gs, (struct serial_struct *) arg);
+ rc = gs_getserial(&port->gs, (struct serial_struct *) arg);
break;
case TIOCSSERIAL:
if ((rc = verify_area(VERIFY_READ, (void *) arg,
Only in linux-2418p2/drivers/char: sx.c~
diff -uar linux-2418p2-clean/include/linux/generic_serial.h linux-2418p2/include/linux/generic_serial.h
--- linux-2418p2-clean/include/linux/generic_serial.h Fri Sep 7 18:28:38 2001
+++ linux-2418p2/include/linux/generic_serial.h Tue Jan 8 22:10:22 2002
@@ -12,9 +12,6 @@
#ifndef GENERIC_SERIAL_H
#define GENERIC_SERIAL_H

-
-
-
struct real_driver {
void (*disable_tx_interrupts) (void *);
void (*enable_tx_interrupts) (void *);
@@ -98,7 +95,7 @@
struct termios * old_termios);
int gs_init_port(struct gs_port *port);
int gs_setserial(struct gs_port *port, struct serial_struct *sp);
-void gs_getserial(struct gs_port *port, struct serial_struct *sp);
+int gs_getserial(struct gs_port *port, struct serial_struct *sp);
void gs_got_break(struct gs_port *port);

extern int gs_debug;

Regards,
Rasmus

2002-01-08 22:03:36

by Erik Andersen

[permalink] [raw]
Subject: Re: Linux 2.4.18-pre2

On Mon Jan 07, 2002 at 10:23:25PM -0500, Louis Garcia wrote:
> The radeonfb is still broken from the update in pre1. I have attached
> the missing parts of that update. This is from Ani Joshi himself.

Also looks like drivers/video/radeonfb.c needs to be fixed
to cope with newer binutils....

+#ifdef MODULE
remove: radeonfb_pci_unregister,
+#endif

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

2002-01-12 10:01:52

by CaT

[permalink] [raw]
Subject: Re: netfilter oops (Was: Re: Linux 2.4.18-pre2)

On Tue, Jan 08, 2002 at 12:04:59PM -0200, Marcelo Tosatti wrote:
> Please use a serial console to get the oops or write it down in paper.

I don't have a null-modem cable so this is a no no as yet. When I
narrow it down and it's need it I'll see if I can scribble it or
score a null-modem cable.

--
SOCCER PLAYER IN GENITAL-BITING SCANDAL --- "It was something between
friends that I thought would have no importance until this morning when
I got up and saw all the commotion in the news," Gallardo told a news
conference. "It stunned me."
Reyes told Marca that he had "felt a slight pinch."

2002-01-12 11:11:44

by CaT

[permalink] [raw]
Subject: Re: netfilter oops (Was: Re: Linux 2.4.18-pre2)

This bounced from lk (due to a malformed address)... apologies for the
resend if you get it twice... Just wanted to remove a bit of chaos from
the thread. ;)

On Tue, Jan 08, 2002 at 04:12:30PM +1100, Rusty Russell wrote:
> > With 18-pre1, 17-rc2 and 17-preX (can't remember now. It's been a week
> > or so :/) I can get the kernel to consistantly crash after a few minutes
> > by compiling it with ipchains compatability and using masqueraded net
> > connections.
>
> Hi,

Hey.

I haven't forgotten about this little bug. :))

> There are three changes which could effect you here. I can't see
> anything wrong with any of them, but if you could try reverting them one
> at a time, and tell me which causes the problem, that'd narrow it down:

Just did a test and it's not masquerading that's causing it. I'll need
to convert my filesystems to ext3 first because the crashes are not
going to be healthy for this box (or me... 45gig HD involved on a
pentium-200) and I'll experiment some more. It may be redirection
that's doing it.

Once I narrow down what is actually causing it I'll back out the patches
you sent, one by one, until it stops crashing.

--
SOCCER PLAYER IN GENITAL-BITING SCANDAL --- "It was something between
friends that I thought would have no importance until this morning when
I got up and saw all the commotion in the news," Gallardo told a news
conference. "It stunned me."
Reyes told Marca that he had "felt a slight pinch."

2002-01-12 12:34:52

by CaT

[permalink] [raw]
Subject: Re: netfilter oops (Was: Re: Linux 2.4.18-pre2)

On Sat, Jan 12, 2002 at 10:04:38PM +1100, CaT wrote:
> Just did a test and it's not masquerading that's causing it. I'll need
> to convert my filesystems to ext3 first because the crashes are not
> going to be healthy for this box (or me... 45gig HD involved on a
> pentium-200) and I'll experiment some more. It may be redirection
> that's doing it.

Ka-ching! Being able to use a fwded net connection without masq was the
needed clue. I looked at the patches and found this one:

diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal
linux-2.4.16/net/ipv4/netfilter/ip_fw_compat_redir.c
linux-2.4.17/net/ipv4/netfilter/ip_fw_compat_redir.c
--- linux-2.4.16/net/ipv4/netfilter/ip_fw_compat_redir.c Sat Aug 5 06:07:24 2000
+++ linux-2.4.17/net/ipv4/netfilter/ip_fw_compat_redir.c Thu Dec 27 12:46:11 2001
@@ -206,6 +206,8 @@
}
list_prepend(&redirs, redir);
init_timer(&redir->destroyme);
+ redir->destroyme.expires = jiffies + 75*HZ;
+ add_timer(&redir->destroyme);
}
/* In case mangling has changed, rewrite this part. */
redir->core = ((struct redir_core)

As it appeared to deal directly with compatability redirection I removed
this one first and recompiled the kernel. Before, a minute or so of
browsing via a redirected connection (to squid) would make the box go
boom. I've just browsed for 15 minutes to different sites and the box
has not gone down.

Now, if you need the oops then holler and I'll see what I can do about
getting it to you. Writing it down would be a pain so I may opt for the
null-modem cable which may take a week or so for me to get at though.

--
SOCCER PLAYER IN GENITAL-BITING SCANDAL --- "It was something between
friends that I thought would have no importance until this morning when
I got up and saw all the commotion in the news," Gallardo told a news
conference. "It stunned me."
Reyes told Marca that he had "felt a slight pinch."

2002-01-12 15:40:32

by Willy Tarreau

[permalink] [raw]
Subject: Re: netfilter oops (Was: Re: Linux 2.4.18-pre2)

> Writing it down would be a pain so I may opt for the
> null-modem cable which may take a week or so for me to
> get at though.

You'd better download my kmsgdump patch which will let you save
all your kernel messages (including oops) to a floppy disk.
Please read the doc in Documentation/kmsgdump.txt to get more info.

http://www-miaif.lip6.fr/willy/linux-patches//kmsgdump/0.4.3/kmsgdump-0.4.3-2.4.16pre1.patch

Regards,
Willy

2002-01-14 10:00:47

by CaT

[permalink] [raw]
Subject: Re: netfilter oops (Was: Re: Linux 2.4.18-pre2)

On Sat, Jan 12, 2002 at 04:40:07PM +0100, Willy Tarreau wrote:
> > Writing it down would be a pain so I may opt for the
> > null-modem cable which may take a week or so for me to
> > get at though.
>
> You'd better download my kmsgdump patch which will let you save
> all your kernel messages (including oops) to a floppy disk.
> Please read the doc in Documentation/kmsgdump.txt to get more info.
>
> http://www-miaif.lip6.fr/willy/linux-patches//kmsgdump/0.4.3/kmsgdump-0.4.3-2.4.16pre1.patch

Well... my floppy drive died and I have no printer. *sigh*

I'll see if Rusty REALLY needs the oops and if so I'll hunt down
another way to get at it.

Thanks though.

--
SOCCER PLAYER IN GENITAL-BITING SCANDAL --- "It was something between
friends that I thought would have no importance until this morning when
I got up and saw all the commotion in the news," Gallardo told a news
conference. "It stunned me."
Reyes told Marca that he had "felt a slight pinch."