hottubpatentshottub.tech
US 9,672,134 B2#232912 Most CitedActiveUnited States (USPTO)Utility

Scripted multiprocess probing without system privilege

0Forward Citations (#232912 Global)
0.0/yrCitation Velocity (#232912 Global)
0.98Citation PageRank (#232912 Global)
9Prior Art Cited
10Structured Claims
0Drawings / Sheets

Abstract

A controller process loads a module based on a user-generated script into itself. The controller process also generates a shared memory mapping using offset pointers as opposed to absolute pointers. The controller process loads the module and the shared memory mapping into target processes indicated by the user-generated script in order to probe the target processes.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 9 · Forward citations: 0.

Claims (10)

  1. Claim 1Independent Claim

    A method comprising: receiving a script indicating a probe point in a target process of a plurality of target processes, wherein the script indicates an action to be taken at the probe point in probing the plurality of target processes; and executing, by a processor, a controller process in user space in view of the script, wherein the executing comprises: generating, by the processor, a shared memory mapping comprising an offset pointer defining a shared memory space to be shared between the controller process and the target process; loading, by the processor, the shared memory mapping into the plurality of target processes, wherein each of the plurality of target processes is associated with a different address of a corresponding offset pointer with respect to the shared memory space, and wherein loading the shared memory mapping into the target process results in the action being taken upon execution of the target process comprising the probe point; and updating, by the processor, a variable stored in the shared memory space in view of the probe point, wherein the updating of the variable modifies a state of the target process.

  2. Claim 2Depends on #1

    The method of claim 1 , wherein the action comprises outputting information via an output channel.

  3. Claim 3Depends on #1

    The method of claim 1 , further comprising: parsing the script; generating a source file in view of the script and a library of functions; and compiling the source file and the library of functions.

  4. Claim 4Depends on #1

    The method of claim 1 , wherein the target process is in user space.

  5. Claim 5Depends on #1

    The method of claim 1 , wherein the shared memory mapping is address neutral and does not comprise an absolute pointer.

  6. Claim 6Depends on #1

    The method of claim 1 , wherein loading the shared memory mapping into the target process comprises loading the shared memory into a new process generated by the target process.

  7. Claim 7Depends on #1

    The method of claim 1 , wherein the updating of the variable indicates whether a conditional action is to be executed by the target process.

  8. Claim 8Depends on #1

    The method of claim 1 , further comprising, responsive to detecting that a new process is generated by the target process, tracking, by the processor, a state of the new process by injecting an instruction into the new process in accordance with the script.

  9. Claim 9Independent Claim

    A non-transitory computer readable storage medium having instructions that, when executed by a processing device, cause the processing device to: receive, by the processing device, a script indicating a probe point in a target process of a plurality target processes, wherein the script indicates an action to be taken at the probe point in probing the plurality of target processes; execute, by the processing device, a controller process in user space in view of the script to: generate a shared memory mapping comprising an offset pointer defining a shared memory space to be shared between the controller process and the target process; load the shared memory mapping into the plurality of target processes, wherein each of the plurality of target processes is associated with a different address of a corresponding offset pointer with respect to the shared memory space, and wherein to load the shared memory mapping into the target process results in the action being taken upon execution of the target process comprising the probe point; and update a variable stored in the shared memory space in view of the probe point, wherein the update of the variable modifies a state of the target process.

  10. Claim 10Depends on #9

    The non-transitory computer readable storage medium of claim 9 , wherein the executable instructions further cause the processing device to: parse the script; generate a source file in view of the script and a library of functions; and compile the source file and the library of functions.

Technical Overview & Description

TECHNICAL FIELD Embodiments of the present invention relate to process probing, and more specifically to process probing without system privilege. BACKGROUND An introspection tool allows users, such as system administrators and software developers, to examine the activities of software (e.g., operating system, applications, programs) while the software is executing to help diagnose a performance or functional problem. An introspection tool can include tracing and probing features, for example, to allow a user to examine variables in the software code, and to “hook” into the software code to gather information about the software. A user can use an introspection tool to create a user introspection script containing functions to examine and monitor software. The script may probe processes for certain events and run custom probe handlers when those events occur. Probe handlers can print tracing output, update global script variables, and/or modify program state. BRIEF DESCRIPTION OF THE DRAWINGS The present invention is illustrated by way of example, and not by way of limitation, and can be more fully understood with reference to the following detailed description when considered in connection with the figures in which: FIG. 1 is a block diagram that illustrates an embodiment of a computer system with a user space introspection tool. FIG. 2 is a flow diagram illustrating one embodiment for a method of running a user space introspection tool. FIG. 3 illustrates a diagrammatic representation of a machine in the exemplary form of a computer system. DETAILED DESCRIPTION Described herein is a method and system for providing process probing functionality to a user without system privileges. Some aspects of the present disclosure are directed to a runtime mode for an introspection tool that runs entirely in user space so system privilege is not required. T

Cited By — Indexed Forward Citations (0 of 0 total)

No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.

References Cited — Backward Prior Art (9)

PatentTitleYearCitations

Non-Patent Literature (22)

  • Buck et al. "An API for Runtime Code Patching." Nov. 2000. http://cipressosjsu.info/CS266/pdf/an-api-for-runtime-code-patching.pdf.
  • Buck et al. “An API for Runtime Code Patching.” Nov. 2000. http://cipressosjsu.info/CS266/pdf/an—api—for—runtime—code—patching.pdf.
  • Hennessy et al. Computer Architecture. 2007. Morgan Kaufmann. 4th ed. pp. C-38-C-42.
  • Josh Stone, "Bug 14706-Support multiple target processes in stapdyn", https://sourceware.org/bugzilla/show-bug.cgi?id=14706, Oct. 11, 2012.
  • Josh Stone, "Scripted Introspection with Dyninst", Red Hat, Mar. 26, 2012.
  • Josh Stone, "WIP Support for Pure-Userspace Stap Through Dyninst", git://sourceware.org/systemtap.git/commitdiff, May 8, 2012.
  • Josh Stone, “Bug 14706—Support multiple target processes in stapdyn”, https://sourceware.org/bugzilla/show—bug.cgi?id=14706, Oct. 11, 2012.
  • Josh Stone, David Smith, "stapdyn: Porting SystemTap onto Dyninst", Performance Tools @ Red Hat, Apr. 29, 2013.
  • Josh Stone, David Smith, "Systemtop and new connections: uprobes, dyninst, pcp", Red Hat, Aug. 30, 2012.
  • Josh Stone. "Scripted Introspection with Dyninst." Mar. 2012. http://www.dyninst.org/sites/default/files/downloads/w2012/pdweek2012-jistone.pdf.
  • Josh Stone. "sourceware.org Git-systemtap.git/blob-stapdyn/TODO." Aug. 2012. https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=blob;f=stapdyn/TODO;hb=923fc591b1dcf4de193079eb6c868359e2077d2d.
  • Josh Stone. "SystemTap Sans Kernel." Apr. 2012. https://events.linuxfoundation.org/images/stories/pdf/lfcs2012-jstone.pdf.
  • Josh Stone. "Trying stapdyn (pure-userspace systemtap with dyninst)." Jul. 2012. http://sourceware.org/ml/systemtap/2012-q3/msg00090.html.
  • Josh Stone. “sourceware.org Git—systemtap.git/blob—stapdyn/TODO.” Aug. 2012. https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=blob;f=stapdyn/TODO;hb=923fc591b1dcf4de193079eb6c868359e2077d2d.
  • Josh Stone. “SystemTap Sans Kernel.” Apr. 2012. https://events.linuxfoundation.org/images/stories/pdf/lfcs2012—jstone.pdf.
  • Ollie Whitehouse. "An Analysis of Address Space Layout Randomization on Windows Vista™." 2007. http://www.symantec.com/avcenter/reference/Address-Space-Layout-Randomization.pdf.
  • Ollie Whitehouse. “An Analysis of Address Space Layout Randomization on Windows Vista™.” 2007. http://www.symantec.com/avcenter/reference/Address—Space—Layout—Randomization.pdf.
  • Red Hat Enterprise Linux Team, "Red Hat Announces Beta Availability of Red Hat Developer Toolset 2.0", Red Hat, May 30, 2013.
  • Schulz et al. "DynTG: A tool for Interactive, Dynamic Instrumentation." Feb. 2005. https://e-reports-ext.llnl.gov/pdf/316760.pdf.
  • Suresh Warrier. "ProbeVue: Extended Users Guide Specification." Jan. 2008. IBM. http://public.dhe.ibm.com/software/dw/aix/au-probevue.zip.
  • Wilson et al. "Pointer Swizzling at Page Fault Time: Efficiently and Compatibly Supporting Huge Address Spaces on Standard Hardware." Sep. 1992. IEEE. IWOOOS '92.
  • Xu et al. "Dynamic Instrumentation of Threaded Applications." Oct. 1998. ftp://ftp.cs.wisc.edu/paradyn/papers/Xu99Dynamic.pdf.