netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Carlos O'Donell" <carlos@redhat.com>
To: Andreas Jaeger <aj@suse.com>
Cc: Cong Wang <amwang@redhat.com>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Thomas Backlund <tmb@mageia.org>,
	libc-alpha@sourceware.org,
	YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [GLIBC Patch v2] inet: avoid redefinition of some structs in kernel
Date: Fri, 16 Aug 2013 11:44:35 -0400	[thread overview]
Message-ID: <520E48E3.6080703@redhat.com> (raw)
In-Reply-To: <520E461B.8040406@suse.com>

On 08/16/2013 11:32 AM, Andreas Jaeger wrote:
> On 08/15/2013 11:28 AM, Cong Wang wrote:
>> From: Carlos O'Donell <carlos@redhat.com>
>>
>> - 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.
> 
> Let me first say that I really love where this is going and would love
> to see more of this work.

The plan would be to eventually tackle more of the conflicting headers
in a uniform way.

> Will this work with older kernels as well? Meaning: Can I compile
> today's user land programs with a new glibc and Kernel 3.10? My reading
> of the patch assumes it does but I would like to hear that you tested it.

You can indeed take a new glibc, and a new kernel, and old programs
that previously failed to compile will now work. The ABI is maintained
and the headers coordinate.

I did not test this explicitly except through the small test case
I wrote which permutes inclusion order and the use of various
structures defined in the headers.

The only quibble one could have is with Linux. In that if you 
include the Linux headers first you will get more definitions than
required by POSIX e.g. s6_addr16 and s6_add32. However as I note
in the comment this is not a violation of POSIX since POSIX says 
"at least the following member" and that holds true.
 
> The patch itself looks fine, thanks,

Thanks for reviewing.

If the kernel patches get accepted I will check these into
glibc 2.19 for Cong.

Cheers,
Carlos.

  reply	other threads:[~2013-08-16 15:44 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 [this message]
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

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=520E48E3.6080703@redhat.com \
    --to=carlos@redhat.com \
    --cc=aj@suse.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).