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: <20140306.130746.1333492573211031660.davem@davemloft.net>
Date:	Thu, 06 Mar 2014 13:07:46 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	phoebe.buckheister@...m.fraunhofer.de
Cc:	netdev@...r.kernel.org, linux-zigbee-devel@...ts.sourceforge.net
Subject: Re: [PATCH net-next v4 1/4] ieee802154: add generic header
 handling routines

From: Phoebe Buckheister <phoebe.buckheister@...m.fraunhofer.de>
Date: Thu, 6 Mar 2014 11:11:39 +0100

> On Wed, 05 Mar 2014 19:39:13 -0500 (EST)
> David Miller <davem@...hat.com> wrote:
> 
>> This is how we handle some fields of struct iphdr, and it's fine with
>> me.
> 
> Wonderful, this will unclutter everything that concerns itself with
> some degree of header handling.
> 
>> Be sure to use __LITTLE_ENDIAN_BITFIELD and __BIG_ENDIAN_BITFIELD for
>> your CPP checks.
> 
> I looked at struct iphdr now that you mentioned it, and i was a little
> surprised to see that this header is often pointer-cast from an
> skb_network_header.

Why is that surprising?  It's the network header.

> As far as I can see, declaring all subfields (say)
> u16 in the bitfield endianness order when the entire bitfield is a u16
> in the header will result in correct behaviour for cast/memcpy. Is this
> correct? If not, I'll write out explicit operations for each bitfield
> member.

memcpy() "just works"
--
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