--- zzzz-none-000/linux-5.15.111/mm/mmap.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/mm/mmap.c 2024-02-07 09:28:09.000000000 +0000 @@ -7,6 +7,11 @@ * Address space accounting code */ +/* + * Includes Intel Corporation's changes/modifications dated: 2017. + * Changed/modified portions - Copyright (c) 2017, Intel Corporation. + */ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include @@ -1410,6 +1415,11 @@ vm_flags_t vm_flags; int pkey = 0; +#ifdef CONFIG_MLOCK_APPS + if (!(prot & PROT_WRITE) && capable(CAP_IPC_LOCK)) + flags |= MAP_LOCKED; +#endif + *populate = 0; if (!len)