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:	Fri, 28 Mar 2014 15:59:58 -0700
From:	Joe Perches <joe@...ches.com>
To:	paulmcquad <paulmcquad@...il.com>
Cc:	gregkh@...uxfoundation.org, gamerh2o@...il.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Dan Carpenter <error27@...il.com>
Subject: Re: Staging:et131x: change memcpy()  ether_addr_copy()

On Fri, 2014-03-28 at 22:27 +0000, paulmcquad wrote:
> replace memcpy() with ether_addr_copy()
> make checkpatch.pl clean

broken.

You at least need to change this definition:
drivers/staging/et131x/et131x.c:        static const u8 default_mac[] = { 0x00, 0x05, 0x3d, 0x00, 0x02, 0x00 };
and add __aligned(2) to it to make sure
that the address is appropriately aligned.

> diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
[]
> @@ -3770,7 +3770,7 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
[]
>      /* Set the MAC address to a default */
> -    memcpy(adapter->addr, default_mac, ETH_ALEN);
> +    ether_addr_copy(adapter->addr, default_mac, ETH_ALEN);
[]
> @@ -4337,7 +4337,7 @@ static void et131x_multicast(struct net_device *netdev)
>      netdev_for_each_mc_addr(ha, netdev) {
>          if (i == NIC_MAX_MCAST_LIST)
>              break;
> -        memcpy(adapter->multicast_list[i++], ha->addr, ETH_ALEN);
> +    ether_addr_copy(adapter->multicast_list[i++], ha->addr, ETH_ALEN);

bad indentation too


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