-
Notifications
You must be signed in to change notification settings - Fork 1
Comparing changes
Open a pull request
base repository: Project-PenguinOS/android_bionic
base: unity
head repository: Project-PenguinOS/android_bionic
compare: part2
- 10 commits
- 13 files changed
- 10 contributors
Commits on Oct 3, 2022
-
Snap for 9133013 from 23f0bef to tm-qpr2-release
Change-Id: I3241535aca435bfcb28242f423d28d37bb0c5a18
Android Build Coastguard Worker committedOct 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 70e6053 - Browse repository at this point
Copy the full SHA 70e6053View commit details
Commits on Apr 22, 2023
-
Change-Id: Iad92c39fb729538cf51bf9d9037b15515104b453 (cherry picked from commit 4c5bcdb9b015651c85cec5c9a87521837b30a5c4) Signed-off-by: SayantamGiri <sayantam.giri@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 395978f - Browse repository at this point
Copy the full SHA 395978fView commit details -
libc: Mark libstdc++ as vendor available
A lot of blobs still link this even on 8.1, so allow devices to build a vendor copy of it. Change-Id: I2349478ec0507e3a5136fe89f15e7dc4bfc1a03e (cherry picked from commit a7b9a1b792e42ecc2c9846209bb56f370c73e6cd) Signed-off-by: SayantamGiri <sayantam.giri@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2de18b7 - Browse repository at this point
Copy the full SHA 2de18b7View commit details -
linker: Add support for dynamic SHIM libraries
Author: Christopher R. Palmer <crpalmer@gmail.com> Date: Tue Nov 3 16:44:44 2015 -0500 linker: Add support for dynamic "shim" libs Add a new environment variable LD_SHIM_LIBS that is a colon (":") separated list of vertical bar ("|") separated pairs. The pairs are the name for a soinfo reference (executable or shared library) followed by the name of the shim library to load. For example: LD_SHIM_LIBS=rmt_storage|libshim_ioprio.so:/system/lib/libicuuv.so|libshim_icu53.so will instruct the linker to load the dynamic library libshim_ioprio.so whenver rmt_storage is executed [*] and will load libshim_icu53.so whenever any executable or other shared library links against /system/lib/libicuuv.so. There are no restrictions against circular references. In this example, libshim_icu53.so can link against libicuuv.so which provides a simple and convenient means of adding compatibility symbols. [*] Note that the absolute path is not available to the linker and therefore using the name of executables does depend on the invocation and therefore should only be used if absolutely necessary. That is, running /system/bin/rmt_storage would not load any shim libs in this example because it does not match the name of the invocation of the command. If you have trouble determining the sonames being loaded, you can also set the environment variable LD_DEBUG=1 which will cause additional information to be logged to help trace the detection of the shim libs. Change-Id: I0ef80fa466167f7bcb7dac90842bef1c3cf879b6 Author: Christopher R. Palmer <crpalmer@gmail.com> Date: Sun Nov 15 14:26:32 2015 -0500 linker: Fix the fact that shim libs do not properly call constructors Change-Id: I34333e13443a154e675b853fa41442351bc4243a Author: Christopher R. Palmer <crpalmer@gmail.com> Date: Tue Dec 1 07:10:36 2015 -0500 linker: Don't try to walk the g_active_shim_libs when doing dlsym This is a bug in the original shim_lib implementation which was doing the shim lib resolution both when loading the libraries and when doing the dynamic symbol resolution. Change-Id: Ib2df0498cf551b3bbd37d7c351410b9908eb1795 Author: Christopher R. Palmer <crpalmer@gmail.com> Date: Sun Nov 29 08:28:10 2015 -0500 linker: Reset the active shim libs each time we do a dlopen We use the active libs to avoid recursively trying to load the same library: A -> shimlibs add B -> depends on A -> shimlibs add B -> ... However, when we repeatedly dlopen the same library we need to reset the active shim libs to avoid failing to add B the second time we dlopen A. Change-Id: I27580e3d6a53858e8bca025d6c85f981cffbea06 Author: Danny Baumann <dannybaumann@web.de> Date: Fri Dec 11 10:29:16 2015 +0100 Make shim lib load failure non-fatal. Instead, print an appropriate warning message. Aborting symbol resolution on shim lib load failure leads to weird symbol lookup failures, because symbols in libraries referenced after the one loading the shim won't be loaded anymore without a log message stating why that happened. Change-Id: Ic3ad7095ddae7ea1039cb6a18603d5cde8a16143 Author: Christopher R. Palmer <crpalmer@gmail.com> Date: Sat Dec 12 06:10:09 2015 -0500 bionic: Do not allow LD_SHIM_LIBS for setuid executables That's really not safe... Change-Id: If79af951830966fc21812cd0f60a8998a752a941 Author: Christopher R. Palmer <crpalmer@gmail.com> Date: Sun Feb 14 11:38:44 2016 -0500 bionic: linker: Load shim libs *before* the self-linked libs By loading them earlier, this allows us to override a symbol in a library that is being directly linked. I believe this explains why some people have had problems shimming one lib but when the changet he shim to be against a different lib it magically works. It also makes it possible to override some symbols that were nearly impossible to override before this change. For example, it is pretty much impossible to override a symbol in libutils without this change because it's loaded almost everywhere so no matter where you try to place the shimming, it will be too late and the other symbol will have priority. In particularly, this is necessary to be able to correctly shim the VectorImpl symbols for dlx. Change-Id: I461ca416bc288e28035352da00fde5f34f8d9ffa Author: Chirayu Desai <chirayudesai1@gmail.com> Date: Thu Aug 25 19:02:41 2016 +0530 linker: Update find_library call for shimlibs commits 0cdef7e "Respect caller DT_RUNPATH in dlopen()." and 42d5fcb "Introducing linker namespaces" added new arguments to find_library, add them here. Change-Id: I8f35a45b00d14f8b2ce01a0a96d2dc7759be04a6 Author: Chippa-a <vusal1372@gmail.com> Date: Sat Aug 27 14:56:30 2016 +0200 linker: Update LD_SHIM_LIBS parser function * Upgrade the code using the same changes as 42d5fcb bda20e7 Change-Id: Ic8be0871945bd9feccd0f94a6770f3cc78a70a0f Author: Danny Baumann <dannybaumann@web.de> Date: Wed Sep 7 16:54:06 2016 +0200 Inject shim libs as if they were DT_NEEDED. The previous separate approach had one flaw: If the shim lib requires another lib that's already loaded, find_library_internal() would return the previously loaded copy, but the later load action would fail as the ELF reader map of the initial loading round was already discarded and thus a new ElfReader instance for the soinfo instance was created, which didn't know about the previous reading/loading state. Change-Id: Ib224dbd35d114197097e3dee14a077cc9130fedb Author: jrior001 <jriordan001@gmail.com> Date: Fri Oct 7 19:36:51 2016 -0400 linker: load shims prior to DT_NEEDED check This allows shims to override existing symbols, not just inject new symbols. Change-Id: Ib9216bcc651d8d38999c593babb94d76dc1dbc95 Author: Adrian DC <radian.dc@gmail.com> Date: Sat, 8 Apr 2017 22:40:01 +0200 * Adapt to latest AOSP Oreo bionic linker changes * Additional header to avoid unused function Change-Id: Ib9216bcc651d8d38999c593babb94d76dc1dbc95 Author: Paul Keith <javelinanddart@gmail.com> Date: Thu Feb 15 21:57:33 2018 +0100 linker: Move shims to TARGET_LD_SHIM_LIBS * To reduce security exposure, let's set this at compile time, and block off all the code unless the board flag is set Change-Id: Ieec5f5d9e0f39a798fd48eae037ecffe9502474c Author: Nich <nctrenco@gmail.com> Date: Fri Jun 8 09:48:17 2018 +0800 linker: Provide soinfo path of the shimmed binary This is a forward port of part of the original change that was missed out since the initial port of the shim logic to O. Change-Id: I1f7ff98472cfef5cb2d2bcb303082784898cd0c6 Author: Nich <nctrenco@gmail.com> Date: Tue Jun 5 13:36:43 2018 +0800 linker: Remove unused find_libraries declaration commit "Inject shim libs as if they were DT_NEEDED." removed references to the forward declaration. Change-Id: I5f1aaa3a96f2af3edef07d4ea4e204b586424631 Author: Nich <nctrenco@gmail.com> Date: Sun Jun 10 00:45:51 2018 +0800 linker: Make shim reference path absolute This way, we can filter out non-existent binaries, and ensure we get its absolute path before matching with get_realpath(). This for one allows the use of symlinks in TARGET_LD_SHIM_LIBS. Change-Id: I823815271b3257965534b6b87d8ea36ffb68bc08 Author: Nich <nctrenco@gmail.com> Date: Fri Jun 15 03:59:05 2018 +0800 linker: Ensure active matching pairs Change-Id: I54c666b4560dbfb40839b0bf9132a7fd8d3ed2dd Author: Nich <nctrenco@gmail.com> Date: Thu Jun 21 01:58:10 2018 +0800 linker: Don't involve shim in for_each_dt_needed for_each_dt_needed may have other usages that shouldn't involve the shim, for example, in the unloading of soinfos. Change-Id: Id38de183d90c3f707767bdca032a5ea2bc82fde8 Author: Jiyong Park <jiyong@google.com> Date: Fri Jan 25 18:18:01 2019 +0900 Call realpath(3) only when the path is accessible for read Suppress the SELinux denial log spam by not calling realpath(3) when the path does not exist or is not accessible for read, and then not auditing access(2) failure. Change-Id: I729ecb8ea0bb581069eb849bae7cd28e6ab636cc Change-Id: Ic3ad7095ddae7ea1039cb6a18603d5cde8a16152 Signed-off-by: Wang Han <416810799@qq.com> Signed-off-by: SayantamGiri <sayantam.giri@gmail.com>Configuration menu - View commit details
-
Copy full SHA for 330c9ab - Browse repository at this point
Copy the full SHA 330c9abView commit details -
Add ability to build scudo-free 32-bit libc variant.
Scudo seems to have issues with camera blobs, which also the case with google devices. https://android-review.googlesource.com/q/topic:%22disable-camera24-memory-mitigations%22+(status:open%20OR%20status:merged) These changes are applied upstream and needed much more commits in various components which makes it difficult to backport. Therefore add option to disable scudo only for 32 bit components, like camera modules. Change-Id: Ie4e62477b0801413827007c511e547b12ea2f46d Signed-off-by: SayantamGiri <sayantam.giri@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c354ffe - Browse repository at this point
Copy the full SHA c354ffeView commit details -
bionic: Sort and cache hosts file data for fast lookup
The hosts file is normally searched linearly. This is very slow when the file is large. To mitigate this, read the hosts file and sort the entries in an in-memory cache. When an address is requested via gethostbyname or getaddrinfo, binary search the cache. In case where the cache is not available, return a suitable error code and fall back to the existing lookup code. This has been written to behave as much like the existing lookup code as possible. But note bionic and glibc differ in behavior for some corner cases. Choose the most standard compliant behavior for these where possible. Otherwise choose the behavior that seems most reasonable. RM-290 Change-Id: I3b322883cbc48b0d76a0ce9d149b59faaac1dc58 (cherry picked from commit ed4c3a6bd449a4ed70645071a440ae146f194116) Signed-off-by: SayantamGiri <sayantam.giri@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d314594 - Browse repository at this point
Copy the full SHA d314594View commit details -
bionic: Support wildcards in cached hosts file
If an exact name is not found in the hosts file and the host name contains at least one dot, search for entries of the form "*.domain", where domain is the portion of the host name after the first dot. If that is not found, repeat using the domain. Example: a.b.c.example.com would search for the following in turn: a.b.c.example.com *.b.c.example.com *.c.example.com *.example.com *.com Change-Id: I4b0bb81699151d5b371850daebf785e35ec9b180 Signed-off-by: SayantamGiri <sayantam.giri@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 14c50c3 - Browse repository at this point
Copy the full SHA 14c50c3View commit details -
Revert "Add ability to build scudo-free 32-bit libc variant."
This reverts commit 5cd482a14a172fcfc426b1b4ea9879f31a7da38c.
Configuration menu - View commit details
-
Copy full SHA for e4d7836 - Browse repository at this point
Copy the full SHA e4d7836View commit details -
Switch to jemalloc memory allocator
Overall, jemalloc performs significantly better than Scudo in Bionic's real-world memory_replay traces (all times in milliseconds): +----------------+-------+----------+ | Trace | Scudo | jemalloc | +----------------+-------+----------+ | SQL | 27 | 21 | | Angry Birds 2 | 2236 | 1501 | | Camera | 4251 | 979 | | Candy Crush | 2197 | 1325 | | Gmail | 594 | 463 | | Maps | 434 | 344 | | Photos | 1330 | 477 | | PUBG | 666 | 416 | | surfaceflinger | 221 | 192 | | system_server | 1921 | 1416 | | SystemUI | 102 | 79 | | YouTube | 363 | 294 | +----------------+-------+----------+ jemalloc also tends to use slightly less memory than Scudo for most traces. These tests were conducted on desktop x86 Linux with glibc and the latest stable version of each allocator, but they should still be relevant. RSS values in KiB: +----------------+--------+----------+ | Trace | Scudo | jemalloc | +----------------+--------+----------+ | Angry Birds 2 | 793948 | 746992 | | Camera | 219372 | 251888 | | Candy Crush | 548288 | 550148 | | Gmail | 195236 | 193048 | | Maps | 159860 | 159816 | | Photos | 175436 | 171872 | | PUBG | 233752 | 223572 | | surfaceflinger | 94736 | 107068 | | system_server | 471048 | 484392 | | SystemUI | 54432 | 60740 | | YouTube | 139376 | 142252 | +----------------+--------+----------+ While not representative of real-world usage, jemalloc also performs fairly well in synthetic benchmarks (all times in nanoseconds): +-----------------+---------+----------+ | Benchmark | Scudo | jemalloc | +-----------------+---------+----------+ | alloc 8 | 87.9 | 60.1 | | alloc 16 | 87.9 | 60 | | alloc 32 | 88.6 | 60.7 | | alloc 64 | 88.6 | 59.7 | | alloc 512 | 89.2 | 60 | | alloc 1024 | 89.4 | 59.8 | | alloc 8192 | 89.8 | 65.2 | | alloc 16384 | 92.7 | 69.1 | | alloc 32768 | 97.2 | 74 | | alloc 65536 | 109 | 83.8 | | alloc 131072 | 41536 | 42720 | | alloc40x 8 | 2156 | 2556 | | alloc40x 16 | 2155 | 2244 | | alloc40x 32 | 2234 | 2312 | | alloc40x 64 | 2234 | 2289 | | alloc40x 512 | 2274 | 8171 | | alloc40x 1024 | 2397 | 2162 | | alloc40x 8192 | 3550 | 78880 | | alloc40x 16384 | 3732 | 124454 | | alloc40x 32768 | 3849 | 275460 | | alloc40x 65536 | 4987 | 727598 | | alloc40x 131072 | 2745207 | 3067980 | | alloc8192 1x | 464 | 454 | | alloc8192 2x | 510 | 488 | | alloc8192 3x | 587 | 523 | | alloc8192 4x | 665 | 557 | | alloc8192 5x | 742 | 598 | | alloc8192 6x | 818 | 633 | | alloc8192 7x | 884 | 669 | | alloc8192 8x | 960 | 699 | | alloc8192 9x | 1045 | 734 | | alloc8192 10x | 1131 | 770 | | alloc8192 11x | 1207 | 806 | | alloc8192 12x | 1282 | 841 | | alloc8192 13x | 1363 | 877 | | alloc8192 14x | 1442 | 912 | | alloc8192 15x | 1512 | 944 | | alloc8192 16x | 1587 | 978 | | alloc8192 24x | 2256 | 21195 | | alloc8192 32x | 2867 | 45446 | | alloc8192 40x | 3522 | 71618 | | alloc8192 48x | 4126 | 89740 | | alloc8192 56x | 4786 | 114990 | | alloc8192 64x | 5412 | 141082 | | alloc8192 72x | 6049 | 170742 | | alloc8192 80x | 6712 | 198480 | | alloc8192 88x | 7331 | 221557 | | alloc8192 96x | 7976 | 251462 | | alloc8192 104x | 8581 | 281626 | | alloc8192 112x | 9245 | 313164 | | alloc8192 120x | 9914 | 353147 | | alloc8192 128x | 10514 | 376625 | | alloc8192 136x | 11187 | 408194 | | alloc8192 144x | 11802 | 445694 | | alloc8192 160x | 13083 | 514547 | | alloc8192 176x | 14414 | 582501 | | alloc8192 192x | 15746 | 654346 | | alloc8192 208x | 17044 | 712620 | | alloc8192 224x | 18405 | 769963 | | alloc8192 240x | 19744 | 843969 | | alloc8192 256x | 21160 | 917803 | +-----------------+---------+----------+ Scudo performs fairly well for a hardened memory allocator, but we're optimizing for performance. Full benchmark data with graphs: https://docs.google.com/spreadsheets/d/1LG_kxaK5cI14gGtnyM-nNNmfpMdV9Vh-LtYoq7H5J4s/edit Change-Id: Ia4901eedfaa2c9779678c5b6532979de4919ee01 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Signed-off-by: Anush02198 <anush.4376@gmail.com> Signed-off-by: SayantamGiri <sayantam.giri@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for fca6939 - Browse repository at this point
Copy the full SHA fca6939View commit details -
Verify that allocated memory is always zeroed.
Test: New unit tests pass on scudo. Test: New unit tests fail on original jemalloc. Test: New unit tests pass on modified jemalloc. Change-Id: Id62ab74f649c0f7c14a951235fe79972926ecec0 Signed-off-by: minaripenguin37 <alexfinhart@gmail.com> Signed-off-by: Anush02198 <anush.4376@gmail.com> Signed-off-by: SayantamGiri <sayantam.giri@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 608ac5c - Browse repository at this point
Copy the full SHA 608ac5cView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff unity...part2