ANDROID: 16K: x86_64: Remove /dev/userfaultfd
When emulating 16KB page size on x86_64, the kernel presents a 16KB page size to userspace. However the kernel and hardware still operates at a 4KB page size granularity. This mean that even though the mimumun size of memory that userspace can request is 16384 (from mmap); faults still happen at a 4KB granularity in the kernel. This is inherently incompatible with UFFD, which is used by the default ART GC in Android V. Since UFFD necessarily needs to operate on PTEs (4096) but from the client's perspective in userspace the page size is 16384. Don't create /dev/userfaultfd if emulating 16KB (larger than 4KB) page sizes on x86_64. Bug: 409631148 Bug: 379001861 Bug: 384985178 Bug: 377361489 Test: atest vts_linux_kselftest_x86_64:mm_uffd_unit_tests_x86_64#mm_uffd_unit_tests_x86_64 -- --abi x86_64 Change-Id: Idce473108e2275c806eba3815a54f7753e0a1352 Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
@@ -2336,6 +2336,9 @@ static int __init userfaultfd_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (__PAGE_SIZE != PAGE_SIZE)
|
||||
return 0;
|
||||
|
||||
ret = misc_register(&userfaultfd_misc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user