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] [day] [month] [year] [list]
Message-ID: <1444584211.8012.25.camel@perches.com>
Date:	Sun, 11 Oct 2015 10:23:31 -0700
From:	Joe Perches <joe@...ches.com>
To:	punit vara <punitvara@...il.com>
Cc:	kbuild test robot <lkp@...el.com>, kbuild-all@...org,
	Larry Finger <Larry.Finger@...inger.net>,
	Dogukan Ergun <dogukan.ergun@...il.com>,
	Florian Schilhabel <florian.c.schilhabel@...glemail.com>,
	Joshua Clayton <stillcompiling@...il.com>,
	Greg KH <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Julia Lawall <Julia.Lawall@...6.fr>,
	Sudip Mukherjee <sudipm.mukherjee@...il.com>,
	Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over
 memcmp()

On Sun, 2015-10-11 at 16:42 +0530, punit vara wrote:
> following are the two structure need to be consider for alignment.
> 
> struct iw_pmksa {
> __u32                      cmd;                     /*     0     4 */
> struct sockaddr            bssid;                /*     4    16 */
> __u8                       pmkid[16];              /*    20    16 */

wrong bssid, bssid here is on the stack
after a char *, so bssid is aligned on a
pointer boundary, either 4 or 8.

> /* size: 36, cachelines: 1, members: 3 */
> /* last cacheline: 36 bytes */
> };
> 
> struct wlan_bssid_ex {
[]
> unsigned char              MacAddress[6];        /*     4     6 */

> As I understood both are not aligned to u16 so
> ether_addr_equal_unaligned() should be used.

u16s are aligned when on any even address

So ether_addr_equal could be used.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ