[PATCH RFC v3 3/8] linux/ioctls: move sockios ioctls back into a separate file

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue May 13 11:13:35 GMT 2025



On 13/05/25 11:54, H. Peter Anvin wrote:
> On May 13, 2025 12:47:56 AM PDT, Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> wrote:
>>
>>
>> On 12/05/25 19:08, H. Peter Anvin wrote:
>>> On 5/8/25 10:53, Adhemerval Zanella Netto wrote:
>>>>
>>>>
>>>> On 03/05/25 22:42, H. Peter Anvin wrote:
>>>>> In the kernel, these are <linux/sockios.h>. The differences between
>>>>> <linux/sockios.h> the copied data in <bits/ioctls.h> are minor, but
>>>>> the kernel uses some #ifdefs which might not be safe in glibc.
>>>>>
>>>>> Futhermore, a handful of such ioctls have architecture-specific
>>>>> numbers, from <asm/sockios.h>
>>>>>
>>>>> Factor out <bits/sockios.h>, and use <asm/sockios.h> for the
>>>>> arch-specific ioctls.
>>>>>
>>>>> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
>>>>
>>>> Do you expect sockios.h to change overtime with newer definition
>>>> that might require to use the kernel headers along with glibc
>>>> definitions? In such cases glibc now tries to check if the kernel
>>>> header exists and use it instead (like statx.h).
>>>>
>>>
>>> Perhaps you can look at see if the current <linux/sockios.h> is clean enough for glibc to use (or if there is something we kernel people can do to clean it up sufficiently?)
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/sockios.h
>>
>> Right, I will take a look but I had the impressions that you stumbled
>> on some issues with this patchset (I was not sure if are doing this
>> to prevent future issues).
>>
> 
> I think I have stumbled onto a fair number of issues since I decided to try to tackle this, however I'm not sure what specifically you are referring to here.

I meant the change for alpha, hppa, and sparc to remove the
linux/sockios.h inclusion.  The patch itself is ok, I was just 
not clear which issues you potentially saw to motivate this.


More information about the Libc-alpha mailing list