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: <20070801164554.5d2d157a.akpm@linux-foundation.org>
Date:	Wed, 1 Aug 2007 16:45:54 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"Keshavamurthy, Anil S" <anil.s.keshavamurthy@...el.com>
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>,
	Greg KH <greg@...ah.com>, Andi K <ak@...e.de>,
	arjan <arjan@...ux.intel.com>, Ashok Raj <ashok.raj@...el.com>,
	Suresh B <suresh.b.siddha@...el.com>
Subject: Re: [patch -mm][Intel-IOMMU] Optimize sg map/unmap calls

On Wed, 1 Aug 2007 13:06:23 -0700
"Keshavamurthy, Anil S" <anil.s.keshavamurthy@...el.com> wrote:

> +/* Computes the padding size required, to make the
> + * the start address naturally aligned on its size
> + */
> +static int
> +iova_get_pad_size(int size, unsigned int limit_pfn)
> +{
> +	unsigned int pad_size = 0;
> +	unsigned int order = ilog2(size);
> +
> +	if (order)
> +		pad_size = (limit_pfn + 1) % (1 << order);
> +
> +	return pad_size;
> +}

This isn't obviously doing the right thing for non-power-of-2 inputs.
ilog2() rounds down...

Please check that this, and all the other ilog2()s which have been added
are doing the right thing if they can be presented with non-power-of-2
inputs?
-
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