Re: spinlocks() are severely broken in 2.2.X and 2.4.X for modules

Andi Kleen (ak@suse.de)
Sat, 1 Jul 2000 12:05:06 +0200


On Sat, Jul 01, 2000 at 11:59:11AM +0200, Manfred Spraul wrote:
> Andi Kleen wrote:
> >
> > I had it happen to me in the past too for my sysctl rewrite. In this
> > case it happened in the main kernel for a .sysctl -> .data relocation.
> > It happened in the main vmlinux. It seems to require some complex
> > input to trigger (it is not as simple as intersegment relocation does not
> > work). In my case I had a few hundred relocations and one was wrong
> > and caused crashes.
> >
>
> Is it possible to detect the problem automatically until binutils is
> fixed? (objdump + script)
> We could add a postprocessing step after the linker, and if relocations
> are wrong, then make should fail.

Maybe, but the test cases are very big (nwfs or in my case the whole
kernel). Of course you could test for the particular missing relocation
that was tracked down, but that would be probably fragile because it could
move with code changes. Generating a reliable test would require full
understanding of the bug (and that would probably lead to a fix)

It would be better just to fix the bug in the linker and check the version
number :-)

> Changing the spinlock code is IMHO not a solution: we rely on
> .text.somewhere_else very often (spinlock, semaphore, exception handler
> table, init functions, initcall,...)

I agree.
In the automatic sysctl code it is needed too (no more ugly register_sysctl,
but automatic initialisation from a segment like in BSD)

-Andi

-
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.tux.org/lkml/