Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/uaccess.h>
#include <asm/word-at-a-time.h>
Go to the source code of this file.
Macros | |
#define | aligned_byte_mask(n) (~0xfful << (BITS_PER_LONG - 8 - 8*(n))) |
Functions | |
long | strnlen_user (const char __user *str, long count) |
EXPORT_SYMBOL (strnlen_user) | |
long | strlen_user (const char __user *str) |
EXPORT_SYMBOL (strlen_user) | |
#define aligned_byte_mask | ( | n | ) | (~0xfful << (BITS_PER_LONG - 8 - 8*(n))) |
Definition at line 11 of file strnlen_user.c.
EXPORT_SYMBOL | ( | strnlen_user | ) |
EXPORT_SYMBOL | ( | strlen_user | ) |
strlen_user: - Get the size of a user string INCLUDING final NUL. : The string to measure.
Context: User context only. This function may sleep.
Get the size of a NUL-terminated string in user space.
Returns the size of the string INCLUDING the terminating NUL. On exception, returns 0.
If there is a limit on the length of a valid string, you may wish to consider using strnlen_user() instead.
Definition at line 126 of file strnlen_user.c.
strnlen_user: - Get the size of a user string INCLUDING final NUL. : The string to measure. : Maximum count (including NUL character)
Context: User context only. This function may sleep.
Get the size of a NUL-terminated string in user space.
Returns the size of the string INCLUDING the terminating NUL. If the string is too long, returns 'count+1'. On exception (or invalid count), returns 0.
Definition at line 95 of file strnlen_user.c.