lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080521100443.GA7976@uranus.ravnborg.org>
Date:	Wed, 21 May 2008 12:04:43 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Patrick McHardy <kaber@...sh.net>
Cc:	David Miller <davem@...emloft.net>, greg@...t.cx,
	linux-kernel@...r.kernel.org, netfilter-devel@...r.kernel.org
Subject: Re: include/linux/netfilter.h after make headers_install is incomplete

On Wed, May 21, 2008 at 11:56:55AM +0200, Patrick McHardy wrote:
> David Miller wrote:
> >From: "Greg Steuck" <greg@...t.cx>
> >Date: Tue, 20 May 2008 11:44:56 -0700
> >
> >>I ran make headers_install in 2.6.25 tree and the installed netfilter.h is
> >>not complete. Namely, it declares
> >>union nf_inet_addr {
> >>      __u32           all[4];
> >>      __be32          ip;
> >>      __be32          ip6[4];
> >>...
> >>}
> >>
> >>The __u32, __be32 types are declared in <linux/types.h> and the #include
> >>directive is removed by the installation process. This in turn makes some
> >>applications unbuildable against such an exported tree, e.g.
> >>
> >>busybox-1.10.1/networking/tcpudp.c:#include <linux/netfilter_ipv4.h>
> >>
> >>If I correctly understand the purpose of make headers_install, it is
> >>supposed to generate an API for applications. I could certainly
> >>make tcpudp.c include linux/types.h, but given that the application
> >>does not even use nf_inet_addr, this would be the wrong place for
> >>the fix.
> 
> These types are used by countless header files. I don't know
> why types.h is stripped, I guess this question can be best
> answered by whoever maintains the header-install stuff (Sam?
> I don't know).

Everything inside
#ifdef __KERNEL__
...
#endif

are stripped.

>From netfilter.h:
#ifdef __KERNEL__
#include <linux/init.h>
#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/net.h>
#include <linux/netdevice.h>
#include <linux/if.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/wait.h>
#include <linux/list.h>
#include <net/net_namespace.h>
#endif

Include of types.h should be outside the #ifdef block.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ