From: Patrick McHardy <kaber@trash.net>
To: Dmitry Mishin <dim@openvz.org>
Cc: schwab@suse.de, netfilter-devel@lists.netfilter.org,
"David S. Miller" <davem@davemloft.net>,
dev@openvz.org
Subject: Re: [RFC][PATCH] compat_uint64_t type
Date: Mon, 17 Apr 2006 18:03:39 +0200 [thread overview]
Message-ID: <4443BC5B.9000407@trash.net> (raw)
In-Reply-To: <4443B882.70203@trash.net>
[-- Attachment #1: Type: text/plain, Size: 364 bytes --]
Patrick McHardy wrote:
> Dmitry Mishin wrote:
>
>>This patch introduces compat_uint64_t type, which is required for proper
>>handling different alignment of structures, containing u64 objects, on
>>compatible with ia32 64bit platforms and others.
This is my proposed alternative. It assumes all architectures besides
x86 use native alignment for basic types.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1182 bytes --]
[NETFILTER]: Fix compat_xt_counters alignment for non-x86
Some (?) non-x86 architectures require 8byte alignment for u_int64_t
even when compiled for 32bit, using u_int32_t in compat_xt_counters
breaks on these architectures, use u_int64_t for everything but x86.
Reported by Andreas Schwab <schwab@suse.de>.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 2666afe70fb68b9b884f6d3fa7e4236183818028
tree 65eac95933d59a455853245f7442cbb38dc9f19c
parent 2ceefa038e908d5da21aefedae02da4eab1b2787
author Patrick McHardy <kaber@trash.net> Mon, 17 Apr 2006 18:04:37 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 17 Apr 2006 18:04:37 +0200
include/linux/netfilter/x_tables.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index f6bdef8..3870145 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -361,7 +361,11 @@ struct compat_xt_entry_target
struct compat_xt_counters
{
+#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
u_int32_t cnt[4];
+#else
+ u_int64_t cnt[2];
+#endif
};
struct compat_xt_counters_info
next prev parent reply other threads:[~2006-04-17 16:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-14 17:12 compat_xt_counters is not compatible Andreas Schwab
2006-04-15 14:11 ` Dmitry Mishin
2006-04-15 14:16 ` Andreas Schwab
2006-04-15 16:14 ` Dmitry Mishin
2006-04-15 17:32 ` Andreas Schwab
2006-04-15 18:38 ` Dmitry Mishin
2006-04-15 22:09 ` Andreas Schwab
2006-04-16 6:28 ` Dmitry Mishin
2006-04-16 11:41 ` Andreas Schwab
2006-04-17 20:13 ` David S. Miller
2006-04-15 16:37 ` Patrick McHardy
2006-04-15 17:31 ` Andreas Schwab
2006-04-15 17:52 ` Patrick McHardy
2006-04-16 7:24 ` David S. Miller
2006-04-16 15:07 ` Patrick McHardy
2006-04-17 5:24 ` David S. Miller
2006-04-17 10:59 ` [RFC][PATCH] compat_uint64_t type Dmitry Mishin
2006-04-17 11:51 ` Andreas Schwab
2006-04-17 12:04 ` Dmitry Mishin
2006-04-17 14:05 ` Andreas Schwab
2006-04-17 15:47 ` Patrick McHardy
2006-04-17 16:03 ` Patrick McHardy [this message]
2006-04-17 20:20 ` David S. Miller
2006-04-21 0:07 ` Patrick McHardy
[not found] ` <jehd4sdvh1.fsf@sykes.suse.de>
2006-04-17 17:12 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4443BC5B.9000407@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=dev@openvz.org \
--cc=dim@openvz.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.