aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-05 12:26:52 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-05 12:26:52 -0500
commitad658cec232771b11e95bb5f0d639d48f898a1f2 (patch)
tree7ef4ed87cbba8d8395f67c21af5c167d5de0293a /include/linux
parent2a1292b36ba106b9b7f030d3fa130f5f634fd8f0 (diff)
parent5a211a5deabcafdc764817d5b4510c767d317ddc (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6: VM/Security: add security hook to do_brk Security: round mmap hint address above mmap_min_addr security: protect from stack expantion into low vm addresses Security: allow capable check to permit mmap or low vm space SELinux: detect dead booleans SELinux: do not clear f_op when removing entries
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 520238cbae5..1b7b95c67ac 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -12,6 +12,7 @@
12#include <linux/prio_tree.h> 12#include <linux/prio_tree.h>
13#include <linux/debug_locks.h> 13#include <linux/debug_locks.h>
14#include <linux/mm_types.h> 14#include <linux/mm_types.h>
15#include <linux/security.h>
15 16
16struct mempolicy; 17struct mempolicy;
17struct anon_vma; 18struct anon_vma;
@@ -513,6 +514,21 @@ static inline void set_page_links(struct page *page, enum zone_type zone,
513} 514}
514 515
515/* 516/*
517 * If a hint addr is less than mmap_min_addr change hint to be as
518 * low as possible but still greater than mmap_min_addr
519 */
520static inline unsigned long round_hint_to_min(unsigned long hint)
521{
522#ifdef CONFIG_SECURITY
523 hint &= PAGE_MASK;
524 if (((void *)hint != NULL) &&
525 (hint < mmap_min_addr))
526 return PAGE_ALIGN(mmap_min_addr);
527#endif
528 return hint;
529}
530
531/*
516 * Some inline functions in vmstat.h depend on page_zone() 532 * Some inline functions in vmstat.h depend on page_zone()
517 */ 533 */
518#include <linux/vmstat.h> 534#include <linux/vmstat.h>