public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] headers_check fix: linux/netfilter/xt_osf.h
@ 2009-06-27 16:31 Jaswinder Singh Rajput
  2009-06-27 17:52 ` Evgeniy Polyakov
  2009-06-29 12:29 ` Patrick McHardy
  0 siblings, 2 replies; 6+ messages in thread
From: Jaswinder Singh Rajput @ 2009-06-27 16:31 UTC (permalink / raw)
  To: Patrick McHardy, Evgeniy Polyakov, Sam Ravnborg, David Miller,
	LKML


fix the following 'make headers_check' warnings:

  usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 include/linux/netfilter/xt_osf.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/netfilter/xt_osf.h b/include/linux/netfilter/xt_osf.h
index fd2272e..18afa49 100644
--- a/include/linux/netfilter/xt_osf.h
+++ b/include/linux/netfilter/xt_osf.h
@@ -20,6 +20,8 @@
 #ifndef _XT_OSF_H
 #define _XT_OSF_H
 
+#include <linux/types.h>
+
 #define MAXGENRELEN		32
 
 #define XT_OSF_GENRE		(1<<0)
-- 
1.6.0.6




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

* Re: [PATCH] headers_check fix: linux/netfilter/xt_osf.h
  2009-06-27 16:31 [PATCH] headers_check fix: linux/netfilter/xt_osf.h Jaswinder Singh Rajput
@ 2009-06-27 17:52 ` Evgeniy Polyakov
  2009-06-27 22:00   ` Sam Ravnborg
  2009-06-29 12:29 ` Patrick McHardy
  1 sibling, 1 reply; 6+ messages in thread
From: Evgeniy Polyakov @ 2009-06-27 17:52 UTC (permalink / raw)
  To: Jaswinder Singh Rajput; +Cc: Patrick McHardy, Sam Ravnborg, David Miller, LKML

Hi.

On Sat, Jun 27, 2009 at 10:01:04PM +0530, Jaswinder Singh Rajput (jaswinder@kernel.org) wrote:
> fix the following 'make headers_check' warnings:
> 
>   usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>
> 
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>

Looks good, thank you.
Patrick, please apply.

-- 
	Evgeniy Polyakov

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

* Re: [PATCH] headers_check fix: linux/netfilter/xt_osf.h
  2009-06-27 17:52 ` Evgeniy Polyakov
@ 2009-06-27 22:00   ` Sam Ravnborg
  2009-06-28  5:18     ` Jaswinder Singh Rajput
  2009-06-28  9:56     ` Evgeniy Polyakov
  0 siblings, 2 replies; 6+ messages in thread
From: Sam Ravnborg @ 2009-06-27 22:00 UTC (permalink / raw)
  To: Evgeniy Polyakov
  Cc: Jaswinder Singh Rajput, Patrick McHardy, David Miller, LKML

On Sat, Jun 27, 2009 at 09:52:09PM +0400, Evgeniy Polyakov wrote:
> Hi.
> 
> On Sat, Jun 27, 2009 at 10:01:04PM +0530, Jaswinder Singh Rajput (jaswinder@kernel.org) wrote:
> > fix the following 'make headers_check' warnings:
> > 
> >   usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>
> > 
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> 
> Looks good, thank you.
> Patrick, please apply.

What about the other potential issues in the same file?
struct xt_osf_opt {
        __u16                   kind, length;
        struct xt_osf_wc        wc;
};

Do we know that struct xt_osf_wc is always aligned at a two byte
address also on 64 bit?
Do we know that sizeof(struct xt_osf_opt) is the same
on all platforms?

struct xt_osf_user_finger {
        struct xt_osf_wc        wss;

        __u8                    ttl, df;
        __u16                   ss, mss;
        __u16                   opt_num;

        char                    genre[MAXGENRELEN];
        char                    version[MAXGENRELEN];
        char                    subtype[MAXGENRELEN];

        /* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */
        struct xt_osf_opt       opt[MAX_IPOPTLEN];
};

Do we know that opt[MAX_IPOPTLEN] always start at the same offset
with different architectures?

struct xt_osf_nlmsg {
        struct xt_osf_user_finger       f;
        struct iphdr            ip;
        struct tcphdr           tcp;
};

We do not knwo struct iphdr/tcphdr - missing include.
Do we know the alignment of the above structs?
Are they always the same on all archs?

	Sam

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

* Re: [PATCH] headers_check fix: linux/netfilter/xt_osf.h
  2009-06-27 22:00   ` Sam Ravnborg
@ 2009-06-28  5:18     ` Jaswinder Singh Rajput
  2009-06-28  9:56     ` Evgeniy Polyakov
  1 sibling, 0 replies; 6+ messages in thread
From: Jaswinder Singh Rajput @ 2009-06-28  5:18 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Evgeniy Polyakov, Patrick McHardy, David Miller, LKML

On Sun, 2009-06-28 at 00:00 +0200, Sam Ravnborg wrote:
> On Sat, Jun 27, 2009 at 09:52:09PM +0400, Evgeniy Polyakov wrote:
> > Hi.
> > 
> > On Sat, Jun 27, 2009 at 10:01:04PM +0530, Jaswinder Singh Rajput (jaswinder@kernel.org) wrote:
> > > fix the following 'make headers_check' warnings:
> > > 
> > >   usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>
> > > 
> > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > 
> > Looks good, thank you.
> > Patrick, please apply.
> 
> What about the other potential issues in the same file?
> struct xt_osf_opt {
>         __u16                   kind, length;
>         struct xt_osf_wc        wc;
> };
> 
> Do we know that struct xt_osf_wc is always aligned at a two byte
> address also on 64 bit?
> Do we know that sizeof(struct xt_osf_opt) is the same
> on all platforms?
> 
> struct xt_osf_user_finger {
>         struct xt_osf_wc        wss;
> 
>         __u8                    ttl, df;
>         __u16                   ss, mss;
>         __u16                   opt_num;
> 
>         char                    genre[MAXGENRELEN];
>         char                    version[MAXGENRELEN];
>         char                    subtype[MAXGENRELEN];
> 
>         /* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */
>         struct xt_osf_opt       opt[MAX_IPOPTLEN];
> };
> 
> Do we know that opt[MAX_IPOPTLEN] always start at the same offset
> with different architectures?
> 
> struct xt_osf_nlmsg {
>         struct xt_osf_user_finger       f;
>         struct iphdr            ip;
>         struct tcphdr           tcp;
> };
> 
> We do not knwo struct iphdr/tcphdr - missing include.
> Do we know the alignment of the above structs?
> Are they always the same on all archs?
> 

If you want to fix it, then send it in different patch.

Do not mix up things, Please.

--
JSR




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

* Re: [PATCH] headers_check fix: linux/netfilter/xt_osf.h
  2009-06-27 22:00   ` Sam Ravnborg
  2009-06-28  5:18     ` Jaswinder Singh Rajput
@ 2009-06-28  9:56     ` Evgeniy Polyakov
  1 sibling, 0 replies; 6+ messages in thread
From: Evgeniy Polyakov @ 2009-06-28  9:56 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Jaswinder Singh Rajput, Patrick McHardy, David Miller, LKML

On Sun, Jun 28, 2009 at 12:00:07AM +0200, Sam Ravnborg (sam@ravnborg.org) wrote:
> What about the other potential issues in the same file?
> struct xt_osf_opt {
>         __u16                   kind, length;
>         struct xt_osf_wc        wc;
> };
> 
> Do we know that struct xt_osf_wc is always aligned at a two byte
> address also on 64 bit?

Why 2 bytes? It is 4 bytes aligned everywhere everytime.

> Do we know that sizeof(struct xt_osf_opt) is the same
> on all platforms?

Yes.

> struct xt_osf_user_finger {
>         struct xt_osf_wc        wss;
> 
>         __u8                    ttl, df;
>         __u16                   ss, mss;
>         __u16                   opt_num;
> 
>         char                    genre[MAXGENRELEN];
>         char                    version[MAXGENRELEN];
>         char                    subtype[MAXGENRELEN];
> 
>         /* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */
>         struct xt_osf_opt       opt[MAX_IPOPTLEN];
> };
> 
> Do we know that opt[MAX_IPOPTLEN] always start at the same offset
> with different architectures?

Yes.

> struct xt_osf_nlmsg {
>         struct xt_osf_user_finger       f;
>         struct iphdr            ip;
>         struct tcphdr           tcp;
> };
> 
> We do not knwo struct iphdr/tcphdr - missing include.
> Do we know the alignment of the above structs?
> Are they always the same on all archs?

You won't believe...

-- 
	Evgeniy Polyakov

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

* Re: [PATCH] headers_check fix: linux/netfilter/xt_osf.h
  2009-06-27 16:31 [PATCH] headers_check fix: linux/netfilter/xt_osf.h Jaswinder Singh Rajput
  2009-06-27 17:52 ` Evgeniy Polyakov
@ 2009-06-29 12:29 ` Patrick McHardy
  1 sibling, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2009-06-29 12:29 UTC (permalink / raw)
  To: Jaswinder Singh Rajput; +Cc: Evgeniy Polyakov, Sam Ravnborg, David Miller, LKML

Jaswinder Singh Rajput wrote:
> fix the following 'make headers_check' warnings:
> 
>   usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>
> 

Applied, thanks.

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

end of thread, other threads:[~2009-06-29 12:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-27 16:31 [PATCH] headers_check fix: linux/netfilter/xt_osf.h Jaswinder Singh Rajput
2009-06-27 17:52 ` Evgeniy Polyakov
2009-06-27 22:00   ` Sam Ravnborg
2009-06-28  5:18     ` Jaswinder Singh Rajput
2009-06-28  9:56     ` Evgeniy Polyakov
2009-06-29 12:29 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox