From f902d9596b3f7ee135d180ec0bae01c05d9a97bd Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 6 Feb 2007 20:23:25 +0000 Subject: * kernel_{string,long,...,char} protected accessor functions * test suites for all of 'em too * even documentation * mm, donuts 2007-02-06 Frank Ch. Eigler * stapfuncs.5.in: Add docs for kernel_{long,int,short,char} and some user_string* variants. 2007-02-06 Frank Ch. Eigler * conversions.stp (kernel_long/int/short/char): New functions. 2007-02-06 Frank Ch. Eigler * buildok/conversions.stp: Build-test all conversions.stp functions. * systemtap.stress/conversions.*: New test. --- stapfuncs.5.in | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'stapfuncs.5.in') diff --git a/stapfuncs.5.in b/stapfuncs.5.in index a76ff240..af4cbd15 100644 --- a/stapfuncs.5.in +++ b/stapfuncs.5.in @@ -65,15 +65,37 @@ unwind the current probe handler, nor block new probe handlers. will shortly respond to the request and initiate an orderly shutdown. .SS CONVERSIONS +.PP +These functions access kernel or user-space data. They try to validate the +supplied addresses, and can thus result in errors if the pointers are invalid, +or if a user-space access would cause a fault. .TP kernel_string:string (addr:long) -Copy a string from kernel space at given address. The validation of this -address is only partial at present. +Copy a 0-terminated string from kernel space at given address. +.TP +kernel_long:long (addr:long) +Copy a long from kernel space at given address. +.TP +kernel_int:long (addr:long) +Copy an int from kernel space at given address. +.TP +kernel_short:long (addr:long) +Copy a short from kernel space at given address. +.TP +kernel_char:long (addr:long) +Copy a char from kernel space at given address. .TP user_string:string (addr:long) -Copy a string from user space at given address. The validation of this -address is only partial at present. - +Copy a string from user space at given address. If the access would +fault, return "" and signal no errors. +.TP +user_string2:string (addr:long, err_msg:string) +Copy a string from user space at given address. If the access would +fault, return instead the err_msg value. +.TP +user_string_warn:string (addr:long) +Copy a string from user space at given address. If the access would +fault, signal a warning and return "". .SS STRING .TP strlen:long (str:string) -- cgit