pt_check_range(9)
π pt_check_range(9) β the kernel API manual, but make it cute
okay so bestie, welcome to pt_check_range from the Kernel API Manual β this is the little vibe-check function that makes sure a range is actually, y'know, iterable. no cap, it's giving gatekeeper but in a helpful way π«Ά
β¨ NAME β¨
pt_check_range β validates that the range can be iterated. literally its whole job. iconic behavior honestly π
πΈ SYNOPSIS πΈ
int pt_check_range (struct pt_range *range );
π ARGUMENTS π
rangeβ the range we're validating, bestie. that's the one. the range in question. π¦
π DESCRIPTION π
so what it does is: it checks that VA and last_va both fall within the permitted range of VAs. like, are you supposed to be here, girl? π
and if the format is using PT_FEAT_SIGN_EXTEND, then it also checks that the sign extension is correct. double duty, highkey obsessed with how thorough it is β¨
fr fr, this is the function that goes "mhm mhm, and the sign extension? correct? slay." π
π SEE ALSO π
- Kernel file
./drivers/iommu/generic_pt/pt_iter.h pt_index_to_va(9)pt_entry_fully_covered(9)pt_range_to_index(9)pt_range_to_end_index(9)pt_next_entry(9)for_each_pt_level_entry(9)pt_load_single_entry(9)pt_top_range(9)pt_all_range(9)pt_upper_range(9)pt_make_range(9)pt_init(9)pt_init_top(9)pt_descend(9)pt_walk_range(9)pt_range_slice(9)pt_top_memsize_lg2(9)pt_compute_best_pgsize(9)PT_MAKE_LEVELS(9)
and that's the whole page, bestie β the squad over at ./drivers/iommu/generic_pt dropped this in October 2026, and it's still filed under pt_check_range(9) if you ever need to find it again. go off, range validator π₯ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms