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: <alpine.LFD.2.11.1406290226380.15455@eddie.linux-mips.org>
Date:	Sun, 29 Jun 2014 02:30:56 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@...ux-mips.org>
To:	Joe Perches <joe@...ches.com>
cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] declance: Fix 64-bit compilation warnings

On Sat, 28 Jun 2014, Joe Perches wrote:

> > @@ -499,8 +499,9 @@ static void lance_init_ring(struct net_d
> >  						/* The ones required by tmd2 */
> >  		*lib_ptr(ib, btx_ring[i].misc, lp->type) = 0;
> >  		if (i < 3 && ZERO)
> > -			printk("%d: 0x%8.8x(0x%8.8x)\n",
> > -			       i, leptr, (uint)lp->tx_buf_ptr_cpu[i]);
> > +			printk("%d: 0x%8.8x(%#0*lx)\n",
> > +			       i, leptr, (int)sizeof(long),
> > +			       (long)lp->tx_buf_ptr_cpu[i]);
> 
> You need to adjust the "*" and sizeof(long) with +2 for the
> 0x prefix in the output length here.

 Good catch, thanks!  MIPS kernel addresses always have their MSB set so 
this is hard to notice in testing.  But also the width has to be doubled 
first, to take two digits per byte into account too.  Sending an updated 
change right away, as soon as it builds and boots.

  Maciej
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ