diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-05 12:26:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-05 12:26:52 -0500 |
commit | ad658cec232771b11e95bb5f0d639d48f898a1f2 (patch) | |
tree | 7ef4ed87cbba8d8395f67c21af5c167d5de0293a /include | |
parent | 2a1292b36ba106b9b7f030d3fa130f5f634fd8f0 (diff) | |
parent | 5a211a5deabcafdc764817d5b4510c767d317ddc (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')
-rw-r--r-- | include/linux/mm.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 520238cbae5d..1b7b95c67aca 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 | ||
16 | struct mempolicy; | 17 | struct mempolicy; |
17 | struct anon_vma; | 18 | struct 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 | */ | ||
520 | static 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> |