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, 20 Feb 2013 12:01:17 +0100
From:	Paul Bolle <pebolle@...cali.nl>
To:	James Bottomley <James.Bottomley@...senPartnership.com>
Cc:	Adaptec OEM Raid Solutions <aacraid@...ptec.com>,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH] [SCSI] aacraid: silence two GCC warnings

On Wed, 2013-02-20 at 10:40 +0000, James Bottomley wrote:
> On Sat, 2013-02-09 at 21:09 +0100, Paul Bolle wrote:
> > --- a/drivers/scsi/aacraid/src.c
> > +++ b/drivers/scsi/aacraid/src.c
> > @@ -407,7 +407,7 @@ static int aac_src_deliver_message(struct fib *fib)
> >  		fib->hw_fib_va->header.StructType = FIB_MAGIC2;
> >  		fib->hw_fib_va->header.SenderFibAddress = (u32)address;
> >  		fib->hw_fib_va->header.u.TimeStamp = 0;
> > -		BUG_ON((u32)(address >> 32) != 0L);
> > +		BUG_ON(((u64)address >> 32) != 0UL);
> 
> Actually, this isn't the right way to do this.  The correct way would be
> address >> 16 >> 16, but no-one is expected to remember this, so we have
> it macroised in kernel.h as upper_32_bits().
> 
> So this should become
> 
> BUG_ON(upper_32_bits(address) != 0L);

Thanks. I hadn't yet stumbled onto that macro.

> and a similar change for the below.

I hope to send an updated patch shortly.


Paul Bolle

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