Commit graph

45432 commits

Author SHA1 Message Date
Martin Stjernholm
fc2c45cc62 Merge "Some tests are run from /data/local/tmp, and they need proper namespaces."
am: 31fd0ba559

Change-Id: I93c8ec1d1a001803ec23ccfd0e18e61cf1945f60
2019-02-05 03:08:55 -08:00
Treehugger Robot
31fd0ba559 Merge "Some tests are run from /data/local/tmp, and they need proper namespaces." 2019-02-05 11:04:48 +00:00
Zimuzo Ezeozue
58386c1e6e Merge "Reland: "Identify post-apexd crashing processes""
am: 54ef09c88e

Change-Id: Ie34c9bcaa2e319294755707b4ae8f536b0d341b1
2019-02-04 19:28:22 -08:00
Treehugger Robot
54ef09c88e Merge "Reland: "Identify post-apexd crashing processes"" 2019-02-05 03:16:30 +00:00
Dan Shi
8493872c99 Merge "Move the tests to postsubmit group"
am: a42af36002

Change-Id: I51fef3f5f92c6eded2e107185ba4b840c8a0d745
2019-02-04 14:07:40 -08:00
Treehugger Robot
a42af36002 Merge "Move the tests to postsubmit group" 2019-02-04 21:58:41 +00:00
Zimuzo Ezeozue
23aa17ba42 Reland: "Identify post-apexd crashing processes"
This reverts commit 60b89aee4c.

Reason for revert: Blocking change merged, Icdfbdcc1efca540ac854d4df79e07ee61fca559f

Change-Id: Iec7f0b28ca3326d1dc1d86304751eee5e941235e
2019-02-04 21:41:12 +00:00
Greg Kaiser
164ea570b3 Merge "lmdk: Remove redundant 'if' check"
am: 6cb668b992

Change-Id: I119eac076221143d673867e2ed54e4c9cc0c2e73
2019-02-04 12:27:27 -08:00
Treehugger Robot
6cb668b992 Merge "lmdk: Remove redundant 'if' check" 2019-02-04 20:16:56 +00:00
Greg Kaiser
eb60946739 Merge "libprocessgroup: Fix return values"
am: 209070aecd

Change-Id: I680e68f78c1991d5f1d787206ef436bc4fae2eac
2019-02-04 10:33:58 -08:00
Dan Shi
5c937a3a5d Move the tests to postsubmit group
The tests are failing on ToT.

Bug: 123852953
Test: None
Change-Id: I2e75c99d913f6954290aa9d6aada8797bf931977
2019-02-04 10:31:32 -08:00
Treehugger Robot
209070aecd Merge "libprocessgroup: Fix return values" 2019-02-04 18:27:32 +00:00
dimitry
551fd08290 Merge "Add getExportedNamespace NB callback"
am: 3e4b2ec29d

Change-Id: I465eb7a23cfd01cfeccee0a6313f88c833316000
2019-02-04 09:38:39 -08:00
Treehugger Robot
3e4b2ec29d Merge "Add getExportedNamespace NB callback" 2019-02-04 17:27:37 +00:00
Greg Kaiser
a523fd6035 lmdk: Remove redundant 'if' check
We already know that "polling" must be non-zero at this point,
because it hasn't been modified since our check on line 1960.
So we remove this check for code clarity.

Test: TreeHugger
Change-Id: I069d9fd0eef70748a5333733dd0518d1ac8021b7
2019-02-04 08:50:10 -08:00
Greg Kaiser
5c5ed9c856 libprocessgroup: Fix return values
We want our default implementations to fail, but '-1' is implicitly
cast to 'true', since it's non-zero.  We explicitly use 'false' to
fix this.

Test: TreeHugger
Change-Id: I369897b519601ce1a887cf6acd5f2cb9a6113a9a
2019-02-04 06:33:26 -08:00
Martin Stjernholm
4a7138fe37 Some tests are run from /data/local/tmp, and they need proper namespaces.
Bug: 123700170
Test: atest cameraservice_test libcompositionengine_test librenderengine_test libsurfaceflinger_arc_test libsurfaceflinger_unittest perfprofd_test inputflinger_tests
Change-Id: Id3c628175c0037944ccc0d53a2d5327e688ef99e
2019-02-04 14:10:31 +00:00
dimitry
d2ace387f5 Add getExportedNamespace NB callback
This callback replaces getVendorNamespace(). Fix nativeloader
to use NativeBridgeGetExportedNamespace instead of
NativeBridgeGetVendorNamespace.

Bug: http://b/121248172
Bug: http://b/121372395
Test: make
Change-Id: I8fa2081e37815f6f65490c9536bed0687b7f1e77
2019-02-04 15:06:43 +01:00
Suren Baghdasaryan
e419456f89 Merge changes from topic "cgroup abstraction layer"
am: faa6c4894d

Change-Id: I0d545daaaa0a20dd2e605f1a4be9a1ae9e3f02d6
2019-02-03 20:19:26 -08:00
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
faa6c4894d Merge changes from topic "cgroup abstraction layer"
* changes:
  Disable SetupCgroup for non-Android targets
  Fix non-Android build targets
  init: Replace cgroup hardcoded path with detected one
  libprocessgroup: Add support for task profiles
  rootdir: Add cgroups and task profiles description files
2019-02-03 22:28:23 +00:00
Suren Baghdasaryan
ff25a5f584 Disable SetupCgroup for non-Android targets
Non-android targets should not mount cgroups described in cgroup map
file. When used on non-Android targets SetupCgroup will fail. When
SetupCgroup is called via SetupCgroups a warning will be generated for
each cgroup that fails to mount.

Bug: 111307099
Change-Id: I213a5f9b02f312ba1dd7dc91c89b67334fb939b9
Merged-In: I213a5f9b02f312ba1dd7dc91c89b67334fb939b9
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-03 17:55:59 +00: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