]> git.baikalelectronics.ru Git - kernel.git/commit
mm: Introduce arch_validate_flags()
authorCatalin Marinas <catalin.marinas@arm.com>
Mon, 25 Nov 2019 17:27:06 +0000 (17:27 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Sep 2020 11:46:07 +0000 (12:46 +0100)
commitd82e957373d14a127bb706e1504ee4ee52efc527
treeac7e3391d1688a5520c0f182fc60dd038b8033b6
parent4fea0785b2b3e3e4704192fec88c49fb9fba450d
mm: Introduce arch_validate_flags()

Similarly to arch_validate_prot() called from do_mprotect_pkey(), an
architecture may need to sanity-check the new vm_flags.

Define a dummy function always returning true. In addition to
do_mprotect_pkey(), also invoke it from mmap_region() prior to updating
vma->vm_page_prot to allow the architecture code to veto potentially
inconsistent vm_flags.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mman.h
mm/mmap.c
mm/mprotect.c