Commit graph

49861 commits

Author SHA1 Message Date
Josh Gao
6933d54e09 adbd: listen to all functionfs events.
Monitor for FUNCTIONFS_UNBIND as well, so that in the case where we get
FUNCTIONFS_BIND, FUNCTIONFS_UNBIND, FUNCTIONFS_BIND, we don't trigger an
assertion failure from seeing two FUNCTIONFS_BINDs.

Bug: http://b/129134256
Test: manual
Change-Id: I80af5f4b833513e932262638b9f8d76bbcb35504
2019-03-26 13:38:41 -07:00
Yifan Hong
f959fffc1c Merge changes from topic "lpdumpd"
* changes:
  libbase: realpath is wrapped with TEMP_FAILURE_RETRY
  liblp: Replace open with GetControlFileOrOpen
  init: expand prop in 'file'
  libcutils: android_get_control_file uses realpath.
2019-03-26 20:35:36 +00:00
Josh Gao
63b52ec13b adbd: increment writes_submitted_ before submitting writes.
If we fail to submit writes for some reason (e.g. the USB cable was
unplugged), another thread that's waiting on the write mutex can enter
SubmitWrites and attempt to resubmit the writes that we already failed
to submit, leading to a failed assertion of !IoBlock::pending.

Increment writes_submitted_ before actually calling io_submit, so we
skip over these writes and fall through to exit.

Bug: http://b/129134256
Test: manually unplugged a blueline
Change-Id: I2fd0034e45db22c8f637c81039ce686b7aa6a03b
2019-03-26 13:06:38 -07:00
Siarhei Vishniakou
6606d8df32 Logtags for com.android.server.policy
The definitions for event log tags are currently in system/core. Instead
of keeping them there, reserve a range for these event tags and move
them into com.android.server.policy.

Currently it is only used by PhoneWindowManager.

Bug: 128933363
Test: build only
Change-Id: Ida903499e9af8650299e3965787b4ac966b66915
2019-03-26 13:01:15 -07:00
Siarhei Vishniakou
6bd71b979c Logtags for com.android.server.policy
The definitions for event log tags are currently in system/core. Instead
of keeping them there, reserve a range for these event tags and move
them into com.android.server.policy.

Currently it is only used by PhoneWindowManager.

Bug: 128933363
Test: build only
Change-Id: Ida903499e9af8650299e3965787b4ac966b66915
Merged-In: Ida903499e9af8650299e3965787b4ac966b66915
2019-03-26 12:36:53 -07:00
Greg Kaiser
b49d9e19dc fastboot: Avoid extra std::string copies
The function do_for_partitions() takes a const std::string
reference, so it's inefficient to pass a std::string::c_str().

Test: TreeHugger
Change-Id: Ia84ed9ec691ee2f524c61dd25a81b2995bb0bb33
2019-03-26 12:04:05 -07:00
Greg Kaiser
e2125fdeb1 adb: Avoid extra std::string copies
When a function argument takes a std::string, it's inefficient to
pass std::string::c_str(), since that creates an additional copy.
So we change these calling sites.

Test: TreeHugger
Change-Id: I1c0fde7275eb3ebd3baf05ec62581b0243655608
2019-03-26 12:00:19 -07:00
Martin Stjernholm
adf4503de1 Apply the standard system linker config to all of /data.
This is necessary to get the correct APEX namespace setup for apps that
executes binaries from there.

In older releases no linker config applied to binaries in /data, so the
fallback config in /system/bin/linker was used, which basically just looked
up libraries in /system/{lib,lib64}. With the introduction of APEXes that
location no longer contains the complete set of libraries, so this is
necessary to retain functional parity.

Strictly speaking this fallback rule should apply as last resort for a
binary in any location, but the linker does not accept "dir.system = /".

Test: Flash and boot
Test: The app regression in b/128569634
Bug: 128569634
Change-Id: Icfcd66f0a7d8d898618be1b6186bb1111d20d688
2019-03-26 18:10:51 +00:00
Martin Stjernholm
5c074e0ab9 Remove links to libart(d).so in the runtime.
They are not needed since the binaries and relevant exported libraries have
moved to the Runtime APEX.

Test: Flash and boot
Test: atest CtsJniTestCases CtsJdwpTestCases
Bug: 119867084
Change-Id: If416fbae7057aec02059bb31a4dcd8b63dcc0cad
2019-03-26 17:24:12 +00:00
Nick Kralevich
a8fbf49748 Merge "Revert "libprocessgroup: make sure SetupCgroups is called once and only by init"" am: eac1220fba am: 138ab0ec52
am: f7c4bfd616

Change-Id: Iadb882806d934fc9c9bfc6fe69478edd805dddb0
2019-03-26 08:49:28 -07:00
Nick Kralevich
f7c4bfd616 Merge "Revert "libprocessgroup: make sure SetupCgroups is called once and only by init"" am: eac1220fba
am: 138ab0ec52

Change-Id: I4064836753d4c7eb19762c0258d3701619246dc5
2019-03-26 08:44:57 -07:00
Nick Kralevich
138ab0ec52 Merge "Revert "libprocessgroup: make sure SetupCgroups is called once and only by init""
am: eac1220fba

Change-Id: Ibf1ea3109f51b98ecfadf2fa6f8fa53c535c99a5
2019-03-26 08:40:42 -07:00
Nick Kralevich
eac1220fba Merge "Revert "libprocessgroup: make sure SetupCgroups is called once and only by init"" 2019-03-26 15:28:31 +00:00
Christopher Ferris
7813345faa Add BuildId to frame information.
Update debuggerd to print BuildId information by default.

Bug: 120975492

Test: New unit tests pass.
Test: debuggerd -b <PID> shows build id information.
Test: tombstones include build id information.
Change-Id: I019b031113d0b77385516223c63455b868924440
2019-03-26 08:04:40 -07:00
Pete Bentley
57616a7307 Merge "Tighten native API surface." am: d2c4eb0dae am: 5f920a0a57
am: ae89bfb67d

Change-Id: I73608d1d987c00a08452d98ebe13620eb1237d1b
2019-03-26 02:48:14 -07:00
Pete Bentley
ae89bfb67d Merge "Tighten native API surface." am: d2c4eb0dae
am: 5f920a0a57

Change-Id: I905d0e33099761a637c94b0d998199a71cdeae7c
2019-03-26 02:39:26 -07:00
Pete Bentley
5f920a0a57 Merge "Tighten native API surface."
am: d2c4eb0dae

Change-Id: I1733369762a612f53b23b8b4a5ce8d0ccc959d34
2019-03-26 02:30:52 -07:00
Pete Bentley
d2c4eb0dae Merge "Tighten native API surface." 2019-03-26 09:19:37 +00:00
Luke Huang
333671d94c Merge "Enlarge cmd buffer size of FrameworkListener" am: 5f890050b7 am: 0f419320d3
am: 8f0d3cdafa

Change-Id: Ia53874838d9887cec89137d630fa76843df722a2
2019-03-25 23:03:46 -07:00
Luke Huang
8f0d3cdafa Merge "Enlarge cmd buffer size of FrameworkListener" am: 5f890050b7
am: 0f419320d3

Change-Id: I3396300154582b0a14b1ed60e6d6dfd5243e0f0f
2019-03-25 23:00:36 -07:00
Luke Huang
0f419320d3 Merge "Enlarge cmd buffer size of FrameworkListener"
am: 5f890050b7

Change-Id: I91c8bc1e3199b3be40b0c716a8df4b822254def5
2019-03-25 22:55:24 -07:00
Luke Huang
5f890050b7 Merge "Enlarge cmd buffer size of FrameworkListener" 2019-03-26 05:44:10 +00:00
Suren Baghdasaryan
c8ac3b9152 Revert "libprocessgroup: make sure SetupCgroups is called once and only by init"
This reverts commit 798e805715.

Reason for revert: causes SELinux policy denials when vold calls KillProcessesWithOpenFiles.

Bug: 129298168
Change-Id: Ie00bfc2b743757209b40b55d2ee038d7d20c73ff
2019-03-26 02:49:13 +00:00
Josh Gao
c6ad69d1d4 liblog: don't return 0xFFFFFFFF as an invalid log id.
There are a bunch of branches that check "id >= LOG_ID_MAX", but because
C++ hates you, this does a promotion to signed int despite the
fact that both sides of the comparison are the same enum with an
underlying type of unsigned int. (C++17 §7.6.3)

Return LOG_ID_MAX instead of a value that gets promoted to signed -1, to
avoid this.

Bug: http://b/129272512
Test: /data/nativetest64/logcat-unit-tests/logcat-unit-tests
Change-Id: I4b3ee662d76d5cc80d9a9625d17f7e5b5980de41
2019-03-25 16:41:39 -07:00
Suren Baghdasaryan
df30064601 Merge "lmkd: Fix meminfo logs missing SwapTotal and having wrong field order" am: eedd5f6855 am: 318e33a401
am: 1b7fb341f1

Change-Id: I1187c9c2ab83a086807ca76bd2ca28da5cd0b808
2019-03-25 15:37:05 -07:00
Suren Baghdasaryan
1b7fb341f1 Merge "lmkd: Fix meminfo logs missing SwapTotal and having wrong field order" am: eedd5f6855
am: 318e33a401

Change-Id: I229f6f19e3f7a29793484dc53d2ae5c6af5de8f2
2019-03-25 15:33:07 -07:00
Suren Baghdasaryan
318e33a401 Merge "lmkd: Fix meminfo logs missing SwapTotal and having wrong field order"
am: eedd5f6855

Change-Id: I89f2abf04b6b50a69528ccd383b38bb83a8b164c
2019-03-25 15:28:17 -07:00
Suren Baghdasaryan
eedd5f6855 Merge "lmkd: Fix meminfo logs missing SwapTotal and having wrong field order" 2019-03-25 22:17:21 +00:00
Elliott Hughes
bd17187590 Merge "Add the two best build system janitors." am: 8a5a918ef8 am: b574250b5b
am: 3b06c428dd

Change-Id: I43b69832a34a3ec766c50b1b4d6e27a233f4c814
2019-03-25 13:53:28 -07:00
Suren Baghdasaryan
7824023e0e Merge "libprocessgroup: make sure SetupCgroups is called once and only by init" am: 7b2187c372 am: 7bb7f6ef28
am: bfdad9eaa2

Change-Id: Id15764d8292eb6cea58205e8beacb142175741e1
2019-03-25 13:50:27 -07:00
Elliott Hughes
3b06c428dd Merge "Add the two best build system janitors." am: 8a5a918ef8
am: b574250b5b

Change-Id: I9c2d88927a7edd4742018483dc9863cacd55e4aa
2019-03-25 13:50:01 -07:00
Suren Baghdasaryan
bfdad9eaa2 Merge "libprocessgroup: make sure SetupCgroups is called once and only by init" am: 7b2187c372
am: 7bb7f6ef28

Change-Id: Ibadde55dfd606723f03e9656ca176d540c566167
2019-03-25 13:44:30 -07:00
Elliott Hughes
b574250b5b Merge "Add the two best build system janitors."
am: 8a5a918ef8

Change-Id: I628b238ac8931b333ab9e33e8f3b56d648f2ae92
2019-03-25 13:44:29 -07:00
Suren Baghdasaryan
7bb7f6ef28 Merge "libprocessgroup: make sure SetupCgroups is called once and only by init"
am: 7b2187c372

Change-Id: I1b1562f7042de6268bcd238adfdad1e8ffe6629e
2019-03-25 13:40:13 -07:00
Treehugger Robot
8a5a918ef8 Merge "Add the two best build system janitors." 2019-03-25 20:35:13 +00:00
Yi Kong
cf62d32a4e Merge "[libbacktrace] Modernize code to use override keyword" am: 9b1f1ee4cc am: 280caf2e20
am: 0efc3585d6

Change-Id: I7d9b543c49d91088541c88f960955bb9ceef6e03
2019-03-25 13:33:22 -07:00
Suren Baghdasaryan
7b2187c372 Merge "libprocessgroup: make sure SetupCgroups is called once and only by init" 2019-03-25 20:24:51 +00:00
Yi Kong
0efc3585d6 Merge "[libbacktrace] Modernize code to use override keyword" am: 9b1f1ee4cc
am: 280caf2e20

Change-Id: I018e4dc5e1d2703061d7813625e45107e2d3e8d1
2019-03-25 13:19:30 -07:00
Yi Kong
280caf2e20 Merge "[libbacktrace] Modernize code to use override keyword"
am: 9b1f1ee4cc

Change-Id: I22432cdea88210e32f4f5b5cc83cdd275f1cd0cd
2019-03-25 13:13:30 -07:00
Yi Kong
9b1f1ee4cc Merge "[libbacktrace] Modernize code to use override keyword" 2019-03-25 19:56:48 +00:00
Vic Yang
0e18743952 Merge "Fix parse_apex_configs doc in README.md" am: 3d2fb41f17 am: 6c04c01306
am: 5111b8f068

Change-Id: I5e311d4c20ab0cd70301616b01507dc1b384b154
2019-03-25 12:25:17 -07:00
Vic Yang
5111b8f068 Merge "Fix parse_apex_configs doc in README.md" am: 3d2fb41f17
am: 6c04c01306

Change-Id: I4d6eff1d17e6d065192fbe324b892f70ebdff7f4
2019-03-25 12:21:11 -07:00
Vic Yang
6c04c01306 Merge "Fix parse_apex_configs doc in README.md"
am: 3d2fb41f17

Change-Id: I31a6ab1af4a97142dbf491fd3db3ef3a487f51d6
2019-03-25 12:11:39 -07:00
Treehugger Robot
3d2fb41f17 Merge "Fix parse_apex_configs doc in README.md" 2019-03-25 18:49:41 +00:00
Suren Baghdasaryan
5ce165ec2e lmkd: Fix meminfo logs missing SwapTotal and having wrong field order
Previous change If154dc364711bf7c86f32e24ddcd10be359386de called
"lmkd: Do not downgrade/ignore events when swap is full" added SwapTotal
into meminfo structure without adding the field into events.logtag file.
This results in logs which missing field and all fields starting with
"SwapFree" get reordered as a result. Fix this by adding the missing field
into events.logtag.

Bug: 129274901
Test: Confirm correct information in the logcat
Change-Id: Ia4de3790a7e9d49a0e4cba8b3161a715eaf6532e
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-25 11:04:11 -07:00
Elliott Hughes
d8a4f1463d Add the two best build system janitors.
Test: N/A
Change-Id: Ib5351b50652a7d1e0ab537aedfe6d4335f507cde
2019-03-25 10:25:13 -07:00
Elliott Hughes
ae2c2c5770 Merge "Clean up some mess by only building Android-specific code for the device." am: 443fdb2fdc am: 0fa7eddc31
am: 870413d411

Change-Id: I5ea2a7cf59c8ce5b7bc0a970237df17a69d08056
2019-03-25 09:43:43 -07:00
Elliott Hughes
870413d411 Merge "Clean up some mess by only building Android-specific code for the device." am: 443fdb2fdc
am: 0fa7eddc31

Change-Id: Ibf53e71d3a82dca02d76b193b71cf25a0b926e26
2019-03-25 09:39:32 -07:00
Elliott Hughes
0fa7eddc31 Merge "Clean up some mess by only building Android-specific code for the device."
am: 443fdb2fdc

Change-Id: I3ae6f0662bffd9cf81ae401e80821488cccd3933
2019-03-25 09:34:55 -07:00
Suren Baghdasaryan
798e805715 libprocessgroup: make sure SetupCgroups is called once and only by init
SetupCgroups is called by init process during early-init stage and is not
supposed to be called again by anyone else. Ensure that the caller is the
init process, make sure cgroup.rc file is written only one time, keep the
file descriptor to cgroup.rc file open by the init process to ensure all
its further mappings stay valid even if the file is deleted.

Bug: 124774415
Test: build, run, verify no errors or warning in the logcat

Change-Id: I70ccec551fc07c380333566f618b969667dcf783
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-25 16:22:10 +00:00