mmap.c (0f8f86c7bdd1c954fbe153af437a0d91a6c5721a) mmap.c (6c21a7fb492bf7e2c4985937082ce58ddeca84bd)
1/*
2 * mm/mmap.c
3 *
4 * Written by obz.
5 *
6 * Address space accounting code <alan@lxorguk.ukuu.org.uk>
7 */
8

--- 6 unchanged lines hidden (view full) ---

15#include <linux/swap.h>
16#include <linux/syscalls.h>
17#include <linux/capability.h>
18#include <linux/init.h>
19#include <linux/file.h>
20#include <linux/fs.h>
21#include <linux/personality.h>
22#include <linux/security.h>
1/*
2 * mm/mmap.c
3 *
4 * Written by obz.
5 *
6 * Address space accounting code <alan@lxorguk.ukuu.org.uk>
7 */
8

--- 6 unchanged lines hidden (view full) ---

15#include <linux/swap.h>
16#include <linux/syscalls.h>
17#include <linux/capability.h>
18#include <linux/init.h>
19#include <linux/file.h>
20#include <linux/fs.h>
21#include <linux/personality.h>
22#include <linux/security.h>
23#include <linux/ima.h>
24#include <linux/hugetlb.h>
25#include <linux/profile.h>
26#include <linux/module.h>
27#include <linux/mount.h>
28#include <linux/mempolicy.h>
29#include <linux/rmap.h>
30#include <linux/mmu_notifier.h>
31#include <linux/perf_event.h>

--- 1024 unchanged lines hidden (view full) ---

1056 default:
1057 return -EINVAL;
1058 }
1059 }
1060
1061 error = security_file_mmap(file, reqprot, prot, flags, addr, 0);
1062 if (error)
1063 return error;
23#include <linux/hugetlb.h>
24#include <linux/profile.h>
25#include <linux/module.h>
26#include <linux/mount.h>
27#include <linux/mempolicy.h>
28#include <linux/rmap.h>
29#include <linux/mmu_notifier.h>
30#include <linux/perf_event.h>

--- 1024 unchanged lines hidden (view full) ---

1055 default:
1056 return -EINVAL;
1057 }
1058 }
1059
1060 error = security_file_mmap(file, reqprot, prot, flags, addr, 0);
1061 if (error)
1062 return error;
1064 error = ima_file_mmap(file, prot);
1065 if (error)
1066 return error;
1067
1068 return mmap_region(file, addr, len, flags, vm_flags, pgoff);
1069}
1070EXPORT_SYMBOL(do_mmap_pgoff);
1071
1072/*
1073 * Some shared mappigns will want the pages marked read-only
1074 * to track write events. If so, we'll downgrade vm_page_prot

--- 1430 unchanged lines hidden ---
1063
1064 return mmap_region(file, addr, len, flags, vm_flags, pgoff);
1065}
1066EXPORT_SYMBOL(do_mmap_pgoff);
1067
1068/*
1069 * Some shared mappigns will want the pages marked read-only
1070 * to track write events. If so, we'll downgrade vm_page_prot

--- 1430 unchanged lines hidden ---