All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabian Hugelshofer <hugelshofer2006@gmx.ch>
To: netfilter-devel@vger.kernel.org
Cc: Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH] netfilter ulog byte alignment problem
Date: Wed, 04 Jun 2008 09:43:10 +0100	[thread overview]
Message-ID: <4846559E.2090002@gmx.ch> (raw)
In-Reply-To: <48454163.1060700@trash.net>

Patrick McHardy wrote:
> Fabian Hugelshofer wrote:
>> I tracked the issue down to a byte alignment problem in
>> ulog_packet_msg_t (include/linux/netfilter_ipv4/ipt_ULOG.h). Setting
>> attributes 'packed' or 'aligned' or using 'size_t' instead of 'unsigned
>> char' for field 'mac_len' solved the problem. It seems necessary to help
>> the compiler doing things right.
[...]
> I'm afraid it might break compatibility on other architectures.
> Are your userspace and kernel compiled using the same options?
> Why would they lay out the structure differently?

I think you are right. The compiler lays it out consistantly while
respecting proper alignment. I removed my patch again and it worked
event without. I think the reason was header files which were out of 
sync (kernel vs. userspace). I had to modify ipt_ULOG.(c|h) for a driver 
problem workaround. I'm quire sure that I reverted the changes during 
the testing, but maybe I missed that.

I would write again, if the problem reappears later.

      reply	other threads:[~2008-06-04  8:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02 17:05 [PATCH] netfilter ulog byte alignment problem Fabian Hugelshofer
2008-06-03 13:04 ` Patrick McHardy
2008-06-04  8:43   ` Fabian Hugelshofer [this message]

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=4846559E.2090002@gmx.ch \
    --to=hugelshofer2006@gmx.ch \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    /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.