KVM_KERNDISP(3)
πΈ NAME πΈ
Okay bestie, this is the kvm_kerndisp(3) page from the Library Functions Manual, and the name is literally kvm_kerndisp β get kernel displacement. Thatβs the whole assignment. π
π¦ LIBRARY π¦
This one lives in the Kernel Data Access Library (libkvm, -lkvm). Iconic. β¨
β¨ SYNOPSIS β¨
#include <kvm.h>
kssize_t
kvm_kerndisp(kvm_t *kd);
π DESCRIPTION π
Okay so kvm_kerndisp() returns the number of bytes by which the kernel referenced by kd is displaced. No cap, thatβs the whole thing.
Itβs the difference between the kernelβs base virtual address at run time and the kernel base virtual address specified in the kernel image file. Very βspot the differenceβ of it all. π«Ά
Note, bestie: if the kernel is moved to a lower memory address, the displacement will be negative. Yes, negative. Not a typo. π
π RETURN VALUES π
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. Simple as that, periodt. π
π SEE ALSO π
mwah π this page is from Debian, dated February 5, 2020 β thatβs the source/version and date, bestie, and we are not skipping the receipts. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2020 Leandro Lupori <luporl@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms