public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
To: Arnd Bergmann <arnd@arndb.de>, Florian Weimer <fweimer@redhat.com>
Cc: nd <nd@arm.com>, GNU C Library <libc-alpha@sourceware.org>,
	Sergei Trofimovich <slyfox@gentoo.org>,
	Networking <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	linux-man <linux-man@vger.kernel.org>
Subject: Re: [PATCH glibc] Linux: Include <linux/sockios.h> in <bits/socket.h> under __USE_MISC
Date: Mon, 22 Jul 2019 13:41:07 +0000	[thread overview]
Message-ID: <2431941f-3aac-d31f-e6f5-8ed2ed7b2e5c@arm.com> (raw)
In-Reply-To: <CAK8P3a0hC4wvjwCi4=DCET3C4qARMY6c58ffjwG3b1ZPM6kr-A@mail.gmail.com>

On 22/07/2019 12:34, Arnd Bergmann wrote:
> On Mon, Jul 22, 2019 at 1:31 PM Florian Weimer <fweimer@redhat.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())


  reply	other threads:[~2019-07-22 13:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 11:31 [PATCH glibc] Linux: Include <linux/sockios.h> in <bits/socket.h> under __USE_MISC Florian Weimer
2019-07-22 11:34 ` Arnd Bergmann
2019-07-22 13:41   ` Szabolcs Nagy [this message]
2019-07-22 13:44     ` Florian Weimer
2019-07-22 13:47       ` Szabolcs Nagy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2431941f-3aac-d31f-e6f5-8ed2ed7b2e5c@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=nd@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=slyfox@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox