From: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
To: Stephen Hemminger <shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
libc-help-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org,
"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Kernel uapi and glibc header conflicts (was Re: header conflict introduced by change to netfilter_ipv4/ip_tables.h )
Date: Sun, 7 Feb 2016 13:31:11 +0200 [thread overview]
Message-ID: <20160207113111.GE6104@lakka.kapsi.fi> (raw)
In-Reply-To: <20160107103040.649ab878@xeon-e3>
On Thu, Jan 07, 2016 at 10:30:40AM -0800, Stephen Hemminger wrote:
> On Thu, 7 Jan 2016 07:29:50 +0000
> Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org> wrote:
>
> > On Wed, Jan 06, 2016 at 09:20:07AM -0800, Stephen Hemminger wrote:
> > > This commit breaks compilation of iproute2 with net-next.
> >
> > Ok, linux/if.h and libc net/if.h have overlapping defines, and this is not
> > the only one. I saw lots of them in the core dump headers.
> >
> > How should we handle them? Another ifndef for IFNAMSIZ into kernel uapi
> > headers?
> >
> > -Mikko
>
> Probably need to do the same thing that was done previously for these
> kind of conflicts. This makes make linux/if.h change to adapt to net/if.h
> being included before it.
So uapi headers now have a libc-compat.h
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/libc-compat.h?id=refs/tags/v4.5-rc2
which tries to detect and fix incompatibilities between Linux kernel and glibc
headers. Part of the fix is then in the kernel side headers and another part
should be in glibc headers, but glibc git repo does not include any of these
fixes yet.
Has the glibc part of this incompatiblity mess been discussed and agreed
with glibc developers?
Many of the conflics arise from propably old glibc headers which had copied
out definitions from the Linux kernel side before it could export any headers
to userspace. I assume that the glibc headers are not allowed to depend and
include Linux kernel uapi headers in deployments but maybe the Linux kernel
headers could be used at glibc compile time to generate needed glibc side
definitions. That would allow having a single source for definitions like
FNAMSIZ 16.
Has this been considered before?
I'm drafting a test, similar to the kernel uapi header compile test
https://github.com/mcfrisk/linux/blob/headers_test_v05/scripts/headers_compile_test.sh
for the glibc conflicts too, and of course noticed that also glibc headers
conflict with each other. With some workarounds I can test compile each kernel
uapi header against all compiling glibc headers and see the conflicts as
build failures.
-Mikko
next prev parent reply other threads:[~2016-02-07 11:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 17:20 header conflict introduced by change to netfilter_ipv4/ip_tables.h Stephen Hemminger
2016-01-07 7:29 ` Mikko Rapeli
[not found] ` <88a455d4b6dc4d4398553e6529d7b94a@HQ1WP-EXMB11.corp.brocade.com>
2016-01-07 18:30 ` Stephen Hemminger
2016-01-07 19:15 ` Mikko Rapeli
2016-02-04 7:13 ` Josh Boyer
[not found] ` <CA+5PVA4P2avVr+m=ittQUyBou9kT2nbK0-Jeo+3coAFyQXTT_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-07 14:03 ` [PATCH] uapi glibc compat: fix cases where glibc net/if.h is included before linux/if.h Mikko Rapeli
[not found] ` <1454853801-18064-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2016-02-17 15:46 ` David Miller
[not found] ` <20160217.104620.239734387234680136.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2016-02-26 7:25 ` Mikko Rapeli
2016-02-26 16:28 ` David Miller
2016-02-25 20:53 ` header conflict introduced by change to netfilter_ipv4/ip_tables.h Daniel Borkmann
2016-02-26 7:13 ` Mikko Rapeli
2016-02-07 11:31 ` Mikko Rapeli [this message]
2016-02-08 13:59 ` Kernel uapi and glibc header conflicts (was Re: header conflict introduced by change to netfilter_ipv4/ip_tables.h ) Florian Weimer
2016-02-25 21:08 ` header conflict introduced by change to netfilter_ipv4/ip_tables.h Thomas Graf
2016-02-26 7:18 ` Mikko Rapeli
2016-02-26 9:13 ` Thomas Graf
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=20160207113111.GE6104@lakka.kapsi.fi \
--to=mikko.rapeli-x3b1voxeql0@public.gmane.org \
--cc=libc-help-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.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).