[llvm-branch-commits] [compiler-rt] release/20.x: [sanitizer_common] Remove interceptors for deprecated struct termio (#137403) (PR #137707)
H. Peter Anvin via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Apr 28 15:01:00 PDT 2025
hpax wrote:
So I realize I'm coming late to this party, but there are other problems too: the termios ioctls (TCGETS, TCSETS*) are using the wrong structure, because struct termios comes from glibc, not from the kernel.
I think that *both* issues can be solved by including <linux/termios.h> instead of <termios.h>. Note that they are mutually exclusive, because that will import the kernel "struct termios".
Finally, the sanitizer is completely missing the v2 termios ioctls, which also require <linux/termios.h> to be included. Those are:
TCGETS2
TCSETS2
TCSETSW2
TCSETSF2
Note that not all Linux platforms have these, because some simply didn't need them (the kernel native struct termios was "already" termios2.)
That being said, these ioctls are all new enough to have the size and direction encoded in the ioctl number, so I don't know if that means that you don't need to have special code for them.
https://github.com/llvm/llvm-project/pull/137707
More information about the llvm-branch-commits
mailing list