All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [PATCH NFSIM]: Define ____cacheline_aligned
Date: Thu, 06 Jan 2005 15:15:46 +0100	[thread overview]
Message-ID: <41DD4812.9070805@trash.net> (raw)

[-- 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;

                 reply	other threads:[~2005-01-06 14:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=41DD4812.9070805@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=rusty@rustcorp.com.au \
    /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.