Skip to contentSkip to conversation

/usr/src/linux/Documentation/networking/ifenslave.c

PATCH Mads Martin Jørgensen 3 participants 8 messages Jul 16, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

$SUBJECT is a userspace tool, but includes kernel headers. This small obvious patch against 2.6.0-test1 should fix it.

ifenslave.c +1 -2
@@ -97,8 +97,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <linux/if.h>
-#include <linux/if_arp.h>
+#include <net/if_arp.h>
 #include <linux/if_ether.h>
 #include <linux/if_bonding.h>
 #include <linux/sockios.h>
Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#1 lore raw
Quoted 2 lines · On Wed, 16 Jul 2003 11:23:54 +0200 Mads Martin Jørgensen <[email protected]> wrote:

$SUBJECT is a userspace tool, but includes kernel headers. This small obvious patch against 2.6.0-test1 should fix it.

This patch is absolutely senseless, you eliminate two such includes

ifenslave.c line 100

Quoted 3 lines
ifenslave.c +1 -2
-#include <linux/if.h>
-#include <linux/if_arp.h>
+#include <net/if_arp.h>

but three more still remain.

Quoted 3 lines

#include <linux/if_ether.h>
#include <linux/if_bonding.h>
#include <linux/sockios.h>

This whole anti-kernel-headers-in-userspace thing is a total shamans dance and not founded in reality.

Quick, answer this as fast as you can, where in the glibc headers can you get at the PFKEY and XFRM_NETLINK interface definitions to configure IPSEC stuff in the kernel?

BZZT, time is up, and I know you have no answer :-)

That is why all of this is rediculious.

#2 lore raw
Quoted 2 lines · David S. Miller

This whole anti-kernel-headers-in-userspace thing is a total shamans dance and not founded in reality.

Urgs.

Quoted 5 lines

Quick, answer this as fast as you can, where in the glibc headers can you get at the PFKEY and XFRM_NETLINK interface definitions to configure IPSEC stuff in the kernel?

BZZT, time is up, and I know you have no answer :-)

:-)

Quoted 1 line

That is why all of this is rediculious.

Problem is some of these includes are different on different archs, and causes the thing to miscompile. How to fix that then?

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#3 lore raw
Quoted 4 lines · On Wed, 16 Jul 2003 14:59:10 +0200 Mads Martin Jørgensen <[email protected]> wrote:
Quoted 1 line

That is why all of this is rediculious.

Problem is some of these includes are different on different archs, and causes the thing to miscompile. How to fix that then?

Nothing arch specific resides in linux/if.h :-)

This means the problem eminates from asm/*.h headers which is where the fixes belong.

What exactly is the error you get on ia64?

#4 lore raw
Quoted 9 lines · David S. Miller
Quoted 4 lines
Quoted 1 line

That is why all of this is rediculious.

Problem is some of these includes are different on different archs, and causes the thing to miscompile. How to fix that then?

Nothing arch specific resides in linux/if.h :-)

This means the problem eminates from asm/*.h headers which is where the fixes belong.

Yes. What fix, would you propose?

Quoted 1 line

What exactly is the error you get on ia64?

a bunch of compile errors like the following:

In file included from /usr/src/linux/include/asm/system.h:19,

                 from /usr/src/linux/include/asm/atomic.h:17,
                 from /usr/src/linux/include/linux/netdevice.h:32,
                 from /usr/src/linux/include/linux/if_arp.h:26,
                 from ifenslave.c:91:

/usr/src/linux/include/asm/pal.h:89: parse error before "pal_status_t" /usr/src/linux/include/asm/pal.h:89: warning: type defaults to int' in declaration of pal_status_t' /usr/src/linux/include/asm/pal.h:89: warning: data definition has no type or storage class
/usr/src/linux/include/asm/pal.h:102: parse error before "pal_cache_level_t"
/usr/src/linux/include/asm/pal.h:102: warning: type defaults to `int' in

declaration of `pal_cache_level_t' /usr/src/linux/include/asm/pal.h:102: warning: data definition has no type or
storage class
/usr/src/linux/include/asm/pal.h:110: parse error before "pal_cache_type_t"
/usr/src/linux/include/asm/pal.h:110: warning: type defaults to int' in declaration of pal_cache_type_t' /usr/src/linux/include/asm/pal.h:110: warning: data definition has no type or storage class
/usr/src/linux/include/asm/pal.h:123: parse error before "pal_cache_line_state_t

etc.

thanks,

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#5 lore raw
Quoted 7 lines · On Wed, 16 Jul 2003 15:35:14 +0200 Mads Martin Jørgensen <[email protected]> wrote:

* David S. Miller <[email protected]> [Jul 16. 2003 15:21]:
In file included from /usr/src/linux/include/asm/system.h:19,

                 from /usr/src/linux/include/asm/atomic.h:17,
                 from /usr/src/linux/include/linux/netdevice.h:32,
                 from /usr/src/linux/include/linux/if_arp.h:26,
                 from ifenslave.c:91:

/usr/src/linux/include/asm/pal.h:89: parse error before "pal_status_t"

IA64 needs it's __KERNEL__ ifdefs fixed up, nothing more.

Thanks for finding the right place to fix this problem :-)

#6 lore raw
In reply to David S. Miller
Quoted 2 lines · David S. Miller

This whole anti-kernel-headers-in-userspace thing is a total shamans dance and not founded in reality.

There ARE definitions that differ between kernel and userspace.

Thinking they are the same is not founded in reality.

And thinking that all of userspace is instantly recompiled against against the latest kernel headers isn't founded in reality, either.

Jeff

#7 lore raw
Quoted 1 line · On Wed, 16 Jul 2003 10:12:06 -0400 Jeff Garzik <[email protected]> wrote:

There ARE definitions that differ between kernel and userspace.

Sure, but none of the one's were talking about here.

Quoted 1 line

Thinking they are the same is not founded in reality.

I'm not.

Quoted 2 lines

And thinking that all of userspace is instantly recompiled against against the latest kernel headers isn't founded in reality, either.

GLIBC is munging netlink messages on the way out via sendmsg()? That'd be news to me. :-)