calipso_cache_check(9)
π¦ calipso_cache_check β bestie edition π
okay so this is a page from the Kernel API Manual, and today's main character is calipso_cache_check β¨
β¨ NAME β¨
calipso_cache_check β check the CALIPSO cache for a label mapping π
πΈ SYNOPSIS πΈ
int calipso_cache_check (const unsigned char *key , u32 key_len ,
struct netlbl_lsm_secattr *secattr );
π ARGUMENTS π
keyβ the buffer you wanna check, that's the vibekey_lenβ how long that buffer is, in bytes, no capsecattrβ the security attribute struct you're gonna use π«Ά
π DESCRIPTION π
So basically this function peeks into the cache to see if a label mapping already exists for the key you handed it. If there's a match, the cache gets adjusted and the secattr struct gets populated with the correct LSM security attributes. Literally doing the most for you π
Now β here's the fun part β if the entry is not already the first one in the cache bucket, the cache gets adjusted in this exact way:
- The cache entry's activity counter gets incremented β¬οΈ
- The previous (higher ranking) entry's activity counter gets decremented β¬οΈ
- If the difference between the two activity counters is "geater" than
CALIPSO_CACHE_REORDERLIMIT, the two entries get swapped π
the original doc really said "geater" and honestly? we respect the typo. it means greater, bestie π
Returns zero on success, -ENOENT for a cache miss, and other negative values on error. periodt. β¨
π₯ SEE ALSO π₯
The kernel file lives at ./net/ipv6/calipso.c, and it's giving family reunion, because here's the whole crew:
calipso_cache_entry_free(9)calipso_map_cache_hash(9)calipso_cache_init(9)calipso_cache_invalidate(9)calipso_cache_add(9)calipso_doi_search(9)calipso_doi_add(9)calipso_doi_free(9)calipso_doi_free_rcu(9)calipso_doi_remove(9)calipso_doi_getdef(9)calipso_doi_putdef(9)calipso_doi_walk(9)calipso_validate(9)calipso_map_cat_hton(9)calipso_map_cat_ntoh(9)calipso_pad_write(9)calipso_genopt(9)calipso_opt_update(9)calipso_tlv_len(9)calipso_opt_find(9)calipso_opt_insert(9)calipso_opt_del(9)calipso_opt_getattr(9)calipso_sock_getattr(9)calipso_sock_setattr(9)calipso_sock_delattr(9)calipso_req_setattr(9)calipso_req_delattr(9)calipso_skbuff_optptr(9)calipso_skbuff_setattr(9)calipso_skbuff_delattr(9)calipso_init(9)
aaaand that's the page!! π§ mwah π
sign-off besties: this one's from the kernel file under./net/ipv6, dated October 2026, and it's filed ascalipso_cache_check(9)β go read the whole collection, iykyk ππ
π¦ 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