check_telem_request(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

  1. The request follows the format of struct wilco_ec_telem_request. gotta match the shape, iykyk 🧚
  2. The supplied command code is one of the allowlisted commands. if it's not on the list, it's not getting in β€” periodt πŸ‘‘
  3. 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 🌈

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