ia64/81284: Unaligned Reference with pf on 5.4/IA64
sam at errno.com
Thu Jun 16 06:01:10 GMT 2005
Daniel Hartmeier wrote:
> On Mon, Jun 13, 2005 at 09:23:50PM +0000, Marcel Moolenaar wrote:
>>Synopsis: Unaligned Reference with pf on 5.4/IA64
>>Responsible-Changed-When: Mon Jun 13 21:22:54 GMT 2005
>>Move to a more pf-focussed responsible party.
> If I understand the problem correctly, there is an underlying
> network-generic question I'd like to ask here.
> When a function in the kernel gets passed a struct ip pointer, can it
> assume that the struct ip object pointed to is properly aligned? Or
> should it assume that this is not the case, and extract members more
> We can fix the access in pf of course, but if other functions rightfully
> count on struct ip objects being properly aligned, this might simply
> crash outside of pf, too.
> In short, is the problem that bridge doesn't properly align the struct
> ip object (which I can try to fix, too), or that pf assumes that such
> objects should be aligned?
> On OpenBSD's 64-bit architectures with varying alignment rules, this has
> never occured, I think because the struct ip objects (and, hence, their
> ip_src/dst members) are kept aligned.
> If I'm way off, and proper alignment of struct ip objects does not
> guarantee proper alignment of the ip_src/dst members as 32-bit
> unsigneds, please explain. If ia64 is different from other 64-bit
> architectures (of which I only know amd64, sparc64 and alpha), please
> explain what alignment rules there are for u_int32_t.
Much code assumes ip packets are aligned.
More information about the freebsd-pf