Functions | |
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) |
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. |
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.
|
Copy an argv from user space to a List.
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; _stp_list_clear (arglist); _stp_copy_argv_from_user (arglist, argv); foreach (arglist, ptr) printk ("%s ", ptr->str); printk ("\n"); } Definition at line 130 of file copy.c. References _stp_list_add_str(), _stp_strncpy_from_user(), and map_root::num. |
|
Copy a block of data from user space. If some data could not be copied, this function will pad the copied data to the requested size using zero bytes.
|
|
Copy a NULL-terminated string from userspace. On success, returns the length of the string (not including the trailing NULL). If access to userspace fails, returns -EFAULT (some data may have been copied).
Definition at line 94 of file copy.c. Referenced by _stp_copy_argv_from_user(). |