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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 05 Aug 2012 16:49:56 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Andreas Schwab <schwab@...ux-m68k.org>
Cc:	Joerg Roedel <joerg.roedel@....com>,
	Anton Blanchard <anton@....ibm.com>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	linux-kernel@...r.kernel.org
Subject: Re: Is iommu_num_pages() broken ?

On Sun, 2012-08-05 at 08:39 +0200, Andreas Schwab wrote:
> addr & (io_page_size - 1) computes the offset into the page pointed to
> by addr.  Looks right to me.
> 
> addr & ~(io_page_size - 1) would round addr down to the start of the
> page.

Ah that's right, for some reason I'm so used to seeing ~ before such
constructs that my brain must have imagined it :-)

Sorry for the noise. Next time I'll have coffee first then re-check ...

Cheers,
Ben.

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