Use Bionic's dynamic linker flags to improve sharing of read-only data between processes
Categories
(Core :: mozglue, enhancement)
Tracking
()
People
(Reporter: bugzilla, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid] [foundation][android-tab-reloading] )
Attachments
(1 file)
On Android versions where it is possible, we should switch from dlopen to using Bionic's android_dlopen_ext with the appropriate flags for loading .so files such that read-only GNU RELRO sections can be shared between all our content processes.
This offers big wins in memory savings.
Comment 1•4 years ago
•
|
||
"Available since API level 21." That's Android 5.0.
I forget, do we still support Android 4.x?
Comment 2•4 years ago
|
||
(it kind of blows my mind that the linker requires manual hints)
Updated•4 years ago
|
| Reporter | ||
Comment 3•4 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #1)
"Available since API level 21." That's Android 5.0.
I forget, do we still support Android 4.x?
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Hi Glandium, the Firefox Android is preparing to run Fission related experiments staring around the end of Q3, and would like to get any remaining blocking bugs addressed by 128 Release. Could you help triage and fix this issue?
Comment 5•1 year ago
|
||
Comment 6•1 year ago
|
||
The attached proof of concept works, but needs some polishing for e.g. better error handling. However, while it potentially saves 6M per process on a aarch64 build, it also introduces a large number of VMAs, because e.g. libc can't be guaranteed to be at the same address, so all GOT entries pointing to libc are different. A large number of VMAs can have an impact on performance, so this would have to be measured. Similarly, what the system linker does to make this work can have an impact on startup time.
All these things would need to be measured, and the loss of ASLR for the location of libxul.so between processes need to be evaluated from a security standpoint.
Can someone from the Android team look at those aspects?
Updated•1 year ago
|
Comment 7•1 year ago
|
||
Hey Kaya, can you please take a look?
Updated•8 months ago
|
Description
•