diff options
author | Leandro Lupori <luporl@FreeBSD.org> | 2020-02-06 13:21:59 +0000 |
---|---|---|
committer | Leandro Lupori <luporl@FreeBSD.org> | 2020-02-06 13:21:59 +0000 |
commit | 38cf2a4334fbc5b90761b1fd0199ac93ea83630f (patch) | |
tree | 5074546fc07397127d184948ea43915e3e91fa55 /lib/libkvm/kvm_kerndisp.3 | |
parent | 210176ad76ee0f1d1ac9ca8d6d63dc5f5fc66427 (diff) | |
download | src-38cf2a4334fbc5b90761b1fd0199ac93ea83630f.tar.gz src-38cf2a4334fbc5b90761b1fd0199ac93ea83630f.zip |
Notes
Diffstat (limited to 'lib/libkvm/kvm_kerndisp.3')
-rw-r--r-- | lib/libkvm/kvm_kerndisp.3 | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/lib/libkvm/kvm_kerndisp.3 b/lib/libkvm/kvm_kerndisp.3 new file mode 100644 index 000000000000..a1d53a4ecb2f --- /dev/null +++ b/lib/libkvm/kvm_kerndisp.3 @@ -0,0 +1,57 @@ +.\" +.\" Copyright (c) 2020 Leandro Lupori <luporl@FreeBSD.org> +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 5, 2020 +.Dt KVM_KERNDISP 3 +.Os +.Sh NAME +.Nm kvm_kerndisp +.Nd get kernel displacement +.Sh LIBRARY +.Lb libkvm +.Sh SYNOPSIS +.In kvm.h +.Ft kssize_t +.Fn kvm_kerndisp "kvm_t *kd" +.Sh DESCRIPTION +.Fn kvm_kerndisp +returns the number of bytes by which the kernel referenced by +.Fa kd +is displaced. +This is the difference between the kernel's base virtual address at run time +and the kernel base virtual address specified in the kernel image file. +.Pp +Note that if the kernel is moved to a lower memory address, +the displacement will be negative. +.Sh RETURN VALUES +.Fn kvm_kerndisp +returns the number of bytes by which the kernel is displaced. +If the kernel is not displaced or if it is not possible to find the +displacement then 0 is returned. +.Sh SEE ALSO +.Xr kvm 3 , +.Xr kvm_close 3 , +.Xr kvm_open 3 |