2005-03-09 20:01:18

by Marcelo Tosatti

[permalink] [raw]
Subject: Linux 2.4.30-pre3

Hi,

Here goes the third pre of v2.4.30.


It contains a small number of scattered fixes, most notably e1000 update,
a backport of v2.6's nForce override fix, and SATA update.

The changes which broke "tar --verify" on tapes have been reverted.

Please read the changelog for more details.


Summary of changes from v2.4.30-pre2 to v2.4.30-pre3
============================================

<davem:northbeach.davemloft.net.davemloft.net>:
o [SPARC64]: Tomatillo PCI controller bug fixes
o [TIGON3]: Do not touch NIC_SRAM_FIRMWARE_MBOX when TG3_FLG2_SUN_570X
o [TIGON3]: Update driver version and reldate

<hifumi.hisashi:lab.ntt.co.jp>:
o BUG on error handlings in Ext3 under I/O

<krzysztof.h1:wp.pl>:
o [SPARC]: DBRI fixes and improvements

<liml:rtr.ca>:
o sata_qstor: eh_timeout fix

<mallikarjuna.chilakala:intel.com>:
o e1000: 1 Robert Olsson's fix and
o e1000: 2 use netif_poll_{enable|disable}
o e1000: Avoid race between e1000_watchdog
o e1000: Delay clean-up of last Tx buffer
o e1000: Fix WOL settings in 82544 based
o e1000: Patch from Peter Kjellstroem --
o e1000: Checks for desc ring/rx data
o e1000: Report failure code when loopback
o e1000: Fixes related to Cable length
o e1000: Driver version white space,

<mat.loikkanen:synopsys.com>:
o [libata] add ->bmdma_{stop,status} hooks

<phil:fifi.org>:
o sk98lin workaround Asus K8V SE Deluxe buggy firmware

<slee:netengine1.com>:
o Fix units/partition count in sd.c

Adrian Bunk:
o drivers/scsi/sata_*: make code static

David S. Miller:
o [SPARC64]: Fix 32bit compat layer bugs in sys_ipc() and sys_rt_sigtimedwait()
o [AF_UNIX]: Fix SIOCINQ for STREAM
o [SPARC64]: Accept 'm5823' clock chip as seen on SB1500

Jeff Garzik:
o [libata sata_via] minor cleanups
o [libata sata_via] add support for VT6421 SATA
o [libata] resync with 2.6 msleep() updates
o [libata] trivial: whitespace sync with 2.6
o [libata] do not call pci_disable_device() for certain errors
o [libata] Add missing hooks, to avoid oops in advanced SATA drivers
o [libata] Use DMA_{32,64}BIT_MASK in ahci, sata_vsc drivers
o [libata ahci] Print out port id on error messages
o [libata] remove_one helper cleanup

John W. Linville:
o libata: fix command queue leak when xlat_func fails
o tulip: make tulip_stop_rxtx() wait for DMA to fully stop

Marcelo Tosatti:
o Cset exclude: [email protected]|ChangeSet|20041125155150|65356
o Allow lseek on SCSI tapes
o Allow lseek on osst to keep tar --verify happy
o Change VERSION to 2.4.30-pre3
o Early ACPI PCI quirk depends on CONFIG_X86_IO_APIC

Mark Lord:
o sata_qstor: new basic driver for Pacific Digital
o [libata qstor] minor update per LKML comments

Matt Domsch:
o aic7xxx: don't reset chip on pause

Mikael Pettersson:
o fix undefined behaviour in cistpl.c

Paul Fulghum:
o fix synclinkmp register access typo

Solar Designer:
o Fix for swapoff after re-creating device files
o Fix proc_tty.c comment typos

Zwane Mwaikambo:
o Fix timer override on nforce


2005-03-09 20:45:59

by Alan

[permalink] [raw]
Subject: Re: Linux 2.4.30-pre3

> o Cset exclude: [email protected]|ChangeSet|20041125155150|65356
> o Allow lseek on SCSI tapes
> o Allow lseek on osst to keep tar --verify happy

This seems odd since the scsi tape drives don't support lseek and the
driver changes to correctly block it were part of the security fixes for
lseek mishandling in 2.6 ?

Does anyone have the straces of tar breaking and the versions ?

2005-03-09 21:02:31

by Marcelo Tosatti

[permalink] [raw]
Subject: Re: Linux 2.4.30-pre3

On Wed, Mar 09, 2005 at 08:40:00PM +0000, Alan Cox wrote:
> > o Cset exclude: [email protected]|ChangeSet|20041125155150|65356
> > o Allow lseek on SCSI tapes
> > o Allow lseek on osst to keep tar --verify happy
>
> This seems odd since the scsi tape drives don't support lseek and the
> driver changes to correctly block it were part of the security fixes for
> lseek mishandling in 2.6 ?

Thing is we can't cope with "tar --verify" failing on tapes. Better approach
to fix this is welcome.

> Does anyone have the straces of tar breaking and the versions ?

Here is the relevant information.


Date: Wed, 2 Mar 2005 23:17:19 +0200 (EET)
From: Kai Makisara <[email protected]>
X-X-Sender: [email protected]
To: Marcelo Tosatti <[email protected]>
Cc: Mark Yeatman <[email protected]>, [email protected],
Andrew Morton <[email protected]>, Gene Heskett <[email protected]>
Subject: Re: Problems with SCSI tape rewind / verify on 2.4.29

> On Wed, Mar 02, 2005 at 11:15:42AM -0000, Mark Yeatman wrote:
> > Hi
> >
> > Never had to log a bug before, hope this is correctly done.
> >
> > Thanks
> >
> > Mark
> >
> > Detail....
> >
> > [1.] One line summary of the problem:
> > SCSI tape drive is refusing to rewind after backup to allow verify and
> > causing illegal seek error
> >
> > [2.] Full description of the problem/report:
> > On backup the tape drive is reporting the following error and failing
> > it's backups.
> >
> > tar: /dev/st0: Warning: Cannot seek: Illegal seek
> >
> > I have traced this back to failing at an upgrade of the kernel to 2.4.29
> > on Feb 8th. The backups have not worked since. Replacement Drives have
> > been tried and cables to no avail. I noticed in the the changelog that a
> > patch by Solar Designer to the Scsi tape return code had been made.

BTW, this "fix" by Solar Designer introduces a bug to 2.4.29: a tape
driver is supposed to return ENOMEM in the case that was changed to return
EIO ;-(

>
> v2.6 also contains the same problem BTW.
>
> Try this:
>
> --- a/drivers/scsi/st.c.orig 2005-03-02 09:02:13.637158144 -0300
> +++ b/drivers/scsi/st.c 2005-03-02 09:02:20.208159200 -0300
> @@ -3778,7 +3778,6 @@
> read: st_read,
> write: st_write,
> ioctl: st_ioctl,
> - llseek: no_llseek,
> open: st_open,
> flush: st_flush,
> release: st_release,

This change covers up the problem. The real bug is in tar. The following
code is from tar is supposed to reposition the tape to the beginning of
the file jus written:

#ifdef MTIOCTOP
{
struct mtop operation;
int status;

operation.mt_op = MTBSF;
operation.mt_count = 1;
if (status = rmtioctl (archive, MTIOCTOP, (char *) &operation), status
< 0)
{
if (errno != EIO
|| (status = rmtioctl (archive, MTIOCTOP, (char *)
&operation),
status < 0))
{
#endif
if (rmtlseek (archive, (off_t) 0, SEEK_SET) != 0)
{
/* Lseek failed. Try a different method. */
seek_warn (archive_name_array[0]);
return;
}
#ifdef MTIOCTOP
}
}
}
#endif


Here is output from strace showing what happens with 'tar -c -W' applied
at the beginning of the tape (this is using kernel 2.6.11-rc4 but the same
probably happens with 2.4.29):
...
ioctl(3, MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE,
0x7fffffffecd0) = -1 EIO (Input/output error)
ioctl(3, MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE,
0x7fffffffecd0) = -1 EIO (Input/output error)
lseek(3, 0, SEEK_SET) = -1 ESPIPE (Illegal seek)

So, both tape positioning commands fail and the code falls back to lseek.
Earlier it has returned success even though it has not done anything (this
was on purpose because it is the way some other Unices behave and with
reason). In that case this tar succeeded but it was pure luck. The first
BSF did position the tape correctly although it did fail.

The 2.6 st driver does contain this near the beginning of st_open():

nonseekable_open(inode, filp);

This probably makes lseek fail. This code has been in st.c since 2.6.8.




--
Kai