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
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to