Linux-kernel mailing list archive 2000-26,: Re: spinlocks() are severely broken in 2.2.X and 2.4.X for modules

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

Jamie Lokier (lk@tantalophile.demon.co.uk)
Sat, 1 Jul 2000 02:13:29 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Jeff V. Merkey: "Re: spinlocks() are severely broken in 2.2.X and 2.4.X for modules"
- Previous message: Pavel Machek: "Re: Patented algorithms in kernel"

Jeff V. Merkey wrote:
> what gets generated from spinlock.h and GCC in the 2.4.X case is as
> follows:
>
> <NWLockLRU>
> 0x45a0 mov 0x4(%esp, 1),%edx
> 0x45a4 pushf
> 0s45a5 pop %eax
> 0x45a6 cli
> 0x45a7 mov %eax,0x80(%edx)
> 0x45ad lock decb 0x7C(%edx)
> 0x45b1 js 0x4639 <ReleaseWaiters+49> // if the lock fails it
> jumps to this address is in the function ReleaseWaiters() ????
> 0x45b7 ret

May I suggest you use the `--reloc' option to objdump to generate the
disassembly, which will show the actual address that is jumped to.

It will still say "0x4639 <ReleaseWaiters+49>", which is misleading
(blame the disassembler), but it will also add a line saying where the
instruction really jumps to after the module is loaded and relocated...

have a nice day,
-- Jamie

-
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/

- Next message: Jeff V. Merkey: "Re: spinlocks() are severely broken in 2.2.X and 2.4.X for modules"
- Previous message: Pavel Machek: "Re: Patented algorithms in kernel"