ssh_ptl_shou...rupt_tx_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ssh_ptl_should_corrupt_tx_data(9) β€” like, the actual name, bestie

okay so we're in the Kernel API Manual today and this page is called ssh_ptl_should_corrupt_tx_data(9) β€” yes the header got squished to ssh_ptl_shou...rupt_tx_data(9) up top but she's the same girl, promise πŸŽ€


✨ NAME ✨

ssh_ptl_should_corrupt_tx_data β€” the error-injection hook that literally just messes up your data on purpose to pretend something invalid got sent to the EC πŸ’€


πŸ¦‹ SYNOPSIS πŸ¦‹

bool ssh_ptl_should_corrupt_tx_data (void );

🌸 ARGUMENTS 🌸

  • void β€” no arguments. not a single one. she takes nothing and she gives chaos ✨

πŸ’– DESCRIPTION πŸ’–

okay so picture this: this here is a hook, right, and its whole job is simulating corrupt/invalid data being sent from the host (that's the driver, hi πŸ‘‹) over to the EC πŸ”₯

how does she do it? she causes the packet data to be actively corrupted by overwriting it with pre-defined values β€” like, unhinged behaviour honestly β€” such that it becomes invalid, which causes the EC to clap back with a NAK packet 😭

and why, you ask? because it's useful to test handling of NAK packets received by the driver. that's it. that's the gig. a little chaos goblin in service of correctness πŸ‘‘

ngl bestie, this one is intentionally destructive to your packet bytes β€” she is supposed to wreck the data. do not ship this thinking it's a normal function, she's an error injection hook, periodt πŸ’…

🌈 SEE ALSO 🌈

kernel file: ./drivers/platform/surface/aggregator/ssh_packet_layer.c πŸ—‚οΈ

and the whole friend group, in order:

ssh_ptl_should_drop_ack_packet(9), ssh_ptl_should_drop_nak_packet(9), ssh_ptl_should_drop_dsq_packet(9), ssh_ptl_should_fail_write(9), ssh_ptl_should_corrupt_rx_syn(9), ssh_ptl_should_corrupt_rx_data(9), ssh_packet_get(9), ssh_packet_put(9), ssh_packet_init(9), ssh_ctrl_packet_cache_init(9), ssh_ctrl_packet_cache_destroy(9), ssh_ctrl_packet_alloc(9), ssh_ctrl_packet_free(9), ssh_ptl_tx_wakeup_packet(9), ssh_ptl_tx_start(9), ssh_ptl_tx_stop(9), ssh_ptl_submit(9), ssh_ptl_cancel(9), ssh_ptl_rx_start(9), ssh_ptl_rx_stop(9), ssh_ptl_rx_rcvbuf(9), ssh_ptl_shutdown(9), ssh_ptl_init(9), ssh_ptl_destroy(9)


🫢 that's the whole page!! sourced from ./drivers/platform/surface/agg... and dated October 2026 β€” go forth and corrupt responsibly, mwah πŸ’œπŸŽ€

πŸ“¦ where this page comes from