<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://sourceware.org/bugzilla/bugzilla.dtd">

<bugzilla version="4.0.10"
          urlbase="http://sourceware.org/bugzilla/"
          
          maintainer="overseers@sourceware.org"
>

    <bug>
          <bug_id>10601</bug_id>
          
          <creation_ts>2009-09-03 21:05:00 +0000</creation_ts>
          <short_desc>user-space deref/registers in loc2c</short_desc>
          <delta_ts>2011-07-20 21:19:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>systemtap</product>
          <component>runtime</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>10289</blocked>
    
    <blocked>10318</blocked>
    
    <blocked>10762</blocked>
    
    <blocked>10907</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Frank Ch. Eigler">fche</reporter>
          <assigned_to name="Frank Ch. Eigler">fche</assigned_to>
          <cc>jistone</cc>
    
    <cc>mjw</cc>
          <cf_gcchost></cf_gcchost>
          <cf_gcctarget></cf_gcctarget>
          <cf_gccbuild></cf_gccbuild>
          

      

      

      

          <long_desc isprivate="0">
            <commentid>38060</commentid>
            <who name="Frank Ch. Eigler">fche</who>
            <bug_when>2009-09-03 21:05:08 +0000</bug_when>
            <thetext>For secure/robust memory and register access for user-space $target expressions,
the translator must parametrize loc2c to emit different calls for user-space
probes than for kernel-space ones.  This is partly so that user-space $pointers
can&apos;t poke at kernel memories, and vice versa.

Related, the user-space register/memory access logic must become aware of
32-bit vs. 64-bit user-space processes on a 64-bit host.  For registers,
this appears to require use of the proper utrace regset machinery instead
of poking at pt_regs.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>38061</commentid>
            <who name="Josh Stone">jistone</who>
            <bug_when>2009-09-03 21:11:05 +0000</bug_when>
            <thetext>Likewise, @cast will need to learn whether its type should be treated as a user
or kernel.  This can&apos;t come from probe context, since @cast can appear in any
probe or function.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>38073</commentid>
            <who name="Mark Wielaard">mjw</who>
            <bug_when>2009-09-04 07:05:24 +0000</bug_when>
            <thetext>This is the root cause of bug #10318 &quot;Bad address reading arg from mark probe&quot;
which also contains some discussions about the implementation of this in loc2c.
The register mapping disparity also seems to be the root cause of some of the
exelib.exp mark.tcl tests failing (currently disabled) on 32-on-64 bit systems,
bug #10289 &quot;stap probes user space markers don&apos;t work with 32-on-64
executables&quot;. On i386 some sdt_misc.exp sdt_types tests are failing, which most
likely can also be attributed to the register fetch mismatch in user space.

It might be good to make comment #1 into its own bug.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>40462</commentid>
            <who name="Frank Ch. Eigler">fche</who>
            <bug_when>2009-12-21 19:21:56 +0000</bug_when>
            <thetext>The basic function for loc2c purposes ($-variables) is done for i386 and x86-64.
Further work needed: interfacing unwinding logic, porting to other architectures,
and working on the tapset/**/register* widgets to interface to the same.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>49945</commentid>
            <who name="Mark Wielaard">mjw</who>
            <bug_when>2011-07-20 21:19:29 +0000</bug_when>
            <thetext>*** Bug 10318 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
      

    </bug>

</bugzilla>