News: 0001610691

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux Dropping SMC TCP ULP Support For Being "Fundamentally Broken"

([Linux Networking] 4 Hours Ago SMC TCP ULP)


Merged four years ago to the Linux kernel networking subsystem's Shared Memory Communications (SMC) code was TCP Upper Layer Protocol (ULP) support for allowing applications to replace TCP with the SMC protocol in-place as a transparent replacement. Except for the next kernel cycle it's set to be reverted after realizing it's "fundamentally broken."

Back in early 2022 the TCP ULO support for SMC was [1]introduced by an Alibaba engineer but now it's realized to be an inadequate design and that better, modern alternatives such as using BPF instead are possible.

The revert [2]commit elaborates:

"As reported by Al Viro, the TCP ULP support for SMC is fundamentally broken. The implementation attempts to convert an active TCP socket into an SMC socket by modifying the underlying `struct file`, dentry, and inode in-place, which violates core VFS invariants that assume these structures are immutable for an open file, creating a risk of use after free errors and general system instability.

Given the severity of this design flaw and the fact that cleaner alternatives (e.g., LD_PRELOAD, BPF) exist for legacy application transparency, the correct course of action is to remove this feature entirely."

Thus bidding the SMC TCP ULP feature farewell in the upcoming Linux 6.20~7.0 kernel cycle.



[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d7cd421da9da

[2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=df31a6b0a3057e66994ad6ccf5d95b9b9514f033



It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

- Al Viro on fixing drivers