Commit graph

2 commits

Author SHA1 Message Date
Kalesh Singh
c5c1d19ebb loader: Only extend segments if kernel supports page size migration
It has been found that some existing apps have implicit dependencies on
the address ranges in /proc/*/maps. Since segment extension changes the
range of the LOAD segment VMAs some of these apps crash, either by
SIGBUS or in yet unidentified ways.

Only perform the segment extension optimization if the kernel has the
necessary mitigations to ensure app compatibility.

Bug: 330117029
Bug: 327600007
Bug: 330767927
Bug: 328266487
Bug: 329803029
Test: Manual - Launch Free Fire Chaos app
Change-Id: I5b03b22c4a468f6646750a00942cc2d57f43d0de
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2024-05-02 11:06:51 -07:00
Kalesh Singh
0396f87858 bionic: linker-unit-tests: Add crt_pad_segment tests
Test crt_pad_segment note parsing.

Test: atest -c linker-unit-tests
Bug: 316403210
Bug: 300367402
Bug: 307803052
Bug: 312550202
Change-Id: I0a7db8113a8b1df72696906bdd48a6ab6b6715f7
2024-02-07 16:20:48 -08:00