range_overflows(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ range_overflows β€” the "is this range out of bounds??" check ✨

okay so bestie, this is a page from the Kernel API Manual and it's literally called range_overflows, and it does exactly one thing: checks if a range is out of bounds πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

range_overflows (start , size , max );

🌸 ARGUMENTS 🌸

  • start β€” where the range starts, bestie. the beginning. the main character of the range ✨
  • size β€” how big the range is πŸŽ€
  • max β€” the exclusive upper boundary. note the word exclusive, it's giving very important πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this is a strict check πŸ’… it figures out whether the range [start, start + size) is invalid with respect to the allowable range [0, max).

and here's the part you gotta remember: any range starting at or beyond max counts as an overflow β€” even if size is 0. like, zero size does not save you here, no cap 😭 so don't come in thinking "oh but my size is zero, it's fine" because it is NOT fine, it's still flagged. periodt.


⭐ RETURN ⭐

returns true if the range is out of bounds πŸ”₯ (and by vibe, false if it's all good β€” but the page only spells out the true case so that's what we're saying πŸ‘‘)


πŸ’– SEE ALSO πŸ’–

kernel file ./include/linux/overflow.h β€” that's where all the overflow besties live 🫢

like, that's the whole overflow cinematic universe, go read them all, iykyk 🌈


and that's the page!! brought to you from ./include/linux, dated October 2026 🌸 mwah, go check your ranges, bestie πŸ’œπŸ§š

πŸ“¦ where this page comes from