[ ... ]
> Yes, I feel dumb for not including it, regardless of the docs.  I
> should have remembered seeing it scroll by on FreeBSD and Linux
> compilations..

Nah, no need to feel bad about this. Everyone seems to trip over
this, you're in the best of company there.
Including our own developers, and if you don't know the symptoms
then it'll take you weeks to track it down even if you're a
uttermostly-senior capacity in kernel debugging ...

Once you know the symptoms (corruption of the nonvolatile registers,
they're scribbled over by an interrupt) it's easy to recognize the
pattern. It'll always be something:

        generic_func ->
                -> driver_entry (you don't see that in the dump)
                ...
                <- driver_entry (you don't see that in the dump)
                -> some_other_generic_func
                        -> BOOM

because an arg for the crashing func came from %rbx/%r12..%r15
and that seemingly got clobbered with "garbage".

If anybody is to blame, then it's the gcc folks, who have given people
the equivalent of a car airbag that explodes if you turn the steering
wheel at a time when the radio is switched on.

As said, gcc 3.4.4 has finally made "-mno-red-zone" implicit when
using "-mcmodel=kernel". There's some posting on the gcc developers
list by Andi Kleen of Suse, early last year, requesting exactly
that so that people wouldn't shoot themselves in the foot all the
time. I just can't find that posting right now ...
And as said, 3.4.4 came too late to be included as the compiler
that ships with S10 :(

FrankH.


Reply via email to