ksmbd_decom...work_request(9)
π 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 π₯
0on 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
- 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