linux-libc-headers: if_tunnel: remove include of if/ip/in6.h

Message ID CAMKF1soOP+440ZhymX8wFHu-Et=77NhscQqm4M8T2i=wQhmGNg@mail.gmail.com
State New
Headers show

Commit Message

Khem Raj Oct. 3, 2016, 7:55 p.m.
What Repercussion does this have wrt APIs headers for future. Provided this
is a local patch. I think removing header includes like this can cause
issues.

On Oct 3, 2016 9:55 AM, "Bruce Ashfield" <bruce.ashfield@windriver.com>
wrote:

commit 1fe8e0f074c [include/uapi/linux/if_tunnel.h: include linux/if.h,
linux/ip.h and linux/in6.h]
breaks the builds of net-tools.

We remove the new includes until such a time that userspace can adapt to the
new kernel headers.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>

---
 ...1-if_tunnel-remove-include-of-if-ip-in6.h.patch | 33
++++++++++++++++++++++
 .../linux-libc-headers/linux-libc-headers_4.8.bb   |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-
headers/0001-if_tunnel-remove-include-of-if-ip-in6.h.patch

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-
headers/0001-if_tunnel-remove-include-of-if-ip-in6.h.patch
b/meta/recipes-kernel/linux-libc-headers/linux-libc-
headers/0001-if_tunnel-remove-include-of-if-ip-in6.h.patch
new file mode 100644
index 000000000000..f2011880dccb
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-
headers/0001-if_tunnel-remove-include-of-if-ip-in6.h.patch
@@ -0,0 +1,33 @@
+From 017ae5929312685c4c044765445bfd4d2a4abb5c Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Mon, 3 Oct 2016 12:27:57 -0400
+Subject: [PATCH] if_tunnel: remove include of if/ip/in6.h
+
+commit 1fe8e0f074c [include/uapi/linux/if_tunnel.h: include linux/if.h,
linux/ip.h and linux/in6.h]
+breaks the builds of net-tools.
+
+We remove the new includes until such a time that userspace can adapt to
the
+new kernel headers.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ include/uapi/linux/if_tunnel.h | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_
tunnel.h
+index 777b6cd..1046f55 100644
+--- a/include/uapi/linux/if_tunnel.h
++++ b/include/uapi/linux/if_tunnel.h
+@@ -2,9 +2,6 @@
+ #define _UAPI_IF_TUNNEL_H_
+
+ #include <linux/types.h>
+-#include <linux/if.h>
+-#include <linux/ip.h>
+-#include <linux/in6.h>
+ #include <asm/byteorder.h>
+
+
+--
+2.7.4
+
--
2.5.0

--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Bruce Ashfield Oct. 4, 2016, 12:27 a.m. | #1
On Mon, Oct 3, 2016 at 3:55 PM, Khem Raj <raj.khem@gmail.com> wrote:

> What Repercussion does this have wrt APIs headers for future. Provided

> this is a local patch. I think removing header includes like this can cause

> issues.

>



It's something we could drop in the future, but these are mods that have
been done since -rc4, and could very well be undone if they start breaking
things like this.

The alternative is to try and fix the userspace applications, but I
currently don't see a fast way to do that (and I'm now officially on
vacation).

Cheers,

Bruce


>

> On Oct 3, 2016 9:55 AM, "Bruce Ashfield" <bruce.ashfield@windriver.com>

> wrote:

>

> commit 1fe8e0f074c [include/uapi/linux/if_tunnel.h: include linux/if.h,

> linux/ip.h and linux/in6.h]

> breaks the builds of net-tools.

>

> We remove the new includes until such a time that userspace can adapt to

> the

> new kernel headers.

>

> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>

> ---

>  ...1-if_tunnel-remove-include-of-if-ip-in6.h.patch | 33

> ++++++++++++++++++++++

>  .../linux-libc-headers/linux-libc-headers_4.8.bb   |  1 +

>  2 files changed, 34 insertions(+)

>  create mode 100644 meta/recipes-kernel/linux-libc

> -headers/linux-libc-headers/0001-if_tunnel-remove-include-

> of-if-ip-in6.h.patch

>

> diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/

> 0001-if_tunnel-remove-include-of-if-ip-in6.h.patch

> b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/

> 0001-if_tunnel-remove-include-of-if-ip-in6.h.patch

> new file mode 100644

> index 000000000000..f2011880dccb

> --- /dev/null

> +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/

> 0001-if_tunnel-remove-include-of-if-ip-in6.h.patch

> @@ -0,0 +1,33 @@

> +From 017ae5929312685c4c044765445bfd4d2a4abb5c Mon Sep 17 00:00:00 2001

> +From: Bruce Ashfield <bruce.ashfield@windriver.com>

> +Date: Mon, 3 Oct 2016 12:27:57 -0400

> +Subject: [PATCH] if_tunnel: remove include of if/ip/in6.h

> +

> +commit 1fe8e0f074c [include/uapi/linux/if_tunnel.h: include linux/if.h,

> linux/ip.h and linux/in6.h]

> +breaks the builds of net-tools.

> +

> +We remove the new includes until such a time that userspace can adapt to

> the

> +new kernel headers.

> +

> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>

> +---

> + include/uapi/linux/if_tunnel.h | 3 ---

> + 1 file changed, 3 deletions(-)

> +

> +diff --git a/include/uapi/linux/if_tunnel.h

> b/include/uapi/linux/if_tunnel.h

> +index 777b6cd..1046f55 100644

> +--- a/include/uapi/linux/if_tunnel.h

> ++++ b/include/uapi/linux/if_tunnel.h

> +@@ -2,9 +2,6 @@

> + #define _UAPI_IF_TUNNEL_H_

> +

> + #include <linux/types.h>

> +-#include <linux/if.h>

> +-#include <linux/ip.h>

> +-#include <linux/in6.h>

> + #include <asm/byteorder.h>

> +

> +

> +--

> +2.7.4

> +

> diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_

> 4.8.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb

> index 778f0b6e6443..ee2d8293450e 100644

> --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb

> +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb

> @@ -10,6 +10,7 @@ SRC_URI_append_libc-musl = "\

>

>  SRC_URI_append = "\

>      file://0001-ppp-fix-in-if.h-includes.patch \

> +    file://0001-if_tunnel-remove-include-of-if-ip-in6.h.patch \

>      "

>

>  SRC_URI[md5sum] = "c1af0afbd3df35c1ccdc7a5118cd2d07"

> --

> 2.5.0

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>

>

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>

>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Oct. 12, 2016, 9:27 p.m. | #2
On Oct 12, 2016 10:21 PM, "Randy MacLeod" <randy.macleod@windriver.com>
wrote:
>

> On 2016-10-08 09:17 PM, Huang, Jie (Jackie) wrote:

>>

>>

>>

>>> -----Original Message-----

>>> From: MacLeod, Randy

>>> Sent: Friday, October 07, 2016 4:54 AM

>>> To: Bruce Ashfield; Khem Raj; Huang, Jie (Jackie)

>>> Cc: Patches and discussions about the oe-core layer

>>> Subject: Re: [OE-core] [PATCH] linux-libc-headers: if_tunnel: remove

include of if/ip/in6.h
>>>

>>> On 2016-10-03 08:27 PM, Bruce Ashfield wrote:

>>>>

>>>>

>>>> It's something we could drop in the future, but these are mods that

have
>>>> been done since -rc4, and could very well be undone if they start

>>>> breaking things like this.

>>>>

>>>> The alternative is to try and fix the userspace applications, but I

>>>> currently don't see a fast way to do that (and I'm now officially on

>>>> vacation).

>>>>

>>>

>>> I've sent a fix to the net-tools list:

>>>

>>>

https://sourceforge.net/p/net-tools/mailman/net-tools-devel/?viewmonth=201610
>>>

>>> Jackie will be back at work on Saturday and he'll revert

>>> Bruce's change, test all qemu builds and boot an image

>>> to test iptunnel before sending a patch to the list.

>>

>>

>> I just sent patches for this to the list.

>>

>> Thanks,

>> Jackie

>

>

>

> Jackie,

>

> Thanks for fixing the net-tools bug. A fedora dev acked the patch

> on the SF list so hopefully it will be integrated upstream.

>

> Bruce, Khem

>

> What, if anything, should we do about the other yocto specific changes to

linux-libc-headers:
>

> $ ls -1 meta/recipes-kernel/linux-libc-headers/linux-libc-headers

> 0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch

> 0001-ppp-fix-in-if.h-includes.patch

> 0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch

> 0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch

>

> It seems like some of the patches (ppp) could be addressed and

> dropped and that we should do that before releasing oe-core-2.2

> or wait for 2.3.

>


Imo if we can fix apps that should be first choice. Second choice would be
run remaining patches by lkml or atleast report the problem. Real lesson is
to not wait for kernel version updates so late in release cycle.

> ../Randy

>

>

> $ git log

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
>

>

> commit 12451a412fb7b5706c1553618ee7b704234876cc

> Author: Bruce Ashfield <bruce.ashfield@windriver.com>

> Date:   Mon Oct 3 01:54:36 2016 -0400

>

>     linux-libc-headers: fix in/if.h includes

>

>     The following kernel commits broke the compilation of ppp, due to

redefined
>     structures.

>

>     Nothing else breaks in userspace with or without these uapi changes,

so we
>     revert them to keep everything building.

>

>        commit 05ee5de7451796cf9a8aeb2f05a57790d4fd2336

>        Author: Mikko Rapeli <mikko.rapeli@iki.fi>

>        Date:   Mon Aug 22 20:32:42 2016 +0200

>

>            include/uapi/linux/if_pppol2tp.h: include linux/in.h and

linux/in6.h
>

>            Fixes userspace compilation errors like:

>

>            error: field <E2><80><98>addr<E2><80><99> has incomplete type

>             struct sockaddr_in addr; /* IP address and port to send to */

>                                ^

>            error: field <E2><80><98>addr<E2><80><99> has incomplete type

>             struct sockaddr_in6 addr; /* IP address and port to send to */

>

>            Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

>            Signed-off-by: David S. Miller <davem@davemloft.net>

>

>

>

>

>

>>

>>>

>>> In oe-core-2.3, we should probably drop net-tools completely or

>>> at least from packagegroup-core-full-cmdline.bb since iproute2

>>> replaces it:

>>>    http://xmodulo.com/linux-tcpip-networking-net-tools-iproute2.html

>>>

>>> ( and I'm now officially on vacation for a few days. :) )

>>>

>>>

>>> --

>>> # Randy MacLeod. SMTS, Linux, Wind River

>>> Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON,

>>> Canada, K2K 2W5

>>

>>

>

>

> --

> # Randy MacLeod. SMTS, Linux, Wind River

> Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON,

Canada, K2K 2W5
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Bruce Ashfield Oct. 12, 2016, 9:42 p.m. | #3
On Wed, Oct 12, 2016 at 4:21 PM, Randy MacLeod <randy.macleod@windriver.com>
wrote:

> On 2016-10-08 09:17 PM, Huang, Jie (Jackie) wrote:

>

>>

>>

>> -----Original Message-----

>>> From: MacLeod, Randy

>>> Sent: Friday, October 07, 2016 4:54 AM

>>> To: Bruce Ashfield; Khem Raj; Huang, Jie (Jackie)

>>> Cc: Patches and discussions about the oe-core layer

>>> Subject: Re: [OE-core] [PATCH] linux-libc-headers: if_tunnel: remove

>>> include of if/ip/in6.h

>>>

>>> On 2016-10-03 08:27 PM, Bruce Ashfield wrote:

>>>

>>>>

>>>> It's something we could drop in the future, but these are mods that have

>>>> been done since -rc4, and could very well be undone if they start

>>>> breaking things like this.

>>>>

>>>> The alternative is to try and fix the userspace applications, but I

>>>> currently don't see a fast way to do that (and I'm now officially on

>>>> vacation).

>>>>

>>>>

>>> I've sent a fix to the net-tools list:

>>>

>>> https://sourceforge.net/p/net-tools/mailman/net-tools-devel/

>>> ?viewmonth=201610

>>>

>>> Jackie will be back at work on Saturday and he'll revert

>>> Bruce's change, test all qemu builds and boot an image

>>> to test iptunnel before sending a patch to the list.

>>>

>>

>> I just sent patches for this to the list.

>>

>> Thanks,

>> Jackie

>>

>

>

> Jackie,

>

> Thanks for fixing the net-tools bug. A fedora dev acked the patch

> on the SF list so hopefully it will be integrated upstream.

>

> Bruce, Khem

>

> What, if anything, should we do about the other yocto specific changes to

> linux-libc-headers:

>

>

Feel free to fix ppp in a similar way to the other change. It is likely a
header inclusion
order change.

I'm just doing the kernel header changes, I can't always detangle the user
space issues,
that's where others need to step in and help.

There's no issue in carrying it, since it isn't like we are developing
software that will
be incompatible through the change, or that will have ABI issues.

Bruce


> $ ls -1 meta/recipes-kernel/linux-libc-headers/linux-libc-headers

> 0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch

> 0001-ppp-fix-in-if.h-includes.patch

> 0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch

> 0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch

>

> It seems like some of the patches (ppp) could be addressed and

> dropped and that we should do that before releasing oe-core-2.2

> or wait for 2.3.

>

> ../Randy

>

>

> $ git log meta/recipes-kernel/linux-libc-headers/linux-libc-headers/

> 0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch

>

>

> commit 12451a412fb7b5706c1553618ee7b704234876cc

> Author: Bruce Ashfield <bruce.ashfield@windriver.com>

> Date:   Mon Oct 3 01:54:36 2016 -0400

>

>     linux-libc-headers: fix in/if.h includes

>

>     The following kernel commits broke the compilation of ppp, due to

> redefined

>     structures.

>

>     Nothing else breaks in userspace with or without these uapi changes,

> so we

>     revert them to keep everything building.

>

>        commit 05ee5de7451796cf9a8aeb2f05a57790d4fd2336

>        Author: Mikko Rapeli <mikko.rapeli@iki.fi>

>        Date:   Mon Aug 22 20:32:42 2016 +0200

>

>            include/uapi/linux/if_pppol2tp.h: include linux/in.h and

> linux/in6.h

>

>            Fixes userspace compilation errors like:

>

>            error: field <E2><80><98>addr<E2><80><99> has incomplete type

>             struct sockaddr_in addr; /* IP address and port to send to */

>                                ^

>            error: field <E2><80><98>addr<E2><80><99> has incomplete type

>             struct sockaddr_in6 addr; /* IP address and port to send to */

>

>            Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

>            Signed-off-by: David S. Miller <davem@davemloft.net>

>

>

>

>

>

>

>>

>>> In oe-core-2.3, we should probably drop net-tools completely or

>>> at least from packagegroup-core-full-cmdline.bb since iproute2

>>> replaces it:

>>>    http://xmodulo.com/linux-tcpip-networking-net-tools-iproute2.html

>>>

>>> ( and I'm now officially on vacation for a few days. :) )

>>>

>>>

>>> --

>>> # Randy MacLeod. SMTS, Linux, Wind River

>>> Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON,

>>> Canada, K2K 2W5

>>>

>>

>>

>

> --

> # Randy MacLeod. SMTS, Linux, Wind River

> Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON,

> Canada, K2K 2W5

>




-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-
headers_4.8.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-
headers_4.8.bb
index 778f0b6e6443..ee2d8293450e 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
@@ -10,6 +10,7 @@  SRC_URI_append_libc-musl = "\

 SRC_URI_append = "\
     file://0001-ppp-fix-in-if.h-includes.patch \
+    file://0001-if_tunnel-remove-include-of-if-ip-in6.h.patch \
     "

 SRC_URI[md5sum] = "c1af0afbd3df35c1ccdc7a5118cd2d07"