xfs
[Top] [All Lists]

TAKE - Correct i386 backtrace on out of line lock code using jmp disp8 t

Subject: TAKE - Correct i386 backtrace on out of line lock code using jmp disp8 to get back to mainline
From: Keith Owens <kaos@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 30 Jun 2003 16:19:18 +1000
Sender: linux-xfs-bounce@xxxxxxxxxxx
When backtracing through i386 out of line lock code, any code that used
jmp disp8 to get back to the mainline code resulted in an incorrect
calculation for the new eip due to incorrect sign extension, which in
turn messes up the backtrace.  AFAICT it is only the XFS pagebuf lock
code that hit this special case.

--- /usr/tmp/TmpDir.6202-0/linux/arch/i386/kdb/kdba_bt.c_1.21   Mon Jun 30 
16:11:16 2003
+++ linux/arch/i386/kdb/kdba_bt.c       Mon Jun 30 16:11:03 2003
@@ -268,7 +268,7 @@
                        kdb_di.fprintf_func = save_fprintf_func;
 
                        if (offsize) {
-                               realeip += 1 + offsize + offset;
+                               realeip += 1 + offsize + (offsize == 1 ? 
(s8)offset : (s32)(offset));
                                if (kdbnearsym(realeip, &lock_symtab)) {
                                        /* Print the stext entry without args */
                                        bt_print_one(eip, NOBP, &ar, &symtab, 
0);


Date:  Sun Jun 29 23:16:04 PDT 2003
Workarea:  sherman.melbourne.sgi.com:/build/kaos/2.4.x-xfs

The following file(s) were checked into:
  bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs


Modid:  2.4.x-xfs:slinx:152253a
linux/arch/i386/kdb/kdba_bt.c - 1.22


<Prev in Thread] Current Thread [Next in Thread>
  • TAKE - Correct i386 backtrace on out of line lock code using jmp disp8 to get back to mainline, Keith Owens <=