[PATCH] Linux: Define struct termios2 and its ioctls on all architectures

Florian Weimer fweimer@redhat.com
Fri Jul 4 19:44:26 GMT 2025


* H. Peter Anvin:

> On July 4, 2025 11:36:07 AM PDT, Florian Weimer <fweimer@redhat.com> wrote:
>>* H. Peter Anvin:
>>
>>> I have issues with this in terms of namespace, since if there is ever
>>> a revised termios user disable interface this puts things right back
>>> in the hole where they have been.
>>
>>What's a user disable interface?
>>
>>> If we are going to do something like this I would like to suggest
>>> making them __kernel_termios2 consistently.
>>
>>I don't see how this would be better because the UAPI headers frequently
>>use __kernel_termios2.
>>
>>The glibc definition of struct termios2 has to match the Linux
>>definition, otherwise the POSIX functions won't work.  So it's not like
>>struct termios, where our definition is different from the kernel's
>>pretty much everywhere.
>
> It is, though, and as a result the termios 1 ioctls don't work. In
> general I think it is better to discourage anyone from using the
> ioctls at all.

The patch does that, by undefining the termios 1 ioctls.

Should we undefined the termios 2 ioctls, too?

Thanks,
Florian



More information about the Libc-alpha mailing list