Commit Graph

40424 Commits

Author SHA1 Message Date
Suren Baghdasaryan ccb9744562 Merge "lmkd: Fix the message printed during a kill to avoid confusion"
am: 5ea2c4baf1

Change-Id: Ie03101140cc80d905d1175bd8b7056a37eb1a0fc
2018-03-21 19:28:08 +00:00
Suren Baghdasaryan ec2bc88aa1 Merge "lmkd: Suppress error when accessing soft_limit_in_bytes for system_server"
am: d4463fd9d7

Change-Id: I098aac7f29083dd9d42fbd08025e71f11d0ee7ec
2018-03-21 19:27:43 +00:00
Suren Baghdasaryan 3d3e875767 Merge "lmkd: Change error to warning when accessing oom_score_adj file"
am: a77411f425

Change-Id: I87f6d6bac94067c055129783f0a4a35749b734d2
2018-03-21 19:27:14 +00:00
Suren Baghdasaryan 5ea2c4baf1 Merge "lmkd: Fix the message printed during a kill to avoid confusion" 2018-03-21 19:19:33 +00:00
Suren Baghdasaryan d4463fd9d7 Merge "lmkd: Suppress error when accessing soft_limit_in_bytes for system_server" 2018-03-21 19:19:22 +00:00
Suren Baghdasaryan a77411f425 Merge "lmkd: Change error to warning when accessing oom_score_adj file" 2018-03-21 19:19:10 +00:00
Benedict Wong e18e426131 Merge "Set SPI Allocation Timeout to One Hour" into pi-dev
am: 1f70d1cac5  -s ours

Change-Id: I78b7d1e1f68d5dcf2b1532e04681d3aa5c14e33f
2018-03-21 19:05:59 +00:00
Benedict Wong 2fab0229db Set SPI Allocation Timeout to One Hour
am: 89c9c9b18b  -s ours

Change-Id: Ibb2d35e3c5304bfb2db832ca2b6db059737abc4e
2018-03-21 17:49:38 +00:00
Suren Baghdasaryan d07a94f973 lmkd: Fix the message printed during a kill to avoid confusion
Current kills message prints min_score_adj marked as "oom_adj" which
is confusing. This change marks it as "min_oom_adj" to be more clear.

Change-Id: If52f0fb25fe3208c928c5d6adce77c04b9f15a0e
2018-03-21 17:12:42 +00:00
Suren Baghdasaryan 4311d1ed36 lmkd: Suppress error when accessing soft_limit_in_bytes for system_server
system_server needs to register with lmkd, however it has no memory
cgroup under /dev/memcg/apps. This change detects if the process being
registered is system_server and suppresses the error message when
/dev/memcg/apps/uid_%d/pid_%d/memory.soft_limit_in_bytes file can't
be accessed.

Bug: 73483785
Test: verified logcat output
Change-Id: I03df7831f41f512ac8d3ebc46330546d08a3cbc6
2018-03-21 10:11:23 -07:00
Benedict Wong 1f70d1cac5 Merge "Set SPI Allocation Timeout to One Hour" into pi-dev 2018-03-21 17:03:39 +00:00
Martijn Coenen 07b98d9b97 Add new trace tag for AIDL.
So we can auto-generate tracing code for AIDL interfaces.

Bug: 74416314
Test: inspect atrace output
Change-Id: I91b14b3b16d8d7a29f531101b14ddf10dbc61a5a
2018-03-21 13:59:34 +01:00
Suren Baghdasaryan 1ffa246c86 lmkd: Change error to warning when accessing oom_score_adj file
Occasionally processes are killed or crash while lmkd is trying to access
their oom_score_adj file. This is not necessarily an erroneous condition
and therefore should not be reported as an error. Demoting error to a
warning with a detailed message.

Bug: 72039129
Test: verified logcat output
Change-Id: I97444ba5198c02cb7f7ba03c3af12e4aad9d233e
2018-03-20 17:14:38 -07:00
Mark Salyzyn c74992bfbb Merge changes Ibf543273,Id56946b6 am: 7c681665f0
am: f6d3c609ee

Change-Id: Ifb3bc66b8776f2f4871b409f382d0f55b83180a6
2018-03-20 23:10:09 +00:00
Mark Salyzyn f6d3c609ee Merge changes Ibf543273,Id56946b6
am: 7c681665f0

Change-Id: Idbac3e2e55e8f10ddc18176f1b13f0e27db9c25c
2018-03-20 22:53:29 +00:00
Jiyong Park dabf17a7de Merge "/postinstall/* does not search for a lib in /vendor or /odm" into pi-dev
am: be3cd3c0d8  -s ours

Change-Id: I82672da1af5c70a7f156fb3c74308b300990a4f8
2018-03-20 22:32:18 +00:00
Treehugger Robot 7c681665f0 Merge changes Ibf543273,Id56946b6
* changes:
  bootstat: allow kernel_panic,sysrq to propagate subreason
  bootstat: test error out only on first bad bootloader reason
2018-03-20 22:25:12 +00:00
Josh Gao 1222abc75b adb: make fdevent_run_on_main_thread's fd nonblocking.
If we get a ton of fdevent_run_on_main_thread calls while running one
of the handlers, the socket might become full, which will result in a
deadlock in fdevent_run_on_main_thread when a write to the fd blocks
with the mutex taken. Resolve this by making the fd nonblocking, which
is safe because we always write after appending to the list, and read
before emptying the list, which guarantees that if the byte we write is
consumed, the std::function we appended will be run.

Bug: http://b/74616284
Test: adb_test
Test: python test_device.py
Change-Id: I29319bda2ad7b5a5cdcd91d1d0ddf39f7ab7d115
2018-03-20 13:23:06 -07:00
Mark Salyzyn 39cc3e7073 bootstat: allow kernel_panic,sysrq to propagate subreason
Allow for a daemon to write to last kmsg to propagate a detailed
subreason to kernel_panic,sysrq actions.  A minor refactor moves
common code into a helper function getSubreason for retrieval and
bit error correction operations.

A sysrq crash generally produces a kernel-provided message:
    SysRq : Trigger a crash
which is used to generate a canonical boot reason kernel_panic,sysrq.
A user daemon could write to /dev/kmsg just prior to the sysrq with
    SysRq : Trigger a crash : '<subreason>'
to change the canonical boot reason to kernel_panic,sysrq,<subreason>.

Administration added pending kBootReasonMap entries present in TRON.

Test: manual echo into /dev/kmsg and /proc/sysrq-trigger and check
Test: boot_reason_test.sh
Bug: 33808187
Bug: 63736262
Change-Id: Ibf5432737e5a3449ebe40a8c6cf2d3e912ed6bbc
2018-03-20 13:11:44 -07:00
Mark Salyzyn 855d205817 bootstat: test error out only on first bad bootloader reason
Hopefully the quick property test is first, setting the stage for
ignoring future failures.  This solves a problem with multiple
test failures directly attributed to a CTS compliance issue
with the bootloader's boot reason.  One test fails, the remainder
get a pass on this one issue.

Test: boot_reason_test.sh
Bug: 63736262
Change-Id: Id56946b6f2f3a33d65bd1830543838f153290759
2018-03-20 13:10:16 -07:00
Tom Cherry 5f678d42b5 Merge "Revert "init: Reboot after timeout passes during reboot"" into pi-dev
am: 16e2e9d4da  -s ours

Change-Id: I94fcdb89740b51a598881467cee2eabb03e9986f
2018-03-20 19:11:50 +00:00
TreeHugger Robot be3cd3c0d8 Merge "/postinstall/* does not search for a lib in /vendor or /odm" into pi-dev 2018-03-20 18:56:40 +00:00
Tom Cherry 16e2e9d4da Merge "Revert "init: Reboot after timeout passes during reboot"" into pi-dev 2018-03-20 18:42:43 +00:00
Benedict Wong 89c9c9b18b Set SPI Allocation Timeout to One Hour
This change increases the default expiration length of an SA to 1h. The
IPsec API expects that SPIs are allocated indefinitely, but potential
for instability requires that these get cleaned up automatically. As
such, the duration was chosen as a sane, but long timeout value.

Bug: 72316671
Test: Added CTS tests to enforce this behavior
Merged-In: I47aef9cea4a09da253b2ec048a8797af5fa25529
Change-Id: I47aef9cea4a09da253b2ec048a8797af5fa25529
(cherry picked from commit 00308f8554)
2018-03-20 11:32:40 -07:00
Jiyong Park 6b791b54b0 Merge "/postinstall/* does not search for a lib in /vendor or /odm" am: ef454589e4
am: 6a8b7c4061

Change-Id: I5490aa9a2b6852a16e5d35942c350f3618e8bbc7
2018-03-20 16:53:21 +00:00
Jiyong Park 6a8b7c4061 Merge "/postinstall/* does not search for a lib in /vendor or /odm"
am: ef454589e4

Change-Id: Ic401133a7bf8c22b211a72635ef8597a2e885208
2018-03-20 16:44:41 +00:00
Jiyong Park 955029aa1b /postinstall/* does not search for a lib in /vendor or /odm
There has been no section in the linker config file for the binaries
under /postinstall. As a result, the binaries were run with the legacy
default config where /vendor/lib and /odm/lib are added to the search
paths. This is causing selinux denials as the binaries for OTA are not
allowed to access /vendor/lib or /odm/lib, but the dynamic linker calls
realpath(3) on the paths to canonicalize them.

Fixing the issue by letting /postinstall/* binaries to run with a
dedicated linker namespace config, where /vendor/lib and /odm/lib are
not added to the search paths. Not having the paths is okay because
he OTA binaries should not have dependency to the libs there.

Bug: 75287236
Test: do the OTA, selinux denials on postinstall_file is not shown
Test: above test should pass on  wahoo, marlin and pre-treble devices
Merged-In: I49c11a0929002adfef667890c0a375c2b41054f4
Change-Id: I49c11a0929002adfef667890c0a375c2b41054f4
(cherry picked from commit d7e6cb27b6)
2018-03-21 01:25:55 +09:00
Treehugger Robot ef454589e4 Merge "/postinstall/* does not search for a lib in /vendor or /odm" 2018-03-20 16:25:48 +00:00
Tom Cherry 6d0ec82c04 Merge "Revert "init: Reboot after timeout passes during reboot"" am: 92d55b6c07
am: e48dfe91ca

Change-Id: Ibf0db3721894cf78ba3f67b1e364833ffe1a9b82
2018-03-20 13:55:19 +00:00
Tom Cherry e48dfe91ca Merge "Revert "init: Reboot after timeout passes during reboot""
am: 92d55b6c07

Change-Id: I14999bf605bd31d5ae10a845c702ffb2161f51f5
2018-03-20 13:46:43 +00:00
Tom Cherry ea31ac2514 Revert "init: Reboot after timeout passes during reboot"
This reverts commit c9fec9d2be.

Looks like ext4 can't handle a system reboot happening in the middle
of an unmount.  We'll have to find another way to handle this.

Bug: 74817735
Bug: 75310371
Test: reboot device
Merged-In: Ib4f7f7fd29988a31a99f146c40f6d987c1fef15e
Change-Id: I7c097ba5734e2e4ff320c8b02fb58324d9380513
2018-03-20 13:39:00 +00:00
Tom Cherry 92d55b6c07 Merge "Revert "init: Reboot after timeout passes during reboot"" 2018-03-20 13:37:43 +00:00
Josh Gao 371cfe44ad Merge changes I6a842960,If618c26b am: 7920502065
am: c08a536a32

Change-Id: I29c44864fb1a955d3f2e07deb8bc970ee6c3faaf
2018-03-20 07:34:52 +00:00
Josh Gao fb2f969286 Merge "adb: skip IPv6 test if IPv6 isn't available." am: 46e59af921
am: c4072ed605

Change-Id: I5e66a4c56247e7f588feece0d1d8f6dee2dda278
2018-03-20 07:34:18 +00:00
Josh Gao c08a536a32 Merge changes I6a842960,If618c26b
am: 7920502065

Change-Id: Id568642bd668f5d83f370d366992d93c14e09166
2018-03-20 07:26:49 +00:00
Josh Gao c4072ed605 Merge "adb: skip IPv6 test if IPv6 isn't available."
am: 46e59af921

Change-Id: I90cfa05f2f81a7bbd3b160dce9b86557cbfd243f
2018-03-20 07:26:11 +00:00
Josh Gao 7920502065 Merge changes I6a842960,If618c26b
* changes:
  adb: add `adb shell exit 42` stress test.
  adb: improve socket tests.
2018-03-20 07:19:01 +00:00
Josh Gao 46e59af921 Merge "adb: skip IPv6 test if IPv6 isn't available." 2018-03-20 07:18:12 +00:00
Jaekyun Seok 977abec8a6 Merge "Allow vendor_init_actionable to persist.sys.usb.usbradio.config" into pi-dev
am: bfb490e3e8

Change-Id: I3bd2e532c3a1c09a3ea8f80bfb633d237b85dc0f
2018-03-20 05:06:06 +00:00
TreeHugger Robot bfb490e3e8 Merge "Allow vendor_init_actionable to persist.sys.usb.usbradio.config" into pi-dev 2018-03-20 03:46:42 +00:00
Yabin Cui 6fff238997 Always set the sp reg to the cfa for DWARF.
am: 414df3e583

Change-Id: I0b0f13c41e0fee72f015dcc90d3f0293fe0ce3bf
2018-03-20 02:38:44 +00:00
Josh Gao 4abb5074be adb: skip IPv6 test if IPv6 isn't available.
Bug: http://b/69813298
Test: none
Change-Id: I0793e793bd52c5f1c639faedf09a513df263db78
2018-03-19 18:19:47 -07:00
Jiyong Park d7e6cb27b6 /postinstall/* does not search for a lib in /vendor or /odm
There has been no section in the linker config file for the binaries
under /postinstall. As a result, the binaries were run with the legacy
default config where /vendor/lib and /odm/lib are added to the search
paths. This is causing selinux denials as the binaries for OTA are not
allowed to access /vendor/lib or /odm/lib, but the dynamic linker calls
realpath(3) on the paths to canonicalize them.

Fixing the issue by letting /postinstall/* binaries to run with a
dedicated linker namespace config, where /vendor/lib and /odm/lib are
not added to the search paths. Not having the paths is okay because
he OTA binaries should not have dependency to the libs there.

Bug: 75287236
Test: do the OTA, selinux denials on postinstall_file is not shown
Test: above test should pass on  wahoo, marlin and pre-treble devices
Change-Id: I49c11a0929002adfef667890c0a375c2b41054f4
2018-03-20 10:12:00 +09:00
Tom Cherry 0a72e6cb72 Revert "init: Reboot after timeout passes during reboot"
This reverts commit c9fec9d2be.

Looks like ext4 can't handle a system reboot happening in the middle
of an unmount.  We'll have to find another way to handle this.

Bug: 74817735
Bug: 75310371
Test: reboot device
Change-Id: Ib4f7f7fd29988a31a99f146c40f6d987c1fef15e
2018-03-19 16:37:02 -07:00
Josh Gao c970aefada adb: add `adb shell exit 42` stress test.
Add a test to hammer on `adb shell exit $n` for flakiness.

Bug: http://b/74616284
Test: python test_device.py
Change-Id: I6a842960f5b55ff739044698f5c9683992fc42f1
2018-03-19 16:14:53 -07:00
Josh Gao ecb96ac04d adb: improve socket tests.
Make it so that the socket tests don't leak until your machine blows up
by switching an infinite loop into an assertion failure.

Bug: http://b/74616284
Test: adb_test
Change-Id: If618c26b224b660548454f542cab79bebe46f80e
2018-03-19 16:14:53 -07:00
Jaekyun Seok 56f832e561 Allow vendor_init_actionable to persist.sys.usb.usbradio.config
persist.sys.usb.usbradio.config can be used as an action trigger in
vendor init scripts.

Bug: 75202311
Bug: 74266614
Test: succeeded building and tested on pixels
Change-Id: I123b5ebce4bbf33f41222c2e11137d52e38ff9f8
2018-03-20 07:40:16 +09:00
Josh Gao 48aa138ac6 Merge changes I99b85f07,If28f6c8d am: 6156420fb7
am: 0204f8c2f2

Change-Id: I20b80d869279af82393c382ea837197633e4757c
2018-03-19 20:36:53 +00:00
Josh Gao 0204f8c2f2 Merge changes I99b85f07,If28f6c8d
am: 6156420fb7

Change-Id: I07fd7bee350ad02933d7c329c4852b504221ea9b
2018-03-19 20:22:38 +00:00
Treehugger Robot 6156420fb7 Merge changes I99b85f07,If28f6c8d
* changes:
  adb: implement std::make_unique, start using it.
  base: export GetThreadId.
2018-03-19 20:14:33 +00:00