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: <1399986340.4137.14.camel@jlt4.sipsolutions.net>
Date:	Tue, 13 May 2014 15:05:40 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Fabian Frederick <fabf@...net.be>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	"John W. Linville" <linville@...driver.com>,
	akpm <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/1] net/wireless/util.c: replace memcpy by
 ether_addr_copy

On Mon, 2014-05-12 at 19:51 +0200, Fabian Frederick wrote:
> Cc: Johannes Berg <johannes@...solutions.net>
> Cc: "John W. Linville" <linville@...driver.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> ---
>  net/wireless/util.c | 42 +++++++++++++++++++++---------------------
>  1 file changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/net/wireless/util.c b/net/wireless/util.c
> index e5872ff..ab23b95 100644
> --- a/net/wireless/util.c
> +++ b/net/wireless/util.c
> @@ -381,8 +381,8 @@ int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
>  	 *   1     0   BSSID SA    DA    n/a
>  	 *   1     1   RA    TA    DA    SA
>  	 */
> -	memcpy(dst, ieee80211_get_DA(hdr), ETH_ALEN);
> -	memcpy(src, ieee80211_get_SA(hdr), ETH_ALEN);
> +	ether_addr_copy(dst, ieee80211_get_DA(hdr));
> +	ether_addr_copy(src, ieee80211_get_SA(hdr));

I think this patch is mostly fine, but I'd like you to understand and
document (in the commit log) why it is, and fix the (potential future)
issue with "dst" as discussed in the other thread.

johannes

--
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