ufetch(9) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
UFETCH(9)              NetBSD Kernel Developer's Manual              UFETCH(9)

ufetch, ufetch_8, ufetch_16, ufetch_32, ufetch_64, ufetch_char, ufetch_short, ufetch_int, ufetch_long, ufetch_ptr -- fetch data from user-space
#include <sys/systm.h> int ufetch_8(const uint8_t *uaddr, uint8_t *valp); int ufetch_16(const uint16_t *uaddr, uint16_t *valp); int ufetch_32(const uint32_t *uaddr, uint32_t *valp); int ufetch_64(const uint64_t *uaddr, uint64_t *valp); int ufetch_char(const unsigned char *uaddr, unsigned char *valp); int ufetch_short(const unsigned short *uaddr, unsigned short *valp); int ufetch_int(const unsigned int *uaddr, unsigned int *valp); int ufetch_long(const unsigned long *uaddr, unsigned long *valp); int ufetch_ptr(const void **uaddr, void **valp);
The ufetch functions provide a way to fetch the values of single memory cells from user-space. In each case, the value referenced by the user- space address uaddr is retrieved and stored at the kernel memory location referenced by valp. The ufetch_64 function is only available on systems employing the `LP64' memory model, which can be determined by testing for the presence of the _LP64 C preprocessor macro.
The ufetch functions return 0 on success and an error number on failure.
copy(9), ustore(9) NetBSD 9.1 March 18, 2019 NetBSD 9.1
Powered by man-cgi (2024-03-20). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.