Commit Graph

39227 Commits

Author SHA1 Message Date
Paul Crowley e72619c947 Merge "Re-land "If enablefilecrypto or init_user0 fails, reboot into recovery.""
am: ca10ecb3ae

Change-Id: Ib906e393d8d2226083f23503c7eb1f96c58bbcf1
2018-04-17 10:07:39 -07:00
Treehugger Robot ca10ecb3ae Merge "Re-land "If enablefilecrypto or init_user0 fails, reboot into recovery."" 2018-04-17 16:53:30 +00:00
Luis Hector Chavez c83ea69db8 Merge "Make bootstat container-friendly"
am: 0eee579fa2

Change-Id: Iee8145ade4ae97af3d5738ecfad7c3121b7e3c56
2018-04-17 09:07:59 -07:00
Paul Crowley c73b21558b Re-land "If enablefilecrypto or init_user0 fails, reboot into recovery."
An earlier such change was reverted in commit e242a97db5.

Bug: 70487538
Test: ensure that angler can boot
Merged-In: Id5f57fce1c9b817a2650e0c848143d8a0d286bf0
Change-Id: Id5f57fce1c9b817a2650e0c848143d8a0d286bf0
2018-04-17 09:03:57 -07:00
Treehugger Robot 0eee579fa2 Merge "Make bootstat container-friendly" 2018-04-17 16:01:06 +00:00
Elliott Hughes aeaade106d Merge "Remove out of date comment."
am: 8a34e636ca

Change-Id: Ib185f7f069dfd85548479631ed105ea207d01fa3
2018-04-16 18:44:53 -07:00
Hridya Valsaraju 72a1a812ad Merge "Remove header version check for command "fastboot boot boot.img""
am: b245377f0e

Change-Id: Ibbb42dd2cc376874a518a5082aa2e1316c01ec87
2018-04-16 18:44:15 -07:00
Treehugger Robot 8a34e636ca Merge "Remove out of date comment." 2018-04-17 01:38:11 +00:00
Treehugger Robot b245377f0e Merge "Remove header version check for command "fastboot boot boot.img"" 2018-04-17 01:31:06 +00:00
Chih-Hung Hsieh f5f128ea90 Merge "Use ld when lld fails"
am: e3b149c754

Change-Id: Ic145eb368b83d9ea7996737f431f81e2ecf5d608
2018-04-16 17:44:54 -07:00
Treehugger Robot e3b149c754 Merge "Use ld when lld fails" 2018-04-17 00:31:05 +00:00
Hridya Valsaraju d016ee4dbe Remove header version check for command "fastboot boot boot.img"
The header version argument is meant for creation of boot images
using boot and flash:raw commands. It is unnecessary to specify the same
while using the boot command with a complete boot image.

Bug: 77920157
Test: fastboot boot boot.img
Change-Id: Ia8fca4180e15906a3ae7c732496a744eb4b15e91
Merged-In: Ia8fca4180e15906a3ae7c732496a744eb4b15e91
2018-04-16 16:55:58 -07:00
Chih-Hung Hsieh 29e54f8e75 Use ld when lld fails
* Android's clang lld link rules do not work with the special link order of
  libunwind_llvm yet.

Bug: 78118944
Test: make checkbuild and boot
Change-Id: Ife9707f111dfd24cb84b56754a4fc3f826f722c4
2018-04-16 16:00:15 -07:00
Elliott Hughes 77561c1f28 Remove out of date comment.
Bug: https://code.google.com/p/android/issues/detail?id=189821
Test: N/A
Change-Id: I25e64611d0c2db75a9caf0f19e7dd17c725d98a1
2018-04-16 15:22:33 -07:00
Mark Salyzyn 64d97d8761 lmkd: limit capability set to minimum
Set F() capability set and 'drop' lmkd from AID_ROOT to AID_LMKD uid
and from AID_ROOT to AID_LMKD and AID_SYSTEM gid.

/dev/memcg/memory.pressure defaults to root.root mode 0000, set it up
as root.system mode 0040 to allow lmkd read access.

Instrument failure to set SCHED_FIFO.

Annotate access points that require elevated capabilities.

Test: check /proc/`pidof lmkd`/status for capability set
Test: lmkd_unit_test
Bug: 77650566
Change-Id: I986081a0434cf6e842b63a55726380205b30a3ea
2018-04-16 14:51:56 -07:00
Luis Hector Chavez 03aae156b8 Make bootstat container-friendly
This change allows bootstat to read the ro.boot.boottime_offset
property, which is set on devices where Android runs in a container.
This is because the CLOCK_BOOTTIME clock is not reset when (from
Android's perspective) the device restarts, since the host OS does not
restart itself.

Bug: 77273909
Test: CtsBootStatsTestCases

Change-Id: Ifb792864394be0b4686cc9d555c0afced856f4b4
Merged-In: Ifb792864394be0b4686cc9d555c0afced856f4b4
2018-04-16 11:17:42 -07:00
Suren Baghdasaryan 6575d86d3d Merge "lmkd: Introduce support for legacy kill algorithm that uses minfree levels"
am: 22dc27b9fa

Change-Id: If597afe2980eea27e80903ba37fe62382ba3d4d3
2018-04-15 10:46:20 -07:00
Treehugger Robot 22dc27b9fa Merge "lmkd: Introduce support for legacy kill algorithm that uses minfree levels" 2018-04-15 17:34:59 +00:00
Suren Baghdasaryan c09b53db7b lmkd: Introduce support for legacy kill algorithm that uses minfree levels
Add ability to switch to the algorithm used by lowmemorykiller driver
for determining when to kill. It uses minfree levels to decide at which
levels of free memory and file cache to kill a process. oom_adj_score
is also determined by comparing current memory resources against minfree
levels.
ro.lmk.use_minfree_levels property is introduces for switching into this
mode. By default it is disabled.

Bug: 77299493
Bug: 75322373
Merged-In: I6b51972951026854a079fcda33d6786b7ed035e4
Change-Id: I6b51972951026854a079fcda33d6786b7ed035e4
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-15 16:02:36 +00:00
Suren Baghdasaryan 4573186a35 Merge "lmkd: Switch to using /proc/meminfo to have access to file cache size"
am: 5176b4b37a

Change-Id: I09e84bff6bda07bf930a76ef38fed05caf1da313
2018-04-15 04:45:28 -07:00
Treehugger Robot 5176b4b37a Merge "lmkd: Switch to using /proc/meminfo to have access to file cache size" 2018-04-15 11:36:46 +00:00
Suren Baghdasaryan 45c9e0b30c lmkd: Switch to using /proc/meminfo to have access to file cache size
Current mechanism of getting system memory state by using sysinfo()
is not enough because it does not provide information about file cache
size which is needed to correctly assess memory state. Switch to using
data from /proc/meminfo that includes information provided by sysinfo()
and file cache size in addition to that.


Bug: 77299493
Bug: 75322373
Merged-In: I16106fc4f9254f17f776803e60502b7b6474e1b7
Change-Id: I16106fc4f9254f17f776803e60502b7b6474e1b7
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-15 10:03:05 +00:00
Suren Baghdasaryan 885ff611d7 Merge changes Ie7d80bbb,I8e27f8b9
am: b62d5ed25e

Change-Id: I6d7bf1864d45301cc524c0175f6c4724cdedcaff
2018-04-15 02:41:16 -07:00
Treehugger Robot b62d5ed25e Merge changes Ie7d80bbb,I8e27f8b9
* changes:
  lmkd: Add zoneinfo and meminfo parsing routines
  lmkd: Optimize frequent file reads by keeping file descriptors open
2018-04-15 09:31:52 +00:00
Suren Baghdasaryan ceffb41162 lmkd: Add zoneinfo and meminfo parsing routines
/proc/zoneinfo and /proc/meminfo contain information necessary for lmkd
to assess system memory state. Add routines to parse these files.


Bug: 77299493
Bug: 75322373
Merged-In: Ie7d80bbb81fd0d2fc0629f6f678e6afc97fed1f6
Change-Id: Ie7d80bbb81fd0d2fc0629f6f678e6afc97fed1f6
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-15 07:55:27 +00:00
Suren Baghdasaryan 6499e5ec4a lmkd: Optimize frequent file reads by keeping file descriptors open
To check system memory state lmkd is using same files every time vmpressure
event is received. Instead of opening and closing these files every time
we store the file descriptor and use pread() to reread the file from
the beginning.


Bug: 77299493
Bug: 75322373
Merged-In: I8e27f8b9526e82e3cc313a02fce215c2e4dd3d29
Change-Id: I8e27f8b9526e82e3cc313a02fce215c2e4dd3d29
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-15 07:54:03 +00:00
Elliott Hughes cf2bf521bb Merge "debuggerd: remove maximum abort message length."
am: 66b685ef3f

Change-Id: I704040b9a4ce9ce6fd675ddb7b5c1f59e4cd3212
2018-04-14 16:16:16 -07:00
Suren Baghdasaryan 4d41a1f882 Merge changes I78d2dc79,I6e2eaebe
am: bb266150fe

Change-Id: I1d9afb8b0100f48fe1a75e27cdb1db5ad4e18f50
2018-04-14 16:14:42 -07:00
Josh Gao c6d6f195d6 Merge "adb: fix `adb reverse` when adbd has multiple transports."
am: 2468b7623c

Change-Id: Idce1eedfa33a18c59e6edd62100934f7fe73dd08
2018-04-14 15:57:29 -07:00
Dan Albert a707c482a1 Merge "Add missing @addtogroup tags."
am: 95a37079f5

Change-Id: I99f4500795ddb84f533ce8b9487da8b1797c8150
2018-04-14 15:56:53 -07:00
Suren Baghdasaryan 29aca8b0be Merge "lmkd: Add lmkd README file"
am: b518418fbb

Change-Id: I281c997ccd048e11ca516ac3bbbc3e580e43981b
2018-04-14 15:56:00 -07:00
Elliott Hughes 66b685ef3f Merge "debuggerd: remove maximum abort message length." 2018-04-14 16:17:14 +00:00
Treehugger Robot bb266150fe Merge changes I78d2dc79,I6e2eaebe
* changes:
  lmkd: Fix usage of ro.lmk.kill_heaviest_task property
  lmkd: Rename is_go_device variable to better reflect its function
2018-04-14 05:59:27 +00:00
Treehugger Robot 2468b7623c Merge "adb: fix `adb reverse` when adbd has multiple transports." 2018-04-14 00:43:33 +00:00
Josh Gao 1cc7bd80a6 debuggerd: remove maximum abort message length.
Let the logging implementation be the imposer of limits.

Bug: http://b/64759619
Test: debuggerd_test
Change-Id: I8bc73bf2301ce071668993b740880224846a4e75
2018-04-13 17:34:20 -07:00
Treehugger Robot 95a37079f5 Merge "Add missing @addtogroup tags." 2018-04-13 23:50:42 +00:00
Suren Baghdasaryan 818b59b229 lmkd: Fix usage of ro.lmk.kill_heaviest_task property
lmkd should use ro.lmk.kill_heaviest_task property to select between
algorithms for victim selection. Set ro.lmk.kill_heaviest_task default
value to false in order to keep it compatible with previous versions
of lmkd (killing the heaviest task is a new mechanism).

Change-Id: I78d2dc79d9c54e636c26665605518d9c87b535b3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-13 23:24:24 +00:00
Suren Baghdasaryan ff61afb002 lmkd: Rename is_go_device variable to better reflect its function
Rename is_go_device variable to low_ram_device to better reflect
its meaning and relation to ro.config.low_ram variable.

Change-Id: I6e2eaebe79cf2e6edf861f7c602e52a5b573ad0a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-13 23:24:09 +00:00
Treehugger Robot b518418fbb Merge "lmkd: Add lmkd README file" 2018-04-13 22:29:49 +00:00
Dan Albert 55a76719e2 Add missing @addtogroup tags.
These NDK docs weren't in any groups, so they don't show up in the
new site.

Test: https://irina-dot-devsite.googleplex.com/ndk/reference/group/logging
Test: https://irina-dot-devsite.googleplex.com/ndk/reference/group/sync
Bug: http://b/77236573
Change-Id: I300f96585dec94359ecf96fbf39c6dc3ec4579e5
2018-04-13 14:49:41 -07:00
Suren Baghdasaryan 7e5dea82a5 lmkd: Add lmkd README file
Add README file providing lmkd overview and description for its
properties.

Change-Id: I30236dd4ccaa2b48c31dfb80b63f0b82b49b5744
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-13 21:36:44 +00:00
Josh Gao 44899eeb53 adb: fix `adb reverse` when adbd has multiple transports.
Plumb the transport that we received the adb reverse request on through
to reverse_service, instead of trying to get a unique transport on
devices that have multiple active transports (e.g. a device with USB
(even unplugged) connected via TCP).

Bug: http://b/37066218
Bug: http://b/71898863
Test: `echo foo | nc -l 12345 & adb reverse tcp:12345 tcp:12345; adb shell nc localhost 12345` on a device connected via TCP
Change-Id: Iae199ae787f2e344126bbcacca8544cfc9844a4c
2018-04-13 14:25:28 -07:00
Josh Gao f1cf3868b4 Merge changes Ida272d21,If3f29f9e,I7dc5258d,I55258c15,Ibad79770
am: cd71fd5109

Change-Id: I5f74eae81659d0cda196bb57fae6189d204f3d6e
2018-04-13 14:05:32 -07:00
Treehugger Robot cd71fd5109 Merge changes Ida272d21,If3f29f9e,I7dc5258d,I55258c15,Ibad79770
* changes:
  adb: win32: cleanup winsock initialization.
  adb: win32: properly set EBADF in some functions.
  adb: partially clang-format sysdeps_win32.cpp.
  adb: implement adb_writev.
  adb: switch apacket payload to a type that doesn't initialize its contents.
2018-04-13 20:54:53 +00:00
Ryan Prichard 5739bf412f Merge "init: use signalfd to catch SIGCHLD"
am: 07de83831f

Change-Id: Ia9c4f8deba11267ef8f63a9290abcb51ba55e7b0
2018-04-12 16:02:51 -07:00
Treehugger Robot 07de83831f Merge "init: use signalfd to catch SIGCHLD" 2018-04-12 22:49:27 +00:00
Jaekyun Seok 9b9c5e45fa Merge "Allow vendor-init-actionable for vold-related properties"
am: ee1b5a605e

Change-Id: I32bb609a127bd60a2e4a8b264a5895f706676743
2018-04-12 15:46:29 -07:00
Tom Cherry 1aea110cad Merge "init: do not impose vendor_init restrictions on old vendor images"
am: 4396bb85da

Change-Id: I44a5053dab8133b7786d1f261bd17df0a12eb55b
2018-04-12 15:45:47 -07:00
Treehugger Robot ee1b5a605e Merge "Allow vendor-init-actionable for vold-related properties" 2018-04-12 22:33:03 +00:00
Tom Cherry 4396bb85da Merge "init: do not impose vendor_init restrictions on old vendor images" 2018-04-12 22:31:02 +00:00