From 655ee2825121e149a9976e562946892efb20aea1 Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 7 Apr 2005 21:48:47 +0000 Subject: *** empty log message *** --- runtime/docs/html/group__copy.html | 99 ++++++++++++++++++++++++++++++-------- 1 file changed, 80 insertions(+), 19 deletions(-) (limited to 'runtime/docs/html/group__copy.html') diff --git a/runtime/docs/html/group__copy.html b/runtime/docs/html/group__copy.html index 83928d95..72321187 100644 --- a/runtime/docs/html/group__copy.html +++ b/runtime/docs/html/group__copy.html @@ -4,7 +4,7 @@ -
Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages
+
Main Page | Modules | Directories | File List | Globals | Related Pages

Functions to copy from user space.

Functions to copy from user space. More... @@ -12,18 +12,21 @@ - + - - + + - + + + +
long _stp_strncpy_from_user (char *dst, const char __user *src, long count)
 Copy a NULL-terminated string from userspace.
unsigned long _stp_copy_from_user (char *dst, const char __user *src, unsigned long count)
void _stp_string_from_user (String str, const char __user *src, long count)
 Copy a block of data from user space.
int _stp_copy_argv_from_user (MAP list, char __user *__user *argv)
 Copy a String from userspace.
unsigned long _stp_copy_from_user (char *dst, const char __user *src, unsigned long count)
 Copy an argv from user space to a List.
 Copy a block of data from user space.
int _stp_copy_argv_from_user (MAP list, char __user *__user *argv)
 Copy an argv from user space to a List.

Detailed Description

Functions to copy from user space.

None of these functions will sleep (for example to allow pages to be swapped in). It is possible (although rare) that the data in user space will not present and these functions will return an error.


Function Documentation

-

+

- + @@ -66,27 +69,27 @@ Copy an argv from user space to a List.
@@ -31,7 +34,7 @@ None of these functions will sleep (for example to allow pages to be swapped in)
int _stp_copy_argv_from_user MAP MAP  list,

Returns:
number of elements in list
-Example:
MAP arglist ;
+Example: 
MAP arglist ;
 
 int inst_do_execve (char * filename, char __user *__user *argv, char __user *__user *envp, struct pt_regs * regs)
 {
-  struct map_node_str *ptr;
+  struct map_node_str *ptr;
 
   _stp_list_clear (arglist);
-  _stp_copy_argv_from_user (arglist, argv);
+  _stp_copy_argv_from_user (arglist, argv);
 
-  foreach (arglist, ptr)
+  foreach (arglist, ptr)
     printk ("%s ", ptr->str);
   printk ("\n");
 }
 

-Definition at line 130 of file copy.c. +Definition at line 154 of file copy.c.

-References _stp_list_add_str(), _stp_strncpy_from_user(), and map_root::num. +References _stp_list_add_str(), and _stp_strncpy_from_user(). -

+

- +
@@ -112,7 +115,7 @@ References _stp_list_add_str() [inline]
@@ -139,7 +142,63 @@ If some data could not be copied, this function will pad the copied data to the

Returns:
number of bytes that could not be copied. On success, this will be zero.

-Definition at line 115 of file copy.c. +Definition at line 139 of file copy.c. + + +

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void _stp_string_from_user String  str,
const char __user *  src,
long  count
+
+ + + +
+   + + +

+Copy a String from userspace. +

+Copies a string of up to count bytes from userspace into a String. If access to userspace fails, returns -EFAULT (some data may have been copied).

Parameters:
+ + + + +
str Destination String.
src Source address, in user space.
count Maximum number of bytes to copy, including the trailing NULL.
+
+ +

+Definition at line 113 of file copy.c. +

+References STP_STRING_SIZE.

@@ -192,11 +251,13 @@ If access to userspace fails, returns -EFAULT (some data may have been copied). count Maximum number of bytes to copy, including the trailing NULL. -If count is smaller than the length of the string, copies count bytes and returns count. +If count is smaller than the length of the string, copies count bytes and returns count.

+

Deprecated:
I can't think of why you wouldn't use _stp_string_from_user() instead.
+

-Definition at line 94 of file copy.c. +Definition at line 96 of file copy.c.

-Referenced by _stp_copy_argv_from_user(). +Referenced by _stp_copy_argv_from_user(). -- cgit