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]
Date:   Wed, 7 Feb 2018 15:09:07 +0000
From:   James Hogan <jhogan@...nel.org>
To:     Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:     davem@...emloft.net, Alice Michael <alice.michael@...el.com>,
        netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com,
        jogreene@...hat.com, Ralf Baechle <ralf@...ux-mips.org>,
        linux-mips@...ux-mips.org
Subject: Re: [net-next,06/15] i40e: change flags to use 64 bits

On Fri, Jan 26, 2018 at 01:24:50PM -0800, Jeff Kirsher wrote:
> From: Alice Michael <alice.michael@...el.com>
> 
> As we have added more flags, we need to now use more
> bits and have over flooded the 32 bit size.  So
> make it 64.
> 
> Also change all the existing bits to unsigned long long
> bits.
> 
> Signed-off-by: Alice Michael <alice.michael@...el.com>
> Tested-by: Andrew Bowers <andrewx.bowers@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h         | 67 +++++++++++++-------------
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c |  4 +-
>  2 files changed, 36 insertions(+), 35 deletions(-)

...

> @@ -4323,7 +4323,7 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
>  	 * originally. We'll just punt with an error and log something in the
>  	 * message buffer.
>  	 */
> -	if (cmpxchg(&pf->flags, orig_flags, new_flags) != orig_flags) {
> +	if (cmpxchg64(&pf->flags, orig_flags, new_flags) != orig_flags) {

This breaks allyesconfig builds on certain architectures, for example
MIPS 32-bit with SMP enabled, which doesn't support cmpxchg64:

  CC      drivers/net/ethernet/intel/i40e/i40e_ethtool.o   
drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function ‘i40e_set_priv_flags’:
drivers/net/ethernet/intel/i40e/i40e_ethtool.c:4326:6: error: implicit declaration of function ‘cmpxchg64’; did you mean ‘__cmpxchg’? [-Werror=implicit-function-declaration]
  if (cmpxchg64(&pf->flags, orig_flags, new_flags) != orig_flags) {
      ^~~~~~~~~                                               
      __cmpxchg                                              

Should the driver now depend on 64BIT or something?

Cheers
James

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ