• Alex Ilin's avatar
    Do not populate ModuleCache on arm64 POSIX. · 0848ce8f
    Alex Ilin authored
    arm64 has execute-only memory (XOM) protecting code pages from being read.
    PosixModule reads executable pages in order to extract module info. This
    may result in a crash if the module is mapped as XOM.
    
    This CL effectively disables ModuleCache on POSIX arm64 platforms.
    
    Alternative solution would be to obtain map permissions before accessing
    module's executable memory by parsing /proc/self/maps. Then, return
    nullptr iff the mapping has execute-only protection.
    
    Bug: 957801
    Change-Id: I37b2dfa012a0f723a75579d0aabe4c096762f948
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1599391
    Commit-Queue: Alex Ilin <alexilin@chromium.org>
    Reviewed-by: default avatarMike Wittman <wittman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#658995}
    0848ce8f
module_cache_posix.cc 3.27 KB