From: "Carlos O'Donell" <carlos@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: amwang@redhat.com, netdev@vger.kernel.org, tmb@mageia.org,
libc-alpha@sourceware.org, yoshfuji@linux-ipv6.org
Subject: Re: [Patch net-next v2] net: sync some IP headers with glibc
Date: Fri, 06 Sep 2013 01:19:34 -0400 [thread overview]
Message-ID: <522965E6.8010708@redhat.com> (raw)
In-Reply-To: <20130904.131351.1326721513428082697.davem@davemloft.net>
On 09/04/2013 01:13 PM, David Miller wrote:
> From: Cong Wang <amwang@redhat.com>
> Date: Thu, 15 Aug 2013 17:28:10 +0800
>
>> Solution:
>> =========
>>
>> - Synchronize linux's `include/uapi/linux/in6.h'
>> with glibc's `inet/netinet/in.h'.
>> - Synchronize glibc's `inet/netinet/in.h with linux's
>> `include/uapi/linux/in6.h'.
>> - Allow including the headers in either other.
>> - First header included defines the structures and macros.
>
> Applied, thanks for being so patient. I want to spend the past few
> weeks making sure this is the right way to handle all of this and
> now I am confident that it is.
Pushed into 2.19.
If you compile glibc with old non-UAPI kernel headers then this code
never triggers and glibc continues to redefine the structures and we
have the same problem as always.
If you compile glibc with new UPAI kernel headers, but without the
kernel side patch, you fix the build issues only in one order of
inclusion i.e. linux header then glibc header. Thus previously your
application didn't compile, now it does, but without the kernel
side patch some of the constants glibc define may be missing. At that
point you need to file a bug against the kernel you are using and
request they add the missing constants (or add them yourself).
If you compile glibc with new UAPI kernel headers, and those headers
have the kernel side patch then everything works in any inclusion order
and the defined constants are the superset of those defined in both
implementations.
Note:
- It could have been possible with more added complexity to handle
the case where the kernel headers have not been patched. I deemed
that because the code never originally compiled that it was fine
to continue not compiling in that intermediate state and only support
the final state as a complete solution. Feel free to disagree.
commit 6c82a2f8d7c8e21e39237225c819f182ae438db3
Author: Carlos O'Donell <carlos@redhat.com>
Date: Fri Sep 6 01:02:30 2013 -0400
Coordinate IPv6 definitions for Linux and glibc
This change synchronizes the glibc headers with the Linux kernel
headers and arranges to coordinate the definition of structures
already defined the Linux kernel UAPI headers.
It is now safe to include glibc's netinet/in.h or Linux's linux/in6.h
in any order in a userspace application and you will get the same
ABI. The ABI is guaranteed by UAPI and glibc.
Cheers,
Carlos.
prev parent reply other threads:[~2013-09-06 5:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 9:28 [Patch net-next v2] net: sync some IP headers with glibc Cong Wang
2013-08-15 9:28 ` [GLIBC Patch v2] inet: avoid redefinition of some structs in kernel Cong Wang
2013-08-16 15:15 ` Carlos O'Donell
2013-08-16 15:32 ` Andreas Jaeger
2013-08-16 15:44 ` Carlos O'Donell
2013-08-16 15:47 ` Carlos O'Donell
2013-08-19 1:20 ` Cong Wang
2013-08-19 18:11 ` Carlos O'Donell
2013-08-26 5:26 ` Mike Frysinger
2013-09-06 4:52 ` Carlos O'Donell
2013-09-04 17:13 ` [Patch net-next v2] net: sync some IP headers with glibc David Miller
2013-09-06 5:19 ` Carlos O'Donell [this message]
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=522965E6.8010708@redhat.com \
--to=carlos@redhat.com \
--cc=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=libc-alpha@sourceware.org \
--cc=netdev@vger.kernel.org \
--cc=tmb@mageia.org \
--cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).