elf_validit...dex_versions(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ elf_validity_cache_index_versions β€” the Kernel API Manual files ✨

okay so bestie, this page is elf_validit...dex_versions(9) and it lives in the Kernel API Manual (yes the title is literally squished with an ellipsis, we love a truncated icon πŸ’…). She's got a long name in the NAME section and honestly she earns it. Buckle up πŸŽ€

🌸 NAME 🌸

elf_validity_cache_index_versions β€” validate those version indices and then cache them, periodt. Validation girlie AND storage girlie, we contain multitudes ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

int elf_validity_cache_index_versions (struct load_info *info , int
flags );

πŸ’– ARGUMENTS πŸ’–

  • info β€” the load info you're caching version indices into, bestie. Heads up tho: it must already have load_info->sechdrs and load_info->secstrings populated. No populating, no slay 😭
  • flags β€” the load flags. These are the relevant ones for suppressing version loading β€” go peek at uapi/linux/module.h for the deets, iykyk πŸ‘‘

🌈 DESCRIPTION 🌈

okay so here's the vibe check 🫢 If we're straight-up ignoring modversions because of the flags, then we zero out all the version indices and just return validity. Done, iconic, no notes πŸ’€

Othewrise β€” and yes we're checking, lowkey thorough β€” she verifies these two things:

  • If "__version_ext_crcs" is present, then "__version_ext_names" is present too. Like, they come as a set, no leaving your bestie behind πŸ’œ
  • There is a name present for every crc. Every single one. No stragglers, no cap ⭐

Then, if present, she populates:

  • load_info->index.vers
  • load_info->index.vers_ext_crc
  • load_info->index.vers_ext_names

that's the whole cache-and-go, main character energy fr fr πŸ”₯

πŸ“ RETURN πŸ“

  • 0 if it's valid β€” slay ✨
  • -ENOEXEC on failure β€” not slay 😭

🧚 SEE ALSO 🧚

so many siblings, this girl has a whole friend group πŸŽ€


ngl bestie, do not call this one before load_info->sechdrs and load_info->secstrings are populated. That's the one requirement, don't break her heart πŸ™ˆ

πŸ’œ sign-off time: this page ships from ./kernel/module and it's dated October 2026. Consider yourself thoroughly informed, bestie β€” go be valid βœ¨πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from