sshp_buf_span_from(9)
π sshp_buf_span_from(9) β like, the kernel API manual bestie π«Ά
okay so real talk, this page lives in the Kernel API Manual β section 9, the one for all the kernel-internals girlies β and it's about sshp_buf_span_from. yes it's a mouthful. no we're not renaming it. it's iconic, we deal. β¨
πΈ NAME πΈ
sshp_buf_span_from β initialize a span from the given buffer and offset. that's the whole vibe. we're making a span, and it's starting from a buffer at a specific offset. slay.
π SYNOPSIS π
void sshp_buf_span_from (struct sshp_buf *buf , size_t offset , struct
ssam_span *span );
that's it, that's the whole signature. three args, returns void, no drama. π
π¦ ARGUMENTS π¦
bufβ the buffer we're making the span from. the source material, the main character, the origin story.offsetβ where in the buffer the span should start. like a starting line, but for bytes.spanβ the span we're initializing. this one's an output, so we're writing into it, not reading from it. she's the canvas, bestie. π¨
β¨ DESCRIPTION β¨
so what does it actually do? it initializes the span you handed it so that it points at the memory at the given offset inside the buffer. cute. and the length of the span? that gets capped by the number of bytes used in the buffer after the offset β aka the bytes remaining after the offset. so if there's not a ton of buffer left, the span just gets shorter. length vibe check: capped. π§
β οΈ warning, and this is a real one, not a drill β οΈ this function does NOT validate thatoffsetis less than or equal to the number of bytes used in the buffer, and it does not validate thatoffsetis less than or equal to the buffer capacity either. nope. not doing it. this must be guaranteed by the caller. so likeβ¦ that's on you, bestie. please check your offsets. i'm begging. ππ
π SEE ALSO π
- Kernel file
./drivers/platform/surface/aggregator/ssh_parser.hstructsshp_buf(9) sshp_buf_init(9)sshp_buf_alloc(9)sshp_buf_free(9)sshp_buf_drop(9)sshp_buf_read_from_fifo(9)
okay that's the page!! go forth and span responsibly π¦π this one's from ./drivers/platform/surface/agg..., dated October 2026, and it says sshp_buf_span_from(9) at the bottom like a little signature. periodt. π
β
π¦ 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