Commit Graph

51490 Commits

Author SHA1 Message Date
Ryan Prichard 8c733615aa Make android_load_sphal_library thread-safe
Also: remove an obsolete comment from linker_test.cpp. The test program is
at /data/nativetest[64]/libvndksupport-tests/libvndksupport-tests, which
may will be in the system or legacy configuration, and either the "sphal"
or "default" namespace will be visible.

Bug: none
Test: run libvndksupport-tests, device boots
Change-Id: I5e33e5bf1402a0368e046b03827c216789b02c96
2019-07-15 13:58:51 -07:00
Ryan Prichard 807d9d62d8 Switch libvndksupport's linker.c to C++
Bug: none
Test: device boots
Change-Id: I64237006a7f903647c8d8f7ca681b1da23ac53a9
2019-07-15 13:43:05 -07:00
Daniel Rosenberg e48e3c8931 Merge "Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev
am: 11bf3545ab

Change-Id: I33b45da532ba677053c0866504a22ca43b1284b2
2019-07-15 13:22:02 -07:00
Daniel Rosenberg 11bf3545ab Merge "Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev 2019-07-15 19:56:35 +00:00
Tom Cherry 2e4c85f157 init: clean up file / socket descriptor creation
clang-tidy hinted that some of this code wasn't right.  Looking
deeper, there is really not much related to file and socket
descriptors, except that they're published in similar ways to the
environment.  All of the abstraction into a 'Descriptor' class takes
us further away from specifying what we really mean.

This removes that abstraction, adds stricter checks and better errors
for parsing init scripts, reports sockets and files that are unable to
be acquired before exec, and updates the README.md for the passcred
option.

Test: build, logd (uses files and sockets) works
Change-Id: I59e611e95c85bdbefa779ef69b32b9dd4ee203e2
2019-07-15 12:17:30 -07:00
Mark Salyzyn d5ebef055f Merge "bootstat: power_on* handling" am: 91338a6aa2
am: 61c7cc6d88

Change-Id: I88c240b3f730095237f0c79d2e15f3385c3ce7a1
2019-07-15 09:09:57 -07:00
Mark Salyzyn 61c7cc6d88 Merge "bootstat: power_on* handling"
am: 91338a6aa2

Change-Id: Ia3cccc615dbb49c3624e73ea248b9e3c5d0ad61d
2019-07-15 08:59:33 -07:00
Tom Cherry dc4c49dfb7 Merge "Add noexcept to missing places in expected.h" am: a8b0517108
am: e1f381603d

Change-Id: I9077197896d325c31df172eeb91ef8ca67ade847
2019-07-15 08:50:27 -07:00
Mark Salyzyn 91338a6aa2 Merge "bootstat: power_on* handling" 2019-07-15 15:47:04 +00:00
Tom Cherry e1f381603d Merge "Add noexcept to missing places in expected.h"
am: a8b0517108

Change-Id: I414d6976260249be40b9c8e99dc8a8798089b6d6
2019-07-15 08:42:29 -07:00
Tom Cherry a8b0517108 Merge "Add noexcept to missing places in expected.h" 2019-07-15 15:12:46 +00:00
David Anderson 8c46ed850a Merge "fs_mgr: Remove the timeout parameter to DestroyLogicalPartition." am: cd22e3a6f6
am: 8c3c846cf3

Change-Id: Ia3b4809899e08c9ce6c62d0aaca4757d8e02f812
2019-07-13 11:26:09 -07:00
David Anderson 8c3c846cf3 Merge "fs_mgr: Remove the timeout parameter to DestroyLogicalPartition."
am: cd22e3a6f6

Change-Id: Ia3e60d52b9a6e6f9549ed0d9b07aee80dcba16d2
2019-07-13 11:18:07 -07:00
David Anderson cd22e3a6f6 Merge "fs_mgr: Remove the timeout parameter to DestroyLogicalPartition." 2019-07-13 18:02:05 +00:00
David Anderson 838a351a58 Merge "libdm: Improve the reliability of dm device paths." am: c9b797ac25
am: 92c53170f3

Change-Id: Ia9021b240b97fef1cf71a11bc05c2a72b2025e00
2019-07-12 16:51:48 -07:00
Daniel Rosenberg 35708b9d7b Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""
This reverts commit 997a2d93d7.

Reason for revert: This revert is needed, just also need some selinux rules for changes to the script that runs if this folder is present.

Bug: 136199978
Change-Id: Ie0544954965e3c90abc2f833c41949976c3bea65
2019-07-12 23:43:56 +00:00
Christopher Ferris 504d2cce64 Optimize code that only uses PageMap call.
Some code only wants to use PageMap to determine whether pages are
mapped in to memory. Modify the code to optimize this path.

Changes:
- Add a function that doesn't read all of usage stats data for every
  map. This operation is extremely expensive, and some code doesn't
  care about it.
- Optimize the PageMap call to do a single read instead of a single
  read per page.
- Add unit tests for these changes.

Bug: 136245508

Test: Ran new unit tests.
Test: Ran procrank and verified data looks good.
Test: Ran DexDiag art tests.
Change-Id: I37d03f2584551d26cb20be3abacdb958111d4eca
2019-07-12 16:28:09 -07:00
David Anderson 92c53170f3 Merge "libdm: Improve the reliability of dm device paths."
am: c9b797ac25

Change-Id: I30a3bf89f71269b0072dad4f73e6b74273ea031a
2019-07-12 16:24:39 -07:00
David Anderson c9b797ac25 Merge "libdm: Improve the reliability of dm device paths." 2019-07-12 23:03:41 +00:00
Suren Baghdasaryan 719f2002a1 Merge "lmkd: Prevent non-main threads being registered or killed by lmkd" am: e0b729d214
am: 771882633e

Change-Id: I8fb3d17c8fcccd2ff3ae1bf2b923b58ddece7d25
2019-07-12 13:49:48 -07:00
Suren Baghdasaryan 771882633e Merge "lmkd: Prevent non-main threads being registered or killed by lmkd"
am: e0b729d214

Change-Id: I11738b8c2c7acfa4947976e8b12ac9b94e7fc8ac
2019-07-12 13:39:47 -07:00
Suren Baghdasaryan e0b729d214 Merge "lmkd: Prevent non-main threads being registered or killed by lmkd" 2019-07-12 20:13:35 +00:00
Tom Cherry 1154df5366 Merge "init: fix clang-tidy performance issues" am: 8a779ee959
am: fcbc44a371

Change-Id: I57a5808ced1b7ce642b9643b7d46fc5915b25d4d
2019-07-12 12:10:57 -07:00
Mark Salyzyn be843115fc Merge "fs_mgr: overlay: do not allow sub-mounts to be overridden" am: bde9fc1787
am: bdd1ce8538

Change-Id: I53eb16e4e61e899dab6e99a05bec9c69b98ec1d9
2019-07-12 12:10:22 -07:00
Tom Cherry fcbc44a371 Merge "init: fix clang-tidy performance issues"
am: 8a779ee959

Change-Id: Ifeba3b1a962c33cf355fa897a7177845630be16a
2019-07-12 12:00:56 -07:00
Mark Salyzyn bdd1ce8538 Merge "fs_mgr: overlay: do not allow sub-mounts to be overridden"
am: bde9fc1787

Change-Id: I115026d227ceb9950020ebc97694d72c1fc04329
2019-07-12 12:00:19 -07:00
Tom Cherry 8a779ee959 Merge "init: fix clang-tidy performance issues" 2019-07-12 18:49:49 +00:00
Daniel Norman 739447f024 Merge "Checks the interface inheritance hierarchy in init_rc files." am: 4b505fe3a8
am: 08c1556641

Change-Id: I03e1cd45e9a8370df71829015903facbed6c9171
2019-07-12 11:41:44 -07:00
Treehugger Robot bde9fc1787 Merge "fs_mgr: overlay: do not allow sub-mounts to be overridden" 2019-07-12 18:38:39 +00:00
Daniel Norman 08c1556641 Merge "Checks the interface inheritance hierarchy in init_rc files."
am: 4b505fe3a8

Change-Id: Ic479fb46d293260589154c6ce0bf844952c8dd26
2019-07-12 11:32:48 -07:00
Tom Cherry cc9d1e20e8 Merge "init: Write the reason in BCB on "reboot recovery"" am: e7a010de01
am: da80b0debc

Change-Id: Iafb8f0493bbfdbc0817d8c2877dab08b03a97739
2019-07-12 11:03:03 -07:00
Daniel Norman 4b505fe3a8 Merge "Checks the interface inheritance hierarchy in init_rc files." 2019-07-12 18:01:46 +00:00
Tom Cherry da80b0debc Merge "init: Write the reason in BCB on "reboot recovery""
am: e7a010de01

Change-Id: I3c627e207396e754b56a00d6919ef5a8c2b459b7
2019-07-12 10:54:42 -07:00
Mark Salyzyn 30ea453059 Merge "init: powerctl support and propagate longer canonical reboot reasons." am: 5c296a0003
am: 3efb204d73

Change-Id: I7f5c94b7c3f9e4a7a6e313b5e87d71a9972aefd7
2019-07-12 10:53:05 -07:00
Mark Salyzyn 3efb204d73 Merge "init: powerctl support and propagate longer canonical reboot reasons."
am: 5c296a0003

Change-Id: Ief8ece1dd4dda9315bc3d0b0213c518a1af2f721
2019-07-12 10:42:02 -07:00
Tom Cherry e7a010de01 Merge "init: Write the reason in BCB on "reboot recovery"" 2019-07-12 17:39:32 +00:00
Treehugger Robot 5c296a0003 Merge "init: powerctl support and propagate longer canonical reboot reasons." 2019-07-12 17:37:25 +00:00
Gerry Fan 3f17869556 Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev
am: ff7da227db

Change-Id: I6f6ec4b8472a3017c47d49a910e9ca982cae6eff
2019-07-12 10:24:00 -07:00
Steven Moreland 023a4282e0 Merge "libutils: remove references to unimplemented func" am: 67a0dd4e27
am: 4f8a4b095d

Change-Id: I59478690f8c6d78eea7fb9d6accc81f053c7ae5d
2019-07-12 10:20:33 -07:00
Steven Moreland e482b3a98f Merge "libadbd_services: remove unused deps" am: a1821e13f3
am: 1c9abb85cb

Change-Id: Ia37257bdda219c46b6e2a7dd5b54062cdd1c45cc
2019-07-12 10:19:48 -07:00
Steven Moreland 4f8a4b095d Merge "libutils: remove references to unimplemented func"
am: 67a0dd4e27

Change-Id: I5d7f1e8f3fa31054338973f1c66f2d56fddc1428
2019-07-12 10:11:35 -07:00
Gerry Fan ff7da227db Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev 2019-07-12 17:11:23 +00:00
Steven Moreland 1c9abb85cb Merge "libadbd_services: remove unused deps"
am: a1821e13f3

Change-Id: I8ebee3fde274c70f60b3419c3dc920de51a87213
2019-07-12 10:10:55 -07:00
Steven Moreland 67a0dd4e27 Merge "libutils: remove references to unimplemented func" 2019-07-12 16:48:04 +00:00
Steven Moreland a1821e13f3 Merge "libadbd_services: remove unused deps" 2019-07-12 16:36:16 +00:00
Gerry Fan 997a2d93d7 Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""
This reverts commit 891a011394.

Reason for revert: Some Test failed, need more investigation

Bug: 136199978
Change-Id: Ibad0dad02a6701447c39ddcc805d44c9e68bdcce
2019-07-12 15:23:12 +00:00
Suren Baghdasaryan 0082ef15cf lmkd: Prevent non-main threads being registered or killed by lmkd
Only thread group leaders should be registered with lmkd. Add a check to
ignore any non-leader TIDs and generate an error if such condition is
detected. Run the same check before killing a process to detect cases of
non-leader TIDs being used to kill a process. This might happen if PIDs
overflow and previously registered PID gets reused for a non-leader
thread in the following scenario:

1. pid X is a thread group leader and is registered with lmkd
2. pid X dies without lmkd knowing it and pid gets recycled
3. process Y creates a thread with tid X
4. lmkd kills pid X which results in process Y being killed

Bug: 136408020
Test: lmkd_unit_test
Change-Id: I46c5a0b273f2b72cefc20ec59b80b4393f2a1a37
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-07-12 15:11:54 +00:00
Hung-ying Tyan 3061693f5d Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev
am: 346c17bbc9

Change-Id: I1c99ad74d9b1ee7e486183b4c62ec732d2d23114
2019-07-12 02:49:38 -07:00
Hung-ying Tyan 346c17bbc9 Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev 2019-07-12 09:27:01 +00:00
Kiyoung Kim 74c229232c Run linkerconfig from init process
Create linkerconfig tmpfs mount and create ld.config.txt using
linkerconfig during init

Bug: 135004088
Test: m -j & tested from device
Change-Id: Iea30259871ef26d6c04beebf42b17ba7b494db0d
2019-07-12 12:27:11 +09:00