]> sourceware.org Git - systemtap.git/commit
PR23160,PR14690: 32-on-64 bit fixes
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 25 Jun 2018 16:34:43 +0000 (12:34 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 25 Jun 2018 16:40:28 +0000 (12:40 -0400)
commit5826dc359ef5a168b29cb3f740308e242dba2ebd
tree9a770b6f33160bf4cbc07499c0149878663d4136
parentdf2c137091079ac991e13160fd3b1758384fd02d
PR23160,PR14690: 32-on-64 bit fixes

After reported crashes with the syscalls.* test cases, found that
32-on-64 bits were b0rked, because pt_regs* addresses were being
truncated and yet later dereferenced in kernel space.

To simplify analysis, added a pt_regs *sregs to the common probe
context, which signifies 'syscall mode' register dumps.  This is
different from normal kregs (kernel-space, normal abi, 64-bit-only)
and uregs (user-space, normal abi, either 32- or 64-bit), and needs
custom processing in _stp_syscall_nr and especially _stp_arg2.

The sregs-setter embedded-C function __set_syscall_pt_regs(r)
needs to be private/tapset-guru, but we lack proper /* markup */
for that particular mode.  So that function currently needs to
be replicated as private inside each sysc_* file, ugh.  Not
for long though.

After this patch, while this doesn't quite pass, but the read
parts look good:

sudo make installcheck RUNTESTFLAGS=nd_syscall.exp\ syscall.exp CHECK_ONLY="readwrite"
runtime/common_probe_context.h
tapset/linux/aux2_syscalls.stp
tapset/linux/sysc_read.stp
tapset/x86_64/registers.stp
tapsets.cxx
This page took 0.030458 seconds and 5 git commands to generate.