KCOPY(9)
π« KCOPY(9) π«
okay bestie, welcome to the Kernel Developer's Manual entry for kcopy β it's giving "copy bytes but make it fault-safe" and honestly? iconic. π«Ά
β¨ NAME β¨
kcopyβ copy data with abort on page fault π
πΈ SYNOPSIS πΈ
#include <sys/systm.h>
int
kcopy(const void *src, void *dst, size_t len);
π¦ DESCRIPTION π¦
So kcopy() copies len bytes from src to dst, and it aborts if a fatal page fault is encountered. no cap, that's the whole vibe check. π
And listen β kcopy() must save and restore the old fault handler. Why? Because it gets called by uiomove(9), which may be in the path of servicing a non-fatal page fault. like, do not skip that part, bestie, it's literally in the description. π
β RETURN VALUES β
0β success, slay β¨- an error number β failure, and that's the documented outcome π
π SEE ALSO π
and that's the page, bestie! source/version cutie: Debian, dated April 6, 2017 β KCOPY(9) said periodt. πππ¦
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2002 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms