crazylinker: Remove size check with dlopen_ext
The size is used only to reserve address space (with mmap(2)). In the kernel mmap(2) will always silently align to the next page. Hence lifting this check should be safe. Recently program headers changed in Chrome DSOs on Android so the amount of virtual address space to reserve became unaligned (when DFMs are enabled we need to reserve more address space than what we immediately require). It does not prevent the system android_dlopen_ext() from working (as checked by cjgrant@ on the bug), hence this change would likely make the crazylinker implementation of android_dlopen_ext() closer to the reference one. Though I did not verify the alignment of the reserved size for libmonochrome.so (potentially could still stay aligned because, after all, it is a different library from libchrome.so). The amount of testing for this hotfix is inspired by perf season: NO TESTING BEYOND CQ. Thanks for accepting this :) Bug: 998712 Change-Id: I330bda4ac47d2cda4b70a15a5a0c26174028723e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1784602Reviewed-by:Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Christopher Grant <cjgrant@chromium.org> Commit-Queue: Egor Pasko <pasko@chromium.org> Cr-Commit-Position: refs/heads/master@{#693145}
Showing
Please register or sign in to comment