lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080413.222629.180789339.davem@davemloft.net>
Date:	Sun, 13 Apr 2008 22:26:29 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	yoshfuji@...ux-ipv6.org
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-2.6] [IPV6] MIP6: Ensure independence from
 alignment.

From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@...ux-ipv6.org>
Date: Wed, 09 Apr 2008 00:46:32 +0900 (JST)

> We cannot rely on sizeof(struct ipv6_opt_hdr) when we are handling
> wire format, because it may not be 2 but 4 on some architectures.
> On such a architecture, the result can be different from what we
> actually expect.
> 
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>

Please just mark the structure with "packed" attribute.

It is appropriate in this case, and there should be no cost
because members are 8-byte quantities.

Otherwise, mistakes are likely to be added in the future.
It is very reasonable to expect the structure size for
a networking header to match correctly.
 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ