ANDROID: mm: allow vmas with vm_ops to be speculatively handled

Right now only anonymous page faults are speculatively handled,
thus leaving out a large percentage of faults still requiring to
take mmap_sem. These were left out since there can be fault
handlers mainly in the fs layer which may use vma in unknown ways.
This patch enables speculative fault for ext4, f2fs and shmem. The
feature is disabled by default and enabled via allow_file_spec_access
kernel param.

Bug: 171954515
Change-Id: I0d23ebf299000e4ac5e2c71bc0b7fc9006e98da9
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
Vinayak Menon
2021-03-18 15:20:17 +05:30
committed by Todd Kjos
parent 77e791866b
commit 35eacb5c87
10 changed files with 170 additions and 37 deletions

View File

@@ -289,6 +289,12 @@
do not want to use tracing_snapshot_alloc() as it needs
to be done where GFP_KERNEL allocations are allowed.
allow_file_spec_access
Allow speculative faults on file backed pages.
Speculative faults are enabled only for those vm_ops
that implement and return true for allow_speculation
callback.
allow_mismatched_32bit_el0 [ARM64]
Allow execve() of 32-bit applications and setting of the
PER_LINUX32 personality on systems where only a strict