netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Iproute2 build broken by current kernel headers
@ 2012-01-10 18:54 Stephen Hemminger
  2012-01-10 19:07 ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2012-01-10 18:54 UTC (permalink / raw)
  To: Pavel Emelyanov, David Miller; +Cc: netdev

The update to inet diag broke compatibility with exported headers.
Iproute2 uses sanitized kernel headers.

gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\"   -c -o ss.o ss.c
ss.c: In function ‘tcp_show_netlink’:
ss.c:1504:7: error: ‘struct inet_diag_req’ has no member named ‘idiag_family’
make[1]: *** [ss.o] Error 1
make[1]: Leaving directory `/home/shemminger/src/iproute2/misc'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Iproute2 build broken by current kernel headers
  2012-01-10 18:54 Iproute2 build broken by current kernel headers Stephen Hemminger
@ 2012-01-10 19:07 ` Stephen Hemminger
  2012-01-11  6:34   ` Pavel Emelyanov
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2012-01-10 19:07 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Pavel Emelyanov, David Miller, netdev

On Tue, 10 Jan 2012 10:54:09 -0800
Stephen Hemminger <shemminger@vyatta.com> wrote:

> The update to inet diag broke compatibility with exported headers.
> Iproute2 uses sanitized kernel headers.
> 
> gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\"   -c -o ss.o ss.c
> ss.c: In function ‘tcp_show_netlink’:
> ss.c:1504:7: error: ‘struct inet_diag_req’ has no member named ‘idiag_family’
> make[1]: *** [ss.o] Error 1

The structures need to be swapped to maintain source compatibility.
inet_diag_req_compat needs to be renamed back to inet_diag_req
inet_diag_req should be named something like inet_diag_req_generic

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Iproute2 build broken by current kernel headers
  2012-01-10 19:07 ` Stephen Hemminger
@ 2012-01-11  6:34   ` Pavel Emelyanov
  2012-01-11  6:39     ` David Miller
  2012-01-11 18:24     ` Stephen Hemminger
  0 siblings, 2 replies; 8+ messages in thread
From: Pavel Emelyanov @ 2012-01-11  6:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev@vger.kernel.org

On 01/10/2012 11:07 PM, Stephen Hemminger wrote:
> On Tue, 10 Jan 2012 10:54:09 -0800
> Stephen Hemminger <shemminger@vyatta.com> wrote:
> 
>> The update to inet diag broke compatibility with exported headers.
>> Iproute2 uses sanitized kernel headers.
>>
>> gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\"   -c -o ss.o ss.c
>> ss.c: In function ‘tcp_show_netlink’:
>> ss.c:1504:7: error: ‘struct inet_diag_req’ has no member named ‘idiag_family’
>> make[1]: *** [ss.o] Error 1
> 
> The structures need to be swapped to maintain source compatibility.
> inet_diag_req_compat needs to be renamed back to inet_diag_req
> inet_diag_req should be named something like inet_diag_req_generic

Stephen, actually the diag modules were patched to be only binary compatible with the ss.
In order to make it compile with new headers I've sent the patches fixing ss, here they are:

http://www.spinics.net/lists/netdev/msg182467.html
http://www.spinics.net/lists/netdev/msg182858.html
http://lists.openwall.net/netdev/2011/12/15/45

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Iproute2 build broken by current kernel headers
  2012-01-11  6:34   ` Pavel Emelyanov
@ 2012-01-11  6:39     ` David Miller
  2012-01-11  6:58       ` Pavel Emelyanov
  2012-01-11 18:24     ` Stephen Hemminger
  1 sibling, 1 reply; 8+ messages in thread
From: David Miller @ 2012-01-11  6:39 UTC (permalink / raw)
  To: xemul; +Cc: shemminger, netdev

From: Pavel Emelyanov <xemul@parallels.com>
Date: Wed, 11 Jan 2012 10:34:48 +0400

> On 01/10/2012 11:07 PM, Stephen Hemminger wrote:
>> On Tue, 10 Jan 2012 10:54:09 -0800
>> Stephen Hemminger <shemminger@vyatta.com> wrote:
>> 
>>> The update to inet diag broke compatibility with exported headers.
>>> Iproute2 uses sanitized kernel headers.
>>>
>>> gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\"   -c -o ss.o ss.c
>>> ss.c: In function ‘tcp_show_netlink’:
>>> ss.c:1504:7: error: ‘struct inet_diag_req’ has no member named ‘idiag_family’
>>> make[1]: *** [ss.o] Error 1
>> 
>> The structures need to be swapped to maintain source compatibility.
>> inet_diag_req_compat needs to be renamed back to inet_diag_req
>> inet_diag_req should be named something like inet_diag_req_generic
> 
> Stephen, actually the diag modules were patched to be only binary compatible with the ss.
> In order to make it compile with new headers I've sent the patches fixing ss, here they are:
> 
> http://www.spinics.net/lists/netdev/msg182467.html
> http://www.spinics.net/lists/netdev/msg182858.html
> http://lists.openwall.net/netdev/2011/12/15/45

You can't do this Pavel, what about other userspace programs which
might have been compiled against these headers?  Any data structure
exported to userspace is FIXED, can't you understand this?

You've very much handled backwards compatability terribly in these pathces,
I should have forced you let them cook for another full release cycle.
:-/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Iproute2 build broken by current kernel headers
  2012-01-11  6:39     ` David Miller
@ 2012-01-11  6:58       ` Pavel Emelyanov
  2012-01-11  7:03         ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Pavel Emelyanov @ 2012-01-11  6:58 UTC (permalink / raw)
  To: David Miller; +Cc: shemminger@vyatta.com, netdev@vger.kernel.org

On 01/11/2012 10:39 AM, David Miller wrote:
> From: Pavel Emelyanov <xemul@parallels.com>
> Date: Wed, 11 Jan 2012 10:34:48 +0400
> 
>> On 01/10/2012 11:07 PM, Stephen Hemminger wrote:
>>> On Tue, 10 Jan 2012 10:54:09 -0800
>>> Stephen Hemminger <shemminger@vyatta.com> wrote:
>>>
>>>> The update to inet diag broke compatibility with exported headers.
>>>> Iproute2 uses sanitized kernel headers.
>>>>
>>>> gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\"   -c -o ss.o ss.c
>>>> ss.c: In function ‘tcp_show_netlink’:
>>>> ss.c:1504:7: error: ‘struct inet_diag_req’ has no member named ‘idiag_family’
>>>> make[1]: *** [ss.o] Error 1
>>>
>>> The structures need to be swapped to maintain source compatibility.
>>> inet_diag_req_compat needs to be renamed back to inet_diag_req
>>> inet_diag_req should be named something like inet_diag_req_generic
>>
>> Stephen, actually the diag modules were patched to be only binary compatible with the ss.
>> In order to make it compile with new headers I've sent the patches fixing ss, here they are:
>>
>> http://www.spinics.net/lists/netdev/msg182467.html
>> http://www.spinics.net/lists/netdev/msg182858.html
>> http://lists.openwall.net/netdev/2011/12/15/45
> 
> You can't do this Pavel, what about other userspace programs which
> might have been compiled against these headers? Any data structure
> exported to userspace is FIXED, can't you understand this?

I do understand :( But the same was done by acme@ when he generalized tcp_diag
to support dccp sockets -- he just renamed the tcp_diag_* into the inet_diag_* 
thus preserving only the binary compatibility.

> You've very much handled backwards compatability terribly in these pathces,
> I should have forced you let them cook for another full release cycle.
> :-/

Do I have 24 hours for fixing this? If I don't then just revert the whole
set, I will start this again after the current merge window closes.

Thanks,
Pavel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Iproute2 build broken by current kernel headers
  2012-01-11  6:58       ` Pavel Emelyanov
@ 2012-01-11  7:03         ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2012-01-11  7:03 UTC (permalink / raw)
  To: xemul; +Cc: shemminger, netdev

From: Pavel Emelyanov <xemul@parallels.com>
Date: Wed, 11 Jan 2012 10:58:51 +0400

> On 01/11/2012 10:39 AM, David Miller wrote:
>> You've very much handled backwards compatability terribly in these pathces,
>> I should have forced you let them cook for another full release cycle.
>> :-/
> 
> Do I have 24 hours for fixing this?

You do.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Iproute2 build broken by current kernel headers
  2012-01-11  6:34   ` Pavel Emelyanov
  2012-01-11  6:39     ` David Miller
@ 2012-01-11 18:24     ` Stephen Hemminger
  2012-01-11 18:27       ` Pavel Emelyanov
  1 sibling, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2012-01-11 18:24 UTC (permalink / raw)
  To: Pavel Emelyanov; +Cc: David Miller, netdev@vger.kernel.org

On Wed, 11 Jan 2012 10:34:48 +0400
Pavel Emelyanov <xemul@parallels.com> wrote:

> On 01/10/2012 11:07 PM, Stephen Hemminger wrote:
> > On Tue, 10 Jan 2012 10:54:09 -0800
> > Stephen Hemminger <shemminger@vyatta.com> wrote:
> > 
> >> The update to inet diag broke compatibility with exported headers.
> >> Iproute2 uses sanitized kernel headers.
> >>
> >> gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\"   -c -o ss.o ss.c
> >> ss.c: In function ‘tcp_show_netlink’:
> >> ss.c:1504:7: error: ‘struct inet_diag_req’ has no member named ‘idiag_family’
> >> make[1]: *** [ss.o] Error 1
> > 
> > The structures need to be swapped to maintain source compatibility.
> > inet_diag_req_compat needs to be renamed back to inet_diag_req
> > inet_diag_req should be named something like inet_diag_req_generic
> 
> Stephen, actually the diag modules were patched to be only binary compatible with the ss.
> In order to make it compile with new headers I've sent the patches fixing ss, here they are:
> 
> http://www.spinics.net/lists/netdev/msg182467.html
> http://www.spinics.net/lists/netdev/msg182858.html
> http://lists.openwall.net/netdev/2011/12/15/45

These patches will have to be redone to work with the revised include
files. The iproute2 changes are not acceptable as is because they do not support
older kernels.

It is critical that the resulting code work on both old and new
kernels. In other words, when the new ss command is built (using your
patches and 3.3 headers), it:
 * SHOULD send new diag requests to kernel and be able to display
   the new UNIX domain info
 * MUST still work when run against old 3.2 kernel.

This means the code should send new request first, and if that generates
an error fallback (silently) to the old message format.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Iproute2 build broken by current kernel headers
  2012-01-11 18:24     ` Stephen Hemminger
@ 2012-01-11 18:27       ` Pavel Emelyanov
  0 siblings, 0 replies; 8+ messages in thread
From: Pavel Emelyanov @ 2012-01-11 18:27 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev@vger.kernel.org

> These patches will have to be redone to work with the revised include
> files. The iproute2 changes are not acceptable as is because they do not support
> older kernels.
> 
> It is critical that the resulting code work on both old and new
> kernels. In other words, when the new ss command is built (using your
> patches and 3.3 headers), it:
>  * SHOULD send new diag requests to kernel and be able to display
>    the new UNIX domain info
>  * MUST still work when run against old 3.2 kernel.
> 
> This means the code should send new request first, and if that generates
> an error fallback (silently) to the old message format.

OK, I will rework the patches in this way.

Thanks,
Pavel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-11 18:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 18:54 Iproute2 build broken by current kernel headers Stephen Hemminger
2012-01-10 19:07 ` Stephen Hemminger
2012-01-11  6:34   ` Pavel Emelyanov
2012-01-11  6:39     ` David Miller
2012-01-11  6:58       ` Pavel Emelyanov
2012-01-11  7:03         ` David Miller
2012-01-11 18:24     ` Stephen Hemminger
2012-01-11 18:27       ` Pavel Emelyanov

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).