summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cutils: move hashmap to <pthread.h>.Elliott Hughes2018-07-131-1/+1
| | | | | | Bug: N/A Test: builds Change-Id: I16a470265a17ea5bd47ef76ec234907cf7ec3e4f
* libcutils: remove unused open_memstream.Elliott Hughes2018-07-111-1/+0
| | | | | | Bug: N/A Test: builds Change-Id: I3c2d8acd4dfe42fbe883b14501cd47674d84f431
* Mark as recovery_available: trueJiyong Park2018-05-141-0/+2
| | | | | | | | | | | | Libraries that are direct or indirect dependencies of modules installed to recovery partition (e.g. toybox) are marked as recovery_available: true. This allows a recovery variant of the lib is created when it is depended by other recovery or recovery_available modules. Bug: 67916654 Bug: 64960723 Test: m -j Change-Id: Ie59155c08890e96ce1893fa3687afcf763d7aea3
* libctuils: Exclude qtaguid.cpp from VNDK-SP variantLogan Chien2018-05-081-0/+9
| | | | | | | | | | | | | | | | | | | This commit excludes `qtaguid.cpp` from the VNDK-SP variant of `libcutils.so` because the interface of `libnetd_client.so` may vary between AOSP releases. Besides, these functions don't work in vendor processes either because VNDK-SP libraries are loaded in an isolated `vndk` linker namespace, which cannot access `/system/lib[64]/libnetd_client.so` directly. This change makes it easier to spot the issue at build time and saves several bytes. Test: Build aosp_walleye-userdebug and /system/lib[64]/vndk-sp-$VER/libctuils.so no longer exports qtaguid_* functions. Bug: 79329469 Change-Id: Idf6b60f6e58371ea320193641669d1e4412d62b8
* Rewrite get_sched_policy_name for safety.Elliott Hughes2018-04-251-0/+1
| | | | | | | | | | | | This way you'll get a build time error if you make the usual mistake of adding to the enum but not adding an entry to the array. Also improve the unit tests, and fix get_sched_policy_name's incorrect behavior on invalid inputs. Bug: N/A Test: ran tests Change-Id: Iefcb1ec9ef66267837da7a576c8be3d0cfb16cd0
* Use override_export_include_dirs.Steven Moreland2018-01-051-1/+1
| | | | | | Bug: 62878521 Test: soong build system finds renamed attribute Change-Id: I51e42f4378db366b8711cd373fb835fecda88416
* Better, consistent definition of AID_SHARED_GID.Jeff Sharkey2017-11-131-1/+1
| | | | | | | | | | | | | | AID_SHARED_GID is a GID shared by a specific app across all users on the same device. Bring the UserHandle and multiuser.c implementations into agreement, and copy/paste the unit tests that verify that both behave identically. This fixes a regression where multiuser_get_shared_gid() was applying per-user isolation when it shouldn't have. Test: adb shell /data/nativetest64/libcutils_test/libcutils_test64 Bug: 34151068, 64548938 Change-Id: I491dd79d23a214425a68865d1d0f8269916aad4c
* Remove dead dlmalloc stubs.Elliott Hughes2017-11-101-4/+0
| | | | | | | | Used to be used by ART, but long gone. Bug: N/A Test: ran tests Change-Id: Id231d97b2b797562619e6fd90536b17dbe39f71e
* Move libcutils source to C++.Elliott Hughes2017-11-101-24/+24
| | | | | | | | | | | | | | | | | Just the minimial changes to get this to actually build, because otherwise we always bog down trying to rewrite everything (when the real answer is usually "stop using libcutils, it's awful"). This doesn't move a handful of files: two are basically just BSD libc source, a couple have outstanding code reviews, and one can be deleted (but I'll do that in a separate change). I'm also skipping the presubmit hooks because otherwise clang-format wants to reformat everything. I'll follow up with that... Bug: N/A Test: builds Change-Id: I06403f465b67c8e493bad466dd76b1151eed5993
* Merge changes from topic "qtaguidReplace"Treehugger Robot2017-11-101-1/+1
|\ | | | | | | | | | | * changes: Redirect qtaguid native call to netd fwmark client Move qtaguid API out of libcutils
| * Redirect qtaguid native call to netd fwmark clientChenbo Feng2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In order to replace qtaguid module with new eBPF network monitoring module. We firstly move the current qtaguid userspace implementation into netd and hide the detail from other processes. The current API will talk to netd fwmark client to pass down the qtaguid related request from high level framework and netd will use the proper method to complete the request. Test: Current TrafficStats CTS tests should not fail. Bug: 30950746 Change-Id: Ie90c28f3594ab2877746b2372a1b6944768bfb18
* | libcutils: Work around the lack of __mulodi4Luis Hector Chavez2017-11-031-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | The parent change ran into an issue where enabling UBSan on an i686 build caused it to use __mulodi4. https://github.com/android-ndk/ndk/issues/184 documents linking against libclang_rt.builtins-i686.a, but that's not available from soong either. Bug: 62378620 Bug: 29412086 Test: x86 builds work again Change-Id: I730d59558aa4ed28f8a11b5393e037111e320f29
* | libcutils: Make uevent_kernel_* namespace-awareLuis Hector Chavez2017-11-031-1/+1
|/ | | | | | | | | | | | | | | | | This change adds user namespace-awareness to uevent_kernel_* in libcutils. Instead of assuming that root is always uid 0, it detects whether the uid 0 is mapped in the current user namespace and returns the appropriately mapped uid (or the kernel's "overflowuid" in case it is not mapped). In older kernels, or those where user namespaces are not enabled, this still uses uid 0 for root. Bug: 62378620 Test: bullhead networking still works Test: Android in Chrome OS can now receive netlink-related messages Change-Id: I7ea3454e8f38b9c70c65294d6b2a99e5a88f9d70
* Mark the modules as VNDK-SP in Android.bpJustin Yun2017-08-231-0/+4
| | | | | | | | | | | | | | | | | | | | As a VNDK-SP module, Android.bp must have 'vndk' tag as well as 'vendor_available: true'. The 'vndk' tag for VNDK-SP formated as follows: vndk: { enabled: true, support_system_process: true, }, VNDK-SP modules will be installed both in system/lib(64) as normal and in system/lib(64)/vndk-sp as a vendor variant. Bug: 63866913 Test: build and boot with BOARD_VNDK_VERSION=current Merged-In: I51fe0859f63ad58b7b91909e7d7d4206443228cd Change-Id: I51fe0859f63ad58b7b91909e7d7d4206443228cd (cherry picked from commit aeb68e86e4e335d4b201c46099cc2ce1256beec2)
* Remove private headers from libcutils.vendorYifan Hong2017-08-021-0/+1
| | | | | | | | | | | Bug: 63135587 Test: m -j Test: BOARD_VNDK_VERSION=current m -j Test: mma -j Test: BOARD_VNDK_VERSION=current mma -j Change-Id: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513 Merged-In: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513
* Remove LOCAL_CLANG and clang: trueLennart Wieboldt2017-07-251-2/+0
| | | | | | | | clang is the default compiler since Android nougat Test: mma & verified it´s still build with clang Change-Id: I34adaeef2f6558a09f26027271222bad94780507 Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
* libcutils: convert fs_config.cppMark Salyzyn2017-05-031-1/+4
| | | | | | | | C++ify fs_config.c Test: gTest libcutils-test Bug: 37703469 Change-Id: Id48ae22f203ed923942257575296c69b32345ae6
* libcutils: vendor_availableSteven Moreland2017-04-191-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By setting vendor_available, the following may become true: * a prebuilt library from this release may be used at runtime by in a later releasse (by vendor code compiled against this release). so this library shouldn't depend on runtime state that may change in the future. * this library may be loaded twice into a single process (potentially an old version and a newer version). The symbols will be isolated using linker namespaces, but this may break assumptions about 1 library in 1 process (your singletons will run twice). Background: This means that these modules may be built and installed twice -- once for the system partition and once for the vendor partition. The system version will build just like today, and will be used by the framework components on /system. The vendor version will build against a reduced set of exports and libraries -- similar to, but separate from, the NDK. This means that all your dependencies must also mark vendor_available. At runtime, /system binaries will load libraries from /system/lib*, while /vendor binaries will load libraries from /vendor/lib*. There are some exceptions in both directions -- bionic(libc,etc) and liblog are always loaded from /system. And SP-HALs (OpenGL, etc) may load /vendor code into /system processes, but the dependencies of those libraries will load from /vendor until it reaches a library that's always on /system. In the SP-HAL case, if both framework and vendor libraries depend on a library of the same name, both versions will be loaded, but they will be isolated from each other. It's possible to compile differently -- reducing your source files, exporting different include directories, etc. For details see: https://android-review.googlesource.com/368372 None of this is enabled unless the device opts into the system/vendor split with BOARD_VNDK_VERSION := current. Bug: 36426473 Bug: 36079834 Test: m -j libcutils Test: attempt to compile with BOARD_VNDK_VERSION := current Test: (sanity) boot internal marlin (cherry picked from commit 9610c548a8e9018ecdfbe3d7204e8fd70d2554fc) Merged-In: I76f9b28ef08a26d84d1365881e00696cc1dcfe5d Change-Id: I76f9b28ef08a26d84d1365881e00696cc1dcfe5d
* libcutils: compile with BOARD_VNDK_VERSION currentSteven Moreland2017-04-171-1/+4
| | | | | | | | | | | | | | | | | | | - moved __android_log_is_debuggable to a new public header (log_properties.h) - vendor version of sched_policy uses ALOG* instead SLOG* Test: (sanity) liblog-unit-tests Test: (sanity) libcutils_test (noting b/b/32972117, two tests continue to fail) Test: system/core as a whole makes with BOARD_VNDK_VERSION := current now with no problems. Test: boots/works on internal marlin Bug: 33241851 (cherry picked from commit 1f83aa424f537cf3f07e1d27dbbcc524818b5358) Merged-In: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640 Change-Id: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
* adb: don't try to resolve 'localhost'Josh Gao2017-04-121-1/+0
| | | | | | | | | | | | | | | Misconfigured systems can have localhost pointing to an address that isn't 127.0.0.1 or ::1. adb is the only caller of the libcutils socket_loopback functions, so move them into adb and switch the implementations over to using INADDR_LOOPBACK and in6addr_loopback, instead of resolving 'localhost' when connecting. Bug: http://b/37282612 Test: `killall adb; adb shell` Test: `killall adb; ip addr del 127.0.0.1/8 dev lo; adb shell` Change-Id: I01c1885f1d9757ad0f7b353dd04b4d1f057741c8
* Enable more modules on linux_bionic buildsDan Willemsen2017-03-151-4/+10
| | | | | | Bug: 31559095 Test: Enable host bionic, run soong Change-Id: Ib4ebd909322cf464b6a40040e4b60ece7d905b6f
* Removed cpusets/schedboost build time dependency.Isaac Chen2017-02-201-9/+1
| | | | | | | | | | | | | | | | | | | | These two Soong product_variables were usually controlled by ENABLE_CPUSETS and ENABLE_SCHEDBOOST in BoardConfig.mk. This change turns the build time variables into runtime decision by checking if a special file, "tasks", can be found under the mount points, /dev/cpuset and /dev/stune, for cpusets and schedboost, respectively. That special file only exists when the corresponding Linux kernel configurations, CONFIG_CPUSETS and CONFIG_SCHEDTUNE, are set. Bug: 34726944 Test: Tested on Sailfish with following configurations neither cpuset nor schedtune enabled in the kernel cpuset enabled, but schedtune disabled in the kernel both cpuset and schedtune enabled in the kernel Change-Id: I6695b8b32b2fecb4fd995018418bbe2edc5d590f
* Disable integer sanitization on host.Evgenii Stepanov2017-01-311-3/+3
| | | | | Test: NFC until https://android-review.googlesource.com/#/c/329510 Change-Id: I4d1bb66821b2984bbee12438cfd72b9b63d56605
* Merge "Support arbitrary-length properties in property_list."Treehugger Robot2017-01-261-1/+1
|\
| * Support arbitrary-length properties in property_list.Elliott Hughes2017-01-261-1/+1
| | | | | | | | | | | | Bug: http://b/33926793 Test: visual inspection Change-Id: Ida84c3aaafa5411a9886f8d3d45679fd60ddc00d
* | Revert "Revert "Exporting C headers from system/core""Vijay Venkatraman2017-01-251-0/+21
|/ | | | | | | This reverts commit a3f2be2b73cebb057218db2a19e8fad04ecb88f6. Test: compile Change-Id: I04b3a8e47e1fa3eb9d80c14ae3a90c68a780e858
* Revert "Exporting C headers from system/core"Vijay Venkatraman2017-01-241-21/+0
| | | | | | This reverts commit 3c6763ca21c1150d66daf8fde9b440b1c3219fe6. Change-Id: If3b3e106478d28a5df927d57649abdca0a99dd0e
* Exporting C headers from system/coreVijay Venkatraman2017-01-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Moved headers from include/libcutils and include/liblog to libcutils/include and liblog/include respectively, so they can be exported via these libs. They needed to be moved since Soong does not allow export from external folder. Added symlink from old locations. They are needed since Soong includes system/core/include by default. Once all modules are cleaned up to explicitly add the required libs, the symlinks will be removed. Also added liblog_vndk_headers that exports a special log/log.h for VNDK. Moved headers of libcutils to libcutils_headers. They should be used by modules for header-only inlines. Added libcutils_headers as dependency of libcutils. Added libcutils_vndk_headers that exports a special cutils/log.h deprecating usage of the file. A later CL will deprecate the one in libcutils_headers Test: Add above libs to shared lib of local module Change-Id: I6e1f9c5f23d8b6eae13dc3b7e5dfe7fae93b8510
* debuggerd: advance our amazing bet.Josh Gao2017-01-171-4/+0
| | | | | | | | | Remove debuggerd in favor of a helper process that gets execed by crashing processes. Bug: http://b/30705528 Test: debuggerd_test Change-Id: I9906c69473989cbf7fe5ea6cccf9a9c563d75906
* libcutils: move cutils/files.h to cutils/android_get_control_file.hMark Salyzyn2016-11-161-1/+1
| | | | | | | | | | files.[h|cpp] is bound to be abused with junk, replace with android_get_control_file.[h|cpp]. Plus some sundry cleanup. Test: gTest libcutils-tests, logd-unit-tests, liblog-unit-tests, logcat-unit-tests and init_tests Bug: 32450474 Change-Id: Ibd4a7aa4624ea19a43d1f98a3c71ac37805d36b5
* libcutils: add android_get_control_file()Mark Salyzyn2016-11-031-0/+1
| | | | | | | | | | | | | | | | | | | | | Solve one more issue where privilege is required to open a file and we do not want to grant such to the service. This is the client side of the picture, init is the server. The file's descriptor was placed into the environment as "ANDROID_FILE_<path>" where non-alpha and non-numeric characters in the <path> are replaced with _ and this function picks the file descriptor up. Added definition ANDROID_FILE_ENV_PREFIX ("ANDROID_FILE_") and android_get_control_file() prototype in a new include <cutils/files.h> android_get_control_file() checks if the resulting file descriptor is valid, open and matches the name reference, which on purpose will fail if a symbolic link is in the path rather than using a fully qualified path. Add gTest unit test for both. Test: gTest libcutils_test --gtest_filter=FileTest.android_get_control_file Bug: 32450474 Change-Id: I2d0310a1727f1e393a00d9fc7e6cf5d028f27905
* Merge "Remove socket_loopback_client."Treehugger Robot2016-10-141-1/+0
|\
| * Remove socket_loopback_client.Elliott Hughes2016-10-131-1/+0
| | | | | | | | | | | | Bug: http://b/31537253 Test: builds Change-Id: If02c8107206fb60e4622f8937bee0d0a362e1c7d
* | Merge "Rely on the platform -std default."Treehugger Robot2016-10-131-4/+0
|\ \ | |/ |/|
| * Rely on the platform -std default.Elliott Hughes2016-10-101-4/+0
| | | | | | | | | | | | Bug: http://b/32019064 Test: builds Change-Id: I18a1d816d63b64601485045070851f32d44e85eb
* | Revert "Revert "Revert "Revert "Remove liblog from libcutils as a whole ↵Dimitry Ivanov2016-10-071-6/+0
| | | | | | | | | | | | | | | | | | | | static lib"""" This reverts commit 6a452917b34ac2ac6f90840186342f718af54ef0. Bug: http://b/31289077 Bug: http://b/27171986 Change-Id: Id020fa10c50847bf16a2fcbc7d5e72cf8766b711
* | Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib"""John Reck2016-10-071-0/+6
| | | | | | | | | | | | | | | | This reverts commit 595c1480d08b95bb2daaf5211e9b886ece13ef2f. Revert reason: broke bullhead-eng build in master Change-Id: Ie64fc31c3c971366ab9f2543b91b8f5d2040868b
* | Revert "Revert "Remove liblog from libcutils as a whole static lib""Dimitry Ivanov2016-10-061-6/+0
|/ | | | | | | | This reverts commit f93d732a45356141976844b416a36696bf2efaed. Bug: http://b/31289077 Bug: http://b/27171986 Change-Id: Ib6e6c0a01296f0a01d98cbf1a9d2659883280d44
* Revert "Remove liblog from libcutils as a whole static lib"Dimitry Ivanov2016-10-031-0/+6
| | | | | | | | This reverts commit 6dd58c00ca797de55361d2df455c1f9434811b9e. Bug: http://b/31289077 Bug: http://b/27171986 Change-Id: I519d77de118f02346a4f89b197ca4df7e9f883ac
* Remove liblog from libcutils as a whole static libDimitry Ivanov2016-10-031-6/+0
| | | | | | | | | libcutils no longer needs to export liblog symbols. Bug: http://b/31289077 Bug: http://b/27171986 Test: make Change-Id: I546a5bce56c0c88ac2493c320298d4dc13954566
* Remove process_name.cDmitriy Filchenko2016-08-181-1/+0
| | | | | | BUG: 29824203 Change-Id: I88d67cafb8ec0c4eea3db047bac0671de698ba02
* libcutils: Switch to Android.bpDan Willemsen2016-07-121-0/+155
Change-Id: If36cb30e8e4432f1a5c7f9a6d30a75c012a4c67c