authenticate_sleb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… authenticate_sleb(9) πŸ’…

okay bestie, welcome to authenticate_sleb(9) from the Kernel API Manual β€” yes, kernel API manual, we are literally in the big leagues now ✨

πŸŽ€ NAME πŸŽ€

authenticate_sleb β€” authenticate one scan LEB

🌸 SYNOPSIS 🌸

int authenticate_sleb (struct ubifs_info *c , struct ubifs_scan_leb
*sleb , struct shash_desc *log_hash , int is_last );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • c β€” UBIFS file-system description object. it's giving β€œthe whole UBIFS situation” energy πŸ’–
  • sleb β€” the scan LEB to authenticate. this is the LEB we're checking, periodt.
  • log_hash β€” bestie, the original page leaves this one blank, so I'm not inventing lore πŸ’€ mystery icon behavior only.
  • is_last β€” if true, this is the last LEB. simple, iconic, no cap.

πŸ”₯ DESCRIPTION πŸ”₯

So what it does: this function iterates over the buds of a single LEB, authenticating all buds with the authentication nodes on this LEB. literally one LEB getting its whole authentication moment πŸ’…

Here's the tea: authentication nodes are written after some buds, and they contain a HMAC covering the authentication node itself and the buds between the last authentication node and the current authentication node. like, the HMAC is holding the receipts for the node and the buds in between 🫢

It can happen that the last buds cannot be authenticated because a powercut happened when some nodes were written but not the corresponding authentication node. tragic, but that's the scenario 😭

This function returns the number of nodes that could be authenticated or a negative error code. so it's either a cute little count or a negative error code showing up to ruin the vibe, iykyk.

🌈 SEE ALSO 🌈

The original page points at the kernel file ./fs/ubifs/replay.c, and then the whole crew shows up:


mwah πŸ’– this little page comes from ./fs/ubifs, dated October 2026, and it's authenticate_sleb(9) β€” bye bestie, periodt πŸŽ€

πŸ“¦ where this page comes from