This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/17928] A number of the systemtap.syscall/syscall.exp tests fail on 32-bit arm because size_t sign extended to 64-bit value


https://sourceware.org/bugzilla/show_bug.cgi?id=17928

--- Comment #6 from William Cohen <wcohen at redhat dot com> ---
It appears that the debuginfo the for argument locations are not right for some
of the functions being instrumented.  The arm processor should be passing the
first four arguments in registers starting with register 0.  So for the mmap.c
example just looked at the mlock syscall that has a problem.  The r0 and r1
values look sane for mlock(r, 4096), mlock((void *)-1, 4096), and mlock(0, -1).

$ sudo ../../install/bin/stap -e 'probe syscall.mlock {printf("%s\n", $$parms);
print_regs()}' -c ./mmap 
start=0x0 len=0xffffffffbe91a4e8
 CPU: 1pc : [<c0133c3c>]    lr : [<c0020530>]
sp : e8d0bfa8  ip : 00000008  fp : be91a4d4
r10: 00000200  r9 : e8d0a000  r8 : c0020544
r7 : 00000096  r6 : 00008674  r5 : 00000000  r4 : be91a4e8
r3 : 00000001  r2 : 00000001  r1 : 00001000  r0 : b6ff1000
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 30C5387D
Table: 44243540  DAC: 55555555
start=0x0 len=0xffffffffbe91a4e8
 CPU: 1pc : [<c0133c3c>]    lr : [<c0020530>]
sp : e8d0bfa8  ip : 00000008  fp : be91a4d4
r10: 00000200  r9 : e8d0a000  r8 : c0020544
r7 : 00000096  r6 : 00008674  r5 : 00000000  r4 : be91a4e8
r3 : 00000001  r2 : 00000001  r1 : 00001000  r0 : ffffffff
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 30C5387D
Table: 44243540  DAC: 55555555
start=0x0 len=0xffffffffbe91a4e8
 CPU: 1pc : [<c0133c3c>]    lr : [<c0020530>]
sp : e8d0bfa8  ip : 00000008  fp : be91a4d4
r10: 00000200  r9 : e8d0a000  r8 : c0020544
r7 : 00000096  r6 : 00008674  r5 : 00000000  r4 : be91a4e8
r3 : 00000001  r2 : 00000010  r1 : ffffffff  r0 : 00000000
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 30C5387D
Table: 44243540  DAC: 55555555

It looks like gcc is generating incorrect information generated a file with the
debug information with:

eu-readelf -N --debug-dump=info
/run/media/wcohen/wasteland/wcohen/kernel/linux/vmlinux > kernel_debuginfo

Then searched for SyS_mlock.  Below it looks like referencing the wrong
registers for the parameters, r5 for start and r4 for len

 [cf86bd]    subprogram
             external             (flag_present) Yes
             name                 (strp) "SyS_mlock"
             decl_file            (data1) 1
             decl_line            (data2) 726
             prototyped           (flag_present) Yes
             type                 (ref4) [cead10]
             low_pc               (addr) 0xc0133c3c
             high_pc              (data4) 260 (0xc0133d40)
             frame_base           (exprloc) 
              [   0] call_frame_cfa
             sibling              (ref4) [cf879b]
 [cf86d8]      formal_parameter
               name                 (strp) "start"
               decl_file            (data1) 1
               decl_line            (data2) 726
               type                 (ref4) [cead10]
               location             (exprloc) 
                [   0] reg5
 [cf86e6]      formal_parameter
               name                 (string) "len"
               decl_file            (data1) 1
               decl_line            (data2) 726
               type                 (ref4) [cead10]
               location             (exprloc) 
                [   0] reg4

-- 
You are receiving this mail because:
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]