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:	Fri, 4 Jul 2014 12:47:44 +0000
From:	Varun Sethi <Varun.Sethi@...escale.com>
To:	Joerg Roedel <joro@...tes.org>
CC:	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"alex.williamson@...hat.com" <alex.williamson@...hat.com>
Subject: RE: [PATCH 1/3] iommu/fsl: Fix PAMU window size check.



> -----Original Message-----
> From: Joerg Roedel [mailto:joro@...tes.org]
> Sent: Friday, July 04, 2014 4:15 PM
> To: Sethi Varun-B16395
> Cc: iommu@...ts.linux-foundation.org; linux-kernel@...r.kernel.org;
> linuxppc-dev@...ts.ozlabs.org; alex.williamson@...hat.com
> Subject: Re: [PATCH 1/3] iommu/fsl: Fix PAMU window size check.
> 
> On Tue, Jun 24, 2014 at 07:27:15PM +0530, Varun Sethi wrote:
> >  	/* window size is 2^(WSE+1) bytes */
> > -	return __ffs(addrspace_size) - 1;
> > +	return fls64(addrspace_size) - 2;
> 
> This looks bogus, why do you replace ffs (find-first-bit) by fls (find-
> last-bit)?
> 
Address space size is always a power of 2. This change was required to handle address sizes > 32bit width on 32 bit architectures.

-Varun

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