cipso_v4_cache_check(9)
β¨ cipso_v4_cache_check(9) β¨
okay so bestie, buckle up π this one's from the Kernel API Manual and it's basically the CIPSO cache's little vibe check β cipso_v4_cache_check is out here checking the CIPSO cache for a label mapping. no cap, it's giving "am I in the system or not" energy π«Ά
πΈ NAME πΈ
cipso_v4_cache_check β check the CIPSO cache for a label mapping π
π¦ SYNOPSIS π¦
int cipso_v4_cache_check (const unsigned char *key , u32 key_len ,
struct netlbl_lsm_secattr *secattr );
π ARGUMENTS π
keyβ the buffer to check π (this is the thing you're looking up, bestie)key_lenβ buffer length, in bytes πsecattrβ the security attribute struct to use ποΈ
π DESCRIPTION π
so what this function actually does: it checks the cache to see if a label mapping already exists for the given key. π
if there is a match, then the cache gets adjusted and the secattr struct is populated with the correct LSM security attributes. the way that the cache gets adjusted depends on whether the entry is already the first in the cache bucket β if it's not already first, here's the little glow-up routine:
- the cache entry's activity counter is incremented β¬οΈ
- the previous (higher ranking) entry's activity counter is decremented β¬οΈ
- if the difference between the two activity counters is
geaterthanCIPSO_V4_CACHE_REORDERLIMIT, the two entries are swapped π
ngl bestie,geateris straight-up spelled like that in the original β not my typo, I'm just the messenger π and yes the condition is greater-thanCIPSO_V4_CACHE_REORDERLIMIT, exactly as written π
and then the return sitch π«Ά: returns zero on success β, -ENOENT for a cache miss π, and other negative values on error π
π§ SEE ALSO π§
kernel file ./net/ipv4/cipso_ipv4.c β and honestly? the whole friend group showed up for this one π
cipso_v4_cache_entry_free(9)cipso_v4_map_cache_hash(9)cipso_v4_cache_init(9)cipso_v4_cache_invalidate(9)cipso_v4_cache_add(9)cipso_v4_doi_search(9)cipso_v4_doi_add(9)cipso_v4_doi_free(9)cipso_v4_doi_free_rcu(9)cipso_v4_doi_remove(9)cipso_v4_doi_getdef(9)cipso_v4_doi_putdef(9)cipso_v4_doi_walk(9)cipso_v4_map_lvl_valid(9)cipso_v4_map_lvl_hton(9)cipso_v4_map_lvl_ntoh(9)cipso_v4_map_cat_rbm_valid(9)cipso_v4_map_cat_rbm_hton(9)cipso_v4_map_cat_rbm_ntoh(9)cipso_v4_map_cat_enum_valid(9)cipso_v4_map_cat_enum_hton(9)cipso_v4_map_cat_enum_ntoh(9)cipso_v4_map_cat_rng_valid(9)cipso_v4_map_cat_rng_hton(9)cipso_v4_map_cat_rng_ntoh(9)cipso_v4_gentag_hdr(9)cipso_v4_gentag_rbm(9)cipso_v4_parsetag_rbm(9)cipso_v4_gentag_enum(9)cipso_v4_parsetag_enum(9)cipso_v4_gentag_rng(9)cipso_v4_parsetag_rng(9)cipso_v4_gentag_loc(9)cipso_v4_parsetag_loc(9)cipso_v4_optptr(9)cipso_v4_validate(9)cipso_v4_error(9)cipso_v4_genopt(9)cipso_v4_sock_setattr(9)cipso_v4_req_setattr(9)cipso_v4_delopt(9)cipso_v4_sock_delattr(9)cipso_v4_req_delattr(9)cipso_v4_getattr(9)cipso_v4_sock_getattr(9)cipso_v4_skbuff_setattr(9)cipso_v4_skbuff_delattr(9)cipso_v4_init(9)
okay that's the whole page, periodt π
this lil drop comes to you from the source at ./net/ipv4, dated October 2026 β iconic, timeless, and yes, cipso_v4_cache_check(9) is the main character here πβ¨ stay hydrated and cache-safe bestie ππ
π¦ 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