KSTACK_CONTAINS(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… KSTACK_CONTAINS(9) πŸ’…

okay so this one is straight from the Kernel Developer's Manual, and it's all about kstack_contains β€” the lowkey iconic function that checks if an address range is living inside a thread's kernel stack. no cap, it's giving address-range vibe check. ✨

🌸 NAME 🌸

kstack_contains β€” determine if an address range lies within the kernel stack for a thread

✨ SYNOPSIS ✨

#include <machine/stack.h>

bool
kstack_contains(struct thread *td, vm_offset_t va, size_t len);

πŸ¦‹ DESCRIPTION πŸ¦‹

bestie, kstack_contains() is here to determine whether a given address range falls within the kernel stack for the thread pointed to by td. that's the whole main character job. 🫢

πŸ’– RETURN VALUES πŸ’–

The function kstack_contains() returns true if the range of addresses [va..( va+len-1)] (both addresses inclusive) lies within the kernel stack for the thread pointed to by argument td, or returns false otherwise. slay. βœ…

πŸ’€ ERRORS πŸ’€

This function does not return an error. so no error era, bestie β€” it's literally not that kind of function. πŸ™ˆ

🌈 SEE ALSO 🌈


kisses and sparkles πŸŽ€ this page is from Debian, dated May 2, 2023, and it's the KSTACK_CONTAINS(9) manual page. periodt. πŸ’œ

πŸ“¦ where this page comes from