Re: 2.1.118 Tons of oopes

Michael H. Warfield (mhw@wittsend.com)
Thu, 27 Aug 1998 10:19:59 -0400 (EDT)


Oh hell... As long as I'm playing Devil's advocate, I guess I
can argue both sides (sort of)...

Richard Gooch enscribed thusly:
> Alan Cox writes:
> > > driver. I got real DAMN lucky noticing the warning with the joystick
> > > driver - THAT WAS IN THE MAIN KERNEL SOURCES. Considering that the kernel
> > > is no where near a zero warning compile, this could easily be lost in
> > > the noise.

> > And if you'd have missed it you'd have found a way to oops a development
> > kernel - big deal , want a few more 8)

> > > structure, then your arguement applies with full force. But, you get
> > > random acts of terrorism IN BOTH CASES, whether you put the additional
> > > element at the end or in the middle. In the case of the inserted structure
> > > element, you get it when the moved functions are improperly referenced.

> > A binary driver built with symbol versioning won't load across that change.
> > If its built without symbol versioning then someone chose to disable
> > the very protection that is designed to catch it
> >
> > This is a development tree. It doesnt have a stable binary API, now instead
> > of bitching how about saying "nice Linus thank you for stopping NFS from
> > losing data without an error message on NFS file closes" ?

> Let me repeat: I don't care about the binary API. I care about the
> source API. And that was broken and I haven't seen a reason that
> explains just *how* breaking source compatibility conferred some
> benefit.

It does convey one benefit. If the structure element is appended,
I don't believe you get a compiler warning about insufficient initializers
(someone will correct me if I'm wrong on that). The inserted element DID
cause an initializer warning, at least in the case of the joystick driver
(your milage may vary). That should, in theory, give you a "down and
dirty" check for any structures you may have missed. You turn on EVERYTHING
and "grep" for that specific error message. Fix and repeat until clean.
Based on some of the other messages I've seen, it looks like one or two
drivers got missed anyways (saw another message about a typo).

I can certainly see the benefit to getting the sources up to date
as quickly as possible and not allowing these things to accumulate. Two
years down the road and another element gets added, and your stuck with
counting fields to figure out whether or not you've got any other missing
fields, when you want to USE the new fangled field.

However, to be of any use, something like this needed to be screamed
from the roof tops. There should have been a "Danger Will Robinson Danger"
message go out explicitly stating that "This structure is being changed
in a way that will make device drivers break. If you get an initializer
warning message when you recompile your sources, you must fix this."

It's really pretty difficult to watch for indeterminant warning
messages when you don't know something is in the wind. I didn't get
anywhere near building for my laptop, but I would have just recompiled
the PCMCIA drivers and walked away for a cup of coffee during the compile.
I would have hoped that anything of this severity could, at least, cause
a fatal compiler error that would stop the build. I realize that's
difficult in this case where a structure is merely being grown.

So the benefit was that it was done in a way to give the driver
developers a "heads up" on the structure change. But I don't recall
seeing any warnings to be on the lookout for the warnings. That would
have helped.

> Regards,

> Richard....

Mike

-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@WittsEnd.com
  (The Mad Wizard)      |  (770) 925-8248   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html