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: <4B77202F.9090502@zytor.com>
Date:	Sat, 13 Feb 2010 13:57:03 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Joe Perches <joe@...ches.com>, Yinghai Lu <yinghai@...nel.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Christoph Lameter <cl@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH 25/35] move round_up/down to kernel.h

On 02/13/2010 12:11 PM, Andrew Morton wrote:
> 
>> Both of these names already exist -- yes, a rename is probably in order
>> but it should be a separate patchset.
> 
> More than a rename is certainly in order.
> 
> And it's not clear who will be shovelling that muck, and when.  We
> haven't even worked out what needs to be done.
> 

OK, I was under the impression that all that was really called for was a
rename -- which is pretty straightforward, after all; it can mostly be
scripted.

I guess there is a bigger discussion here, and as such we should have it
now.  Since in the end, though, it is going to have to be a cross-kernel
change, it is probably one of those things that should be done "just
before -rc1".

Let's figure out what is needed.  At a very minimum, we have the
following operations:

-> align downward, arbitrary alignment
-> align upward, arbitrary alignment	- current roundup()
-> align downward, power of 2 alignment	- current round_down()
-> align upward, power of 2 alignment	- current round_up()
-> truncate downward to a power of 2	- current rounddown_pow_of_two()
-> truncate upward to a power of 2	- current roundup_pow_of_two()

Then we have some oddballs:

__ALIGN_MASK(x,m)	== round_up(x, m-1)
ALIGN(x,a)		== round_up(x, m)
PTR_ALIGN(p, a)		== round_up with wrapper
DIV_ROUND_UP(n,d)	== roundup(n,d)/d
DIV_ROUND_CLOSEST(n,d)

A structural renaming is certainly in order, but what more are you
looking for, here?

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.
--
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