Re: unaligned access in ipt_ULOG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Mon, 02 Apr 2007 13:55:56 +0200

> David Miller wrote:
> > Patrick, this is on sparc64, it appears to be this code:
> > 
> > 	pm->timestamp_sec = skb->tstamp.off_sec;
> > 	pm->timestamp_usec = skb->tstamp.off_usec;
> > 
> > and the NLMSG_DATA() (and thus 'pm') is not 8-byte aligned.
> > 
> > I bet this is a 32-bit sparc binary, has the idea of a compat
> > layer for the ULOG bits ever been discussed?
> 
> 
> No, I can't imagine how to do this since we don't have any compat
> infrastructure for netlink, so we would have to know whether the
> receiving process is a 32 bit binary in ipt_ULOG itself. We have
> some compat code in userspace to deal with the different structure
> layout, so besides the unaligned accesses, it should already work
> fine. Since ULOG is obsolete and nfnetlink_log shouldn't have
> these issues, I think the best way to fix this is to use
> put_unaligned in ipt_ULOG.
> 
> How does this look?

Thanks for the explanation, the patch looks fine, applied.
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux