Andi Kleen wrote:
>
> Here is a quick hack. The results are slightly off because of section
> padding though. It only works on object files or modules (vmlinux doesn't
> have any reloc records)
>
$SPINSIZE = 14;
the .text.lock segment also contains semaphore & rwlock fixups.
Could you/Jeff send me a broken module?
If the wrong relocs really point into the wrong segment, then it should
be easy to find them: the number of relocs from .text into .text.lock
must be equal to the number of relocs from .text.lock back into .text.
[test attached]
./mstest.sh `find -iname '*.o'`
As expected these number always match in my kernel tree
[gcc-2.95.3-0.20000517 + binutils 2.9.5.0.22-6 from redhat rawhide]
Are you absolutely sure that broken fixup cause the SMP problems? A
broken fixup within spinlock might cause hard crashes, continue as if
the spinlock was acquired???
-- Manfred --------------817ECFEC4E9FB155452549FD Content-Type: application/x-sh; name="mstest.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mstest.sh"#!/bin/sh
checkfile() { # params: $1=File Name # echo -n "from .text.lock to .text" x1=`objdump --reloc --section=.text.lock $1 | grep _PC32 | grep '\.text$' | wc -l` # echo -n "from .text to .text..lock" x2=`objdump --reloc --section=.text $1 | grep _PC32 | grep '\.text\.lock$' | wc -l` # echo -n "from .text.lock to !.text" y1=`objdump --reloc --section=.text.lock $1 | grep _PC32 | grep '\.text\..*$' | wc -l` # echo -n "from .text.init to .lock" y2=`objdump --reloc --section=.text.init $1 | grep _PC32 | grep '\.text\.lock$' | wc -l` # echo -n "from .text.exit to .lock" y3=`objdump --reloc --section=.text.exit $1 | grep _PC32 | grep '\.text\.lock$' | wc -l` rx=$[x1-x2] ry=$[y1-y2-y3] #echo "$1 : .text $x1 -$x2 .text.init $y1 -$y2" if [ 0 != $rx ]; then echo "$1: mismatch for .text segment $x1 - $x2" fi if [ 0 != $ry ]; then echo "$1: mismatch for .text.init segment $y1 - $y2" fi }
for i in "$@";do checkfile $i done
--------------817ECFEC4E9FB155452549FD--
- 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/