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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 31 Aug 2016 11:32:48 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Greg Rose <gvrose8192@...il.com>
Cc:     netdev@...r.kernel.org, Greg Rose <grose@...htfleet.com>
Subject: Re: [PATCH] net/ethernet: Use ether_addr_copy rather than memcpy

On Wed, 2016-08-31 at 09:32 -0700, Greg Rose wrote:
> I'm not sure why this hasn't been done before because it seems obvious,
> so maybe there is some reason that memcpy is used instead of
> ether_addr_copy in this code.  But let's try this anyway.
> 
> Change memcpy to ether_addr_copy.

...

>  
> @@ -211,7 +211,7 @@ EXPORT_SYMBOL(eth_type_trans);
>  int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr)
>  {
>  	const struct ethhdr *eth = eth_hdr(skb);
> -	memcpy(haddr, eth->h_source, ETH_ALEN);
> +	ether_addr_copy(haddr, eth->h_source);


Please carefully read ether_addr_copy() comments.

Not all arches are like x86



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ