[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2431941f-3aac-d31f-e6f5-8ed2ed7b2e5c@arm.com>
Date: Mon, 22 Jul 2019 13:41:07 +0000
From: Szabolcs Nagy <Szabolcs.Nagy@....com>
To: Arnd Bergmann <arnd@...db.de>, Florian Weimer <fweimer@...hat.com>
CC: nd <nd@....com>, GNU C Library <libc-alpha@...rceware.org>,
"Sergei Trofimovich" <slyfox@...too.org>,
Networking <netdev@...r.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Michael Kerrisk <mtk.manpages@...il.com>,
linux-man <linux-man@...r.kernel.org>
Subject: Re: [PATCH glibc] Linux: Include <linux/sockios.h> in <bits/socket.h>
under __USE_MISC
On 22/07/2019 12:34, Arnd Bergmann wrote:
> On Mon, Jul 22, 2019 at 1:31 PM Florian Weimer <fweimer@...hat.com> wrote:
>>
>> Historically, <asm/socket.h> (which is included from <bits/socket.h>)
>> provided ioctl operations for sockets. User code accessed them
>> through <sys/socket.h>. The kernel UAPI headers have removed these
>> definitions in favor of <linux/sockios.h>. This commit makes them
>> available via <sys/socket.h> again.
>
> Looks good to me.
>
> I wonder if we should still do these two changes in the kernel:
>
> - include asm/socket.h from linux/socket.h for consistency
> - move the defines that got moved from asm/sockios.h to linux/sockios.h
> back to the previous location to help anyone who is user
> newer kernel headers with older glibc headers.
does user code actually expect these in sys/socket.h
or in asm/socket.h ?
man 7 socket
mentions SIOCGSTAMP but does not say the header.
man 2 ioctl_list
specifies include/asm-i386/socket.h as the location.
if user code tends to directly include asm/socket.h
then i think it's better to undo the kernel header
change than to put things in sys/socket.h.
(note: in musl these ioctl macros are in sys/ioctl.h
which is not a posix header so namespace rules are
less strict than for sys/socket.h and users tend to
include it for ioctl())
Powered by blists - more mailing lists