check_telem_request(9)
π check_telem_request(9) β bestie edition
okay so this is a page from the Kernel API Manual and honestly? it's a little bouncer at the club door of your kernel. it's check_telem_request, and its whole job is vibe-checking stuff coming in from userspace. let's get into it π«Ά
β¨ NAME β¨
check_telem_request β make sure a request coming from userspace is actually valid, no cap.
πΈ SYNOPSIS πΈ
int check_telem_request (struct wilco_ec_telem_request *rq , size_t size
);
π ARGUMENTS π
rqβ the request buffer that got copied over from userspace. this is the thing we're inspecting πsizeβ how many bytes got copied from userspace. literally the byte count, nothing spicier than that.
π₯ RETURN π₯
0β valid, we're slaying, come on in β¨-EINVALβ bad command, OR the reserved byte is non-zero. either way, not it. π-EMSGSIZEβ the request is too long bestie, it's giving overstuffed.
π¦ DESCRIPTION π¦
okay so the whole reason this function exists: we highkey do not want to let userspace send arbitrary telemetry commands to the EC. like, absolutely not, no thank you π. so before anything goes through, we check a few things. and by "a few things" i mean:
- The request follows the format of
struct wilco_ec_telem_request. gotta match the shape, iykyk π§ - The supplied command code is one of the allowlisted commands. if it's not on the list, it's not getting in β periodt π
- The request only contains the necessary data for the header and arguments. no extra random junk snuck into the payload, we're not doing that πΈ
three checks, all iconic, all necessary. the way that this function just quietly protects the whole kernelβ¦ main character energy honestly β
π SEE ALSO π
- Kernel file
./drivers/platform/chrome/wilco_ec/telemetry.c struct wilco_ec_telem_request(9)struct telem_device_data(9)struct telem_session_data(9)telem_open(9)telem_device_free(9)telem_device_probe(9)
go read those too, they're all part of the same friend group π«Ά
and that's the page!! sourced from ./drivers/platform/chrome/wilc... and dated October 2026 β ty for coming to my ted talk, mwah ππ
π¦ 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