Commit graph

45411 commits

Author SHA1 Message Date
Suren Baghdasaryan
b5f684bc91 Fix non-Android build targets
am: eca87cb9ca

Change-Id: I4b0305619c91041bf7b844201f23437df06864b9
2019-02-03 20:18:21 -08:00
Suren Baghdasaryan
67fe58e044 init: Replace cgroup hardcoded path with detected one
am: e01ae8deca

Change-Id: I224866a82e31d20aa415b65ea08bf8639ea6cc7b
2019-02-03 20:17:07 -08:00
Suren Baghdasaryan
953472f577 libprocessgroup: Add support for task profiles
am: 82b72a5667

Change-Id: If702ad510ae31619d53f82844d7beeff5ee56682
2019-02-03 20:15:41 -08:00
Suren Baghdasaryan
5ed586fd12 rootdir: Add cgroups and task profiles description files
am: 503cf84f76

Change-Id: Ic7eed97ab887bf2ba4e736a3e3226eef9f2e31ff
2019-02-03 20:13:57 -08:00
Suren Baghdasaryan
eca87cb9ca Fix non-Android build targets
Non-Android build targets are missing sys/prctl.h header and functionality
should be disabled for them like it was done previously inside
sched_policy.cpp. Also make the set_sched_policy/get_sched_policy
functionality backward compatible by creating stubs for non-Android
targets.

Bug: 111307099
Test: built sdk_gphone_x86-sdk_addon_mac target using forrest

Change-Id: I1c195267e287a84a21c588bd61d7c452bff6cfbe
Merged-In: I1c195267e287a84a21c588bd61d7c452bff6cfbe
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-03 16:49:28 +00:00
Suren Baghdasaryan
e01ae8deca init: Replace cgroup hardcoded path with detected one
Remove hardcoded cpuset path usage and replace it with a request to
get the path using new API.

Exempt-From-Owner-Approval: already approved in internal master

Bug: 111307099
Test: builds, boots

Change-Id: I211d093c24a682e2d1992c08e4c1d980379711a4
Merged-In: I211d093c24a682e2d1992c08e4c1d980379711a4
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-03 16:49:08 +00:00
Suren Baghdasaryan
82b72a5667 libprocessgroup: Add support for task profiles
Abstract usage of cgroups into task profiles that allows for changes
in cgroup hierarchy and version without affecting framework codebase.
Rework current processgroup and sched_policy API function implementations
to use task profiles instead of hardcoded paths and attributes.
Mount cgroups using information from cgroups.json rather than from init.rc

Exempt-From-Owner-Approval: already approved in internal master

Bug: 111307099
Test: builds, boots

Change-Id: If5532d6dc570add825cebd5b5148e00c7d688e32
Merged-In: If5532d6dc570add825cebd5b5148e00c7d688e32
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-03 16:48:35 +00:00
Suren Baghdasaryan
503cf84f76 rootdir: Add cgroups and task profiles description files
Add cgroups.json and task_profiles.json file to be places under /etc/ on
the device to describe cgroups to be mounted and task profiles that
processes can request. This adds additional layer of abstraction between
what a process wants to achieve and how system implements that request.

Bug: 111307099
test: builds, boots

Change-Id: If92f011230ef5d24750e184bad776f30ba226f86
Merged-In: If92f011230ef5d24750e184bad776f30ba226f86
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-02 21:28:05 -08:00
Chenbo Feng
983f1ef135 Merge "Add more tests to libdmabufinfo"
am: e077c58243

Change-Id: I213242175cbbcc3311d7ecb4dd94f77e3dfdbbe8
2019-02-02 16:34:29 -08:00
Treehugger Robot
e077c58243 Merge "Add more tests to libdmabufinfo" 2019-02-03 00:18:48 +00:00
Wei Wang
8fc3c3065c Merge "Restrict zram_writeback permission"
am: 0ed7819d6a

Change-Id: I9268e2bc46231167f8e1db645d6e79e403146a75
2019-02-01 19:39:14 -08:00
Treehugger Robot
0ed7819d6a Merge "Restrict zram_writeback permission" 2019-02-02 03:31:38 +00:00
Martin Stjernholm
fa05c8ef18 Merge "Revert "Enable APEX stubs for libnativeloader.""
am: 1bcaca7747

Change-Id: I11016c06045ab17f72533743156c0e7d254c0fb6
2019-02-01 14:35:59 -08:00
Treehugger Robot
1bcaca7747 Merge "Revert "Enable APEX stubs for libnativeloader."" 2019-02-01 22:33:08 +00:00
Josh Gao
3839ff3bf9 Merge changes I1abd671f,I9ae61465
am: 0220ca7d09

Change-Id: Ied3ef4638a0df57619b22bdf7bf724acb86157e9
2019-02-01 13:44:08 -08:00
Josh Gao
0220ca7d09 Merge changes I1abd671f,I9ae61465
* changes:
  adb: don't close sockets before hitting EOF.
  adb: implement fdevent_set_timeout.
2019-02-01 21:28:45 +00:00
Wei Wang
aa25756426 Restrict zram_writeback permission
Bug: 74582279
Bug: 122659265
Test: Build
Change-Id: Iba610929bc02d7ee5a590f8ec5b440269dbc12f5
2019-02-01 11:57:00 -08:00
Suren Baghdasaryan
b32788fc5e Merge "lmkd: Add support for psi monitors"
am: bec585440c

Change-Id: I68f6210177b96083990631da6d41795c948aeae5
2019-02-01 11:11:04 -08:00
Suren Baghdasaryan
bec585440c Merge "lmkd: Add support for psi monitors" 2019-02-01 18:40:40 +00:00
Suren Baghdasaryan
77122e5780 lmkd: Add support for psi monitors
With new psi monitor support in the kernel lmkd can use it to register
custom pressure levels. Add lmkd support for psi monitors when they are
provided by the kernel and use them by default. When kernel does not
support psi lmkd will fall back to vmpressure usage.
Add ability to poll memory status after the initial psi event is triggered
because kernel throttles psi memory pressure events to one per PSI tracking
window (currently set to 1sec). Current implementation polls every 200ms
for 1sec duration after the initial event is triggered.
If ro.lmk.use_psi is set to false psi logic will be disabled even when psi
is supported in kernel.

Bug: 111308141
Test: lmkd_unit_test
Change-Id: I685774b176f393bab7412161773f5c9af51e0163
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-01 18:40:32 +00:00
Martin Stjernholm
5c8c6a90fd Revert "Enable APEX stubs for libnativeloader."
This reverts commit 0daa405272.

Reason for revert: Breaks cf_x86_phone-userdebug: https://android-build.googleplex.com/builds/build-details/5273735/targets/cf_x86_phone-userdebug

Bug: 123700170
Change-Id: Id82a91f845120dd41ce02b6d7fef886a87eb23a8
2019-02-01 13:13:56 +00:00
Xiaoyong Zhou
818546b32c Merge "Loads fsverity keys"
am: 59a0149939

Change-Id: Ife4d8d6f6a32b19aa60616ecc850eae46a0b3c2b
2019-02-01 03:06:35 -08:00
Treehugger Robot
59a0149939 Merge "Loads fsverity keys" 2019-02-01 10:57:30 +00:00
Josh Gao
74b7ec72f8 adb: don't close sockets before hitting EOF.
Reimplement commit ffc11d3cf3 using
fdevent. The previous attempt was reverted because we were blindly
continuing when revents & POLLIN == 0, which ignored POLLHUP/POLLERR,
leading to spinloops when the opposite end of the file descriptor was
shutdown when we had no data left to read.

This patch reimplements the functionality implemented by that commit
using fdevent, which gets us detection of spin loops for free.

Bug: http://b/74616284
Test: ./test_device.py
Change-Id: I1abd671fef4c29e99dad968aa66bb754ca382578
2019-01-31 23:36:41 -08:00
Josh Gao
1a90118bbb adb: implement fdevent_set_timeout.
Test: adb_test
Change-Id: I9ae61465617b6a2fe0a1c161ad88c4feae49ec80
2019-01-31 23:36:41 -08:00
Jesse Hall
e9e72c0a04 Merge "Search/permit /vendor/${LIB}/hw in sphal namespace"
am: afc2ac106a

Change-Id: I527eb664d108a004d90e80ef48e8f8b0ac25d97a
2019-01-31 21:56:53 -08:00
Treehugger Robot
afc2ac106a Merge "Search/permit /vendor/${LIB}/hw in sphal namespace" 2019-02-01 05:50:49 +00:00
Xiaoyong Zhou
8307c34ed7 Merge "install mini-keyctl to /system/bin"
am: 055b549497

Change-Id: I23082ded5f70955fcf85468bf4a50eb140e9ac04
2019-01-31 19:55:12 -08:00
Chenbo Feng
d45427725f Add more tests to libdmabufinfo
Add some test to verify the refcount and fd reference is correct when
the dma_buf is shared between processes.

Bug; 63860998
Test: libdmabufinfo_test

Change-Id: Id22e68e7a65820f19847b2faab11c78e6d942d92
2019-02-01 03:50:13 +00:00
Treehugger Robot
055b549497 Merge "install mini-keyctl to /system/bin" 2019-02-01 03:44:48 +00:00
Jesse Hall
bdebda2bba Search/permit /vendor/${LIB}/hw in sphal namespace
The vulkan runtime loads drivers into the sphal namespace and relies
on them being in the sphal search path so that it doesn't have to
hardcode /vendor/${LIB}/hw.

These paths used to be allowed, but were removed by commit 2498e1b
because they were believed not to be required. Things didn't break
immediately because the vulkan runtime has a (supposed to be
temporary) fallback to hw_get_module, which loads from
/vendor/${LIB}/hw using absolute paths.

Bug: 123600276
Test: Launch Vulkan app on device with hw_get_module disabled
Change-Id: I07ac43bc9d2d877d8f427058b2d62c62d065c558
2019-01-31 18:13:03 -08:00
Bowgo Tsai
b20bf7566c Merge "Support getting public key data"
am: 66e76443a0

Change-Id: I0e20abf7b46b51aac02fff6cb4eab7e039cbd7a2
2019-01-31 15:42:49 -08:00
Treehugger Robot
66e76443a0 Merge "Support getting public key data" 2019-01-31 23:29:19 +00:00
Xiaoyong Zhou
66e2127c47 Loads fsverity keys
This CL calls mini-keyctl to load fsverity keys.

Bug: 112038861
Test: cat /proc/keys
Change-Id: I3b7cf85c2f64116a56349c54ed5fa4e8cf14a730
2019-01-31 13:48:04 -08:00
Xiaoyong Zhou
cf5dbc200b install mini-keyctl to /system/bin
This CL installs mini-keyctl for fsverity

Bug: 112038861
Test: build, flash and check mini-keyctl is properly installed.
Change-Id: Ib3adc1b7c92cae28caf72544987c7f3f23eafbbc
2019-01-31 13:48:04 -08:00
Josh Gao
a2e6417840 Merge changes If8747ba1,Id1943ebd
am: 69ba5179f4

Change-Id: I2bf0d93e49d1331589d71efb98ce89a9822c7064
2019-01-31 13:31:34 -08:00
Martin Stjernholm
27b6f13af2 Merge "Make libnative*.so from the Runtime APEX libs accessible to vendor binaries."
am: d664c9d952

Change-Id: Ie0357f9de6525ad40ca1f25a05f19f4d96755af7
2019-01-31 13:30:05 -08:00
Josh Gao
69ba5179f4 Merge changes If8747ba1,Id1943ebd
* changes:
  adb: improve network_connect error messages.
  adbd: fix TCP bind address.
2019-01-31 21:19:45 +00:00
Treehugger Robot
d664c9d952 Merge "Make libnative*.so from the Runtime APEX libs accessible to vendor binaries." 2019-01-31 21:15:28 +00:00
Tom Cherry
0bc62d5680 Merge "Add android::fs_mgr namespace for new Fstab code"
am: 54ea49ba05

Change-Id: Ib83279bf830c8662586c10f805f3b6e951936ac4
2019-01-31 11:51:14 -08:00
Tom Cherry
54ea49ba05 Merge "Add android::fs_mgr namespace for new Fstab code" 2019-01-31 19:35:54 +00:00
Pete Bentley
e29eba6ce1 Merge "Export libjavacore into the conscrypt linker namespace."
am: 43c17b0c03

Change-Id: I1c77c95f7c4d1038e8607eab520214f18045c5d5
2019-01-31 11:31:32 -08:00
Treehugger Robot
43c17b0c03 Merge "Export libjavacore into the conscrypt linker namespace." 2019-01-31 19:15:22 +00:00
David Anderson
75e9ef5252 Merge "fastboot: Fix "fastboot gsi"."
am: b7062df8c0

Change-Id: I1e9e050eace8e3a03ead0a77be34694548113c26
2019-01-31 10:18:41 -08:00
David Anderson
b7062df8c0 Merge "fastboot: Fix "fastboot gsi"." 2019-01-31 18:06:58 +00:00
Martin Stjernholm
60b259b93a Make libnative*.so from the Runtime APEX libs accessible to vendor binaries.
Test: Flash and boot
Test: Boot test on internal tree
Bug: 119840313
Change-Id: I7c87519f94af2eeef9ebfd0d1e46e7bfca8df5c5
2019-01-31 17:03:16 +00:00
Martin Stjernholm
644c828e6b Merge "Enable APEX stubs for libnativeloader."
am: 6ad0b8f1b1

Change-Id: Iecc517c14661b65b6f526de0a2c9dbd1431f656d
2019-01-31 06:25:14 -08:00
Martin Stjernholm
6ad0b8f1b1 Merge "Enable APEX stubs for libnativeloader." 2019-01-31 14:14:52 +00:00
Pete Bentley
7b967bf6cf Export libjavacore into the conscrypt linker namespace.
Needed to allow access to AsynchronousCloseMonitor.

Bug: 123121395
Bug: 122881655
Test: atest CtsLibcoreOkHttpTestCases:com.squareup.okhttp.CallTest
Change-Id: I1c73a9beb7a083a61ed52e437d7377b2486a34f7
2019-01-31 11:06:41 +00:00
Josh Gao
12ac0c75ac Merge changes Ief3dbf8e,Ib06e6f65
am: ee0e63f71d

Change-Id: I9fa7bbac32f6156823a6a5aac7e0e401c584607e
2019-01-31 01:18:31 -08:00