All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH NFSIM]: Define ____cacheline_aligned
@ 2005-01-06 14:15 Patrick McHardy
  0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2005-01-06 14:15 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Netfilter Development Mailinglist

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

____cacheline_aligned is currently undefined, this makes this check in
ip_tables.c check_entry_size_and_hooks() fail on 64 bit because
newinfo->entries and thus e is only 4-byte aligned:

        if ((unsigned long)e % __alignof__(struct ipt_entry) != 0
            || (unsigned char *)e + sizeof(struct ipt_entry) >= limit) {
                duprintf("Bad offset %p\n", e);
                return -EINVAL;
        }

This patch makes it align to 8 byte.



[-- Attachment #2: 3.diff --]
[-- Type: text/x-patch, Size: 402 bytes --]

Index: kernelenv/include/kernelenv.h
===================================================================
--- kernelenv/include/kernelenv.h	(revision 3578)
+++ kernelenv/include/kernelenv.h	(working copy)
@@ -103,7 +103,7 @@
 
 #define __init
 #define __inline
-#define ____cacheline_aligned
+#define ____cacheline_aligned __attribute__((aligned(8)))
 
 #include <talloc.h>
 extern void *__vmalloc_ctx;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-06 14:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-06 14:15 [PATCH NFSIM]: Define ____cacheline_aligned Patrick McHardy

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.