[PATCH] Linux: Add compatibility function fors tcgetattr, tcsetattr
H. Peter Anvin
hpa@zytor.com
Tue Dec 9 00:48:45 GMT 2025
On 2025-12-08 16:39, H. Peter Anvin wrote:
>
> As I have previously explained, this doesn't actually solve anything; if anything, it makes the situation far worse, because the problems at hand are cross-application. Symbol versioning doesn't help one iota when the problematic code is running in a completely different process.
>
> Furthermore, the problematic code is generally code that bypasses glibc.
>
> I did a long writeup on this already.
>
Specifically, we have seen three types of problems, all of which are
application bugs and none of which will be helped by introducing new symbol
versions.
1. Applications calling ioctl() directly and failing to scrub c_cflag &
CIBAUD. A workaround to make glibc "nicer" for such applications
is already in the glibc tree.
2. Applications using glibc Bxxx constants and passing them to ioctl().
3. Applications stuffing Bxxx constants into c_cflag instead of calling
cfset*speed().
#1 is a cross-application problem. Symbol versions don't do anything when the
broken code is in another process.
#2 and #3 are compile-time problems. Symbol versions don't do anything since
the linker will be picking up the new symbols when compiling the code. Note
that these ONLY apply after recompiling, the old binaries work fine!
So, this patch is a solution in search of a problem. To the extent my opinion
matters:
Nacked-by: H. Peter Anvin <hpa@zytor.com>
-hpa
More information about the Libc-alpha
mailing list