1kvm_read(3KVM)            Kernel VM Library Functions           kvm_read(3KVM)
2
3
4

NAME

6       kvm_read,  kvm_write  -  copy data to or from a kernel image or running
7       system
8

SYNOPSIS

10       cc [ flag... ] file... -lkvm [ library...]
11       #include <kvm.h>
12
13       ssize_t kvm_read(kvm_t *kd, uintptr_t addr, void *buf, size_t nbytes);
14
15
16       ssize_t kvm_write(kvm_t *kd, uintptr_t addr, void *buf, size_t nbytes);
17
18

DESCRIPTION

20       The kvm_read() function transfers data from the kernel image  specified
21       by  kd (see kvm_open(3KVM)) to the address space of the process. nbytes
22       bytes of data are copied from the kernel virtual address given by  addr
23       to the buffer pointed to by buf.
24
25
26       The  kvm_write() function is like kvm_read(), except that the direction
27       of data transfer is reversed. To use this function, the  kvm_open(3KVM)
28       call  that returned kd must have specified write access. If a user vir‐
29       tual address is given, it is resolved  in  the  address  space  of  the
30       process specified in the most recent kvm_getu(3KVM) call.
31

USAGE

33       The  kvm_read()  and  kvm_write()  functions  are obsolete and might be
34       removed  in  a  future  release.  The  functions   described   on   the
35       kvm_kread(3KVM) manual page should be used instead.
36

RETURN VALUES

38       On  success, these functions return the number of bytes actually trans‐
39       ferred. On failure, they return −1.
40

ATTRIBUTES

42       See attributes(5) for descriptions of the following attributes:
43
44
45
46
47       ┌─────────────────────────────┬─────────────────────────────┐
48       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
49       ├─────────────────────────────┼─────────────────────────────┤
50       │Interface Stability          │Obsolete                     │
51       ├─────────────────────────────┼─────────────────────────────┤
52       │MT-Level                     │Unsafe                       │
53       └─────────────────────────────┴─────────────────────────────┘
54

SEE ALSO

56       kvm_getu(3KVM),     kvm_kread(3KVM)kvm_nlist(3KVM),     kvm_open(3KVM),
57       attributes(5)
58
59
60
61SunOS 5.11                        2 May 2002                    kvm_read(3KVM)
Impressum