ksmbd_decom...work_request(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ksmbd_decompress_work_request(9) πŸ’…

okay so this is a page straight out of the Kernel API Manual, and it's literally about decompressing an encrypted work request. yes bestie, both things at once. compression AND encryption. the audacity. let's get into it 🫢


✨ NAME ✨

ksmbd_decompress_work_request β€” decompress an encrypted work request πŸ’–

like, the whole vibe of this function in one line. iconic behaviour honestly.


🌸 SYNOPSIS 🌸

int ksmbd_decompress_work_request (struct ksmbd_work *work );

one function, one argument, returns an int. clean. no notes. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • work β€” the work item whose request buffer contains a compression transform πŸ’«

that's it, that's the whole input. she takes a struct ksmbd_work * and the buffer inside it is the one carrying a compression transform. lowkey minimal, highkey essential.


πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the lore. SMB3 encrypts a compressed message by applying compression first and encryption second. compression β†’ then encryption. in that order. no cap. ✨

because of that ordering, the receive loop can therefore only decode the compression transform before work allocation for an unencrypted request. that's the path where everything's chill and out in the open. 🌈

but an encrypted request? she's different. the compression transform is tucked underneath the encryption layer, so you literally cannot get to it yet. an encrypted request must be decompressed after its encryption layer has been removed. peel off the encryption first, then decompress. the way that order actually matters. πŸ’…

fr fr bestie, the sequence is not a suggestion β€” compression first, encryption second on the way in, so encryption off first, decompression second on the way out. respect the pipeline. πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • otherwise, a negative errno πŸ’€

that's the whole check. zero means slay, negative means something went sideways, and the errno tells you what.


πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./fs/smb/server/compress.c β€” the source file where the magic lives, bestie πŸ—‚οΈ
  • ksmbd_decompress_request(9) β€” the related decompression entry, go read it too 🧚
  • ksmbd_compress_response(9) β€” the response-side counterpart, because compression goes both ways πŸ’œ

and that's the page!! 🌸 from ./fs/smb/server, dated October 2026, out of the Kernel API Manual β€” mwah, no notes, go decompress responsibly bestie πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from