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: <4850BE9B.5030504@linux.vnet.ibm.com>
Date:	Thu, 12 Jun 2008 11:43:47 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	righi.andrea@...il.com, linux-mm@...ck.org,
	skumar@...ux.vnet.ibm.com, yamamoto@...inux.co.jp,
	menage@...gle.com, lizf@...fujitsu.com,
	linux-kernel@...r.kernel.org, xemul@...nvz.org,
	kamezawa.hiroyu@...fujitsu.com
Subject: Re: [-mm][PATCH 2/4] Setup the memrlimit controller (v5)

Andrew Morton wrote:
> 
> #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
> 
> ?
> 
> afaict ALIGN() tries to do the right thing, and if it doesn't, we
> should fix ALIGN().
> 

That should do the right thing, provided there are no duplicate ALIGN defintions
elsewhere

kernel.h has


#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1)
#define __ALIGN_MASK(x,mask)    (((x)+(mask))&~(mask))

Which seems like the correct thing, since we use typeof(x) for (a) - 1.



-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
--
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