Commit Graph

49988 Commits

Author SHA1 Message Date
Daniel Rosenberg 0d9c4080f4 Merge "Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev
am: 11bf3545ab

Change-Id: I9c7af0807d12ef60636d407fbba64ec664a7d31a
2019-07-15 13:22:03 -07:00
Daniel Rosenberg 11bf3545ab Merge "Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev 2019-07-15 19:56:35 +00:00
Daniel Rosenberg 35708b9d7b Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""
This reverts commit 997a2d93d7.

Reason for revert: This revert is needed, just also need some selinux rules for changes to the script that runs if this folder is present.

Bug: 136199978
Change-Id: Ie0544954965e3c90abc2f833c41949976c3bea65
2019-07-12 23:43:56 +00:00
Suren Baghdasaryan e818cccd58 Merge "lmkd: Prevent non-main threads being registered or killed by lmkd" into qt-r1-dev 2019-07-12 20:13:17 +00:00
Gerry Fan c9aff9869d Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev
am: ff7da227db

Change-Id: I42b5fdcdb6b87afe44353d830f6b1b5c0c645fc0
2019-07-12 10:24:00 -07:00
Gerry Fan ff7da227db Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev 2019-07-12 17:11:23 +00:00
Gerry Fan 997a2d93d7 Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""
This reverts commit 891a011394.

Reason for revert: Some Test failed, need more investigation

Bug: 136199978
Change-Id: Ibad0dad02a6701447c39ddcc805d44c9e68bdcce
2019-07-12 15:23:12 +00:00
Christopher Ferris d2e75075e9 Merge changes Ie0e6e716,I8adc169b into qt-r1-dev
* changes:
  Fix error printing code.
  Cache only a small portion of page map data.
2019-07-12 15:15:57 +00:00
Suren Baghdasaryan c68cf6fe65 lmkd: Prevent non-main threads being registered or killed by lmkd
Only thread group leaders should be registered with lmkd. Add a check to
ignore any non-leader TIDs and generate an error if such condition is
detected. Run the same check before killing a process to detect cases of
non-leader TIDs being used to kill a process. This might happen if PIDs
overflow and previously registered PID gets reused for a non-leader
thread in the following scenario:

1. pid X is a thread group leader and is registered with lmkd
2. pid X dies without lmkd knowing it and pid gets recycled
3. process Y creates a thread with tid X
4. lmkd kills pid X which results in process Y being killed

Bug: 136408020
Test: lmkd_unit_test
Change-Id: I46c5a0b273f2b72cefc20ec59b80b4393f2a1a37
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-07-12 15:12:16 +00:00
Hung-ying Tyan b8aaa13a5f Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev
am: 346c17bbc9

Change-Id: I501695115c2c84345db0c78e8694fd31686b7ee7
2019-07-12 02:49:37 -07:00
Hung-ying Tyan 346c17bbc9 Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev 2019-07-12 09:27:01 +00:00
Gerry Fan 891a011394 Revert "rootdir / sdcard : Stop creating /data/media/obb."
This reverts commit c6ca823710.
Reason for revert: Q-GSI on Pie devices would crash kernel.

Bug: 136199978

Change-Id: I16a2cb81a1f21627db0cb00324679a322ba42fe0
2019-07-12 00:16:06 +00:00
Christopher Ferris 7d40ac80d5 Fix error printing code.
Bug: 135694447

Test: Induced error and verified the errors print properly in logcat.
Change-Id: Ie0e6e71671a8a3e26b4632f93bb2af089a20e2e0
Merged-in: Ie0e6e71671a8a3e26b4632f93bb2af089a20e2e0
(cherry picked from commit d943301990)
2019-07-11 12:52:09 -07:00
Christopher Ferris 89207939d8 Cache only a small portion of page map data.
The scudo memory allocator will allocate a large virtual memory address
that causes procrank to allocate a huge amount of data. Modify so it
caches the data a bit at a time.

Remove some allocations that are not necessary since the data is only used
in the first loop.

Fix a few pread64 checks against the actual bytes read, rather than the
read is < 0.

Fix sort by rss in procrank.

Bug: 135694447

Test: Ran unit tests (only one unit test actually runs the modified code).
Test: Ran the old version of procrank using a static libmeminfo and verified
Test: that the same data is found as the new version.

Change-Id: I8adc169b5607ec994ff13a9e161a479350d84c4d
Merged-In: I8adc169b5607ec994ff13a9e161a479350d84c4d
(cherry picked from commit 7f8915c76e)
2019-07-11 12:51:35 -07:00
Jaegeuk Kim bb0838b511 rootdir: init.rc: use gc_urgent_sleep_time for f2fs
This accelerates f2fs GC when IdleMaint.

Bug: 128594671
Bug: 137190790
Change-Id: I1cea7c99ffd5963711c66460f1c8368b43aeaee2
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-07-10 17:02:12 +00:00
Xu YiPing 8ba0b82605 Avoid get same timestamps in log testcase
am: ac9e2af1b6

Change-Id: I1ec3face1c149dccedc59ef45fad2e7b73987cb7
2019-07-08 17:12:56 -07:00
Xu YiPing ac9e2af1b6 Avoid get same timestamps in log testcase
for arm64, userspace get time by vDSO, no syscall overhead.
multiple_test_2 sometimes get 2 same timestamps now, then testcase
fails.

Bug: b/135555666
Test: ./CtsLogdTestCases64 --gtest_filter=*multiple_test*
Merged-In: Ic8a0ab6f571df1487fe5fb4e5f07dc612af69001
Change-Id: I83f8beae168f397a347972c5e60de86d16c8f7c6
2019-07-08 10:03:40 -07:00
Sandeep Patil 41d77405d6 dmabuf_dump: Change the default view to per-process stats
Add '-a' commandline option to show the old complete table that shows
dmabuf x process grid.

Fixes: 135668399
Test: dmabuf_dump
Test: dmabuf_dump -h
Test: dmabuf_dump -a
Test: dmabuf_dump -a 123
Test: dmabuf_dump 123 456
Test: dmabuf_dump <pid>

Change-Id: If228c97baa375c515d94baf3b5be674cfcc09919
Merged-In: If228c97baa375c515d94baf3b5be674cfcc09919
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-07-01 18:17:15 -07:00
Sandeep Patil 85aa081c83 dmabuf_dump: Fix aosp_x86-eng builds
Test: lunch aosp_x86-eng; mma -j
Test: lunch aosp_blueline-eng; mma -j
Bug: 136136199

Change-Id: Ie6f90c967b356a55db09acee7b3596661e001166
Merged-In: Ie6f90c967b356a55db09acee7b3596661e001166
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-07-01 18:16:52 -07:00
Sandeep Patil 852f553ca2 dmabuf_dump: Make output more readable and debug friendly
- Get rid of the PSS number that didn't make sense.
- Fix double counting in per-process size when buffers had file
  descriptors and mmap'ed
- Make the output much more readable
- Print totals where they make sense.
- Dont print per-process fd and map refs separately, total ref count per
  process is sufficient.

Bug: 135668399
Test: dmabuf_dump (on AOSP blueline)

Change-Id: I10dc0a332d49110dd68f0eaa94a326679361deea
Merged-In: I10dc0a332d49110dd68f0eaa94a326679361deea
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-07-01 18:16:23 -07:00
Paul Lawrence cac9a2b10b Merge "Make ext4 userdata checkpoints work with metadata encryption" into qt-dev
am: be4e6131d8

Change-Id: Ic522f20a8f1998ed63c90e0e2e6d469ef530b5f2
2019-06-27 16:25:33 -07:00
TreeHugger Robot be4e6131d8 Merge "Make ext4 userdata checkpoints work with metadata encryption" into qt-dev 2019-06-27 22:36:27 +00:00
Paul Lawrence d3aee48096 Make ext4 userdata checkpoints work with metadata encryption
When both ext4 user data checkpoints and metadata encryption are
enabled, we are creating two stacked dm devices. This had not been
properly thought through or debugged.

Test: Enable metadata encryption on taimen (add
keydirectory=/metadata/vold/metadata_encryption to flags for userdata in
fstab.hardware)
    Unfortunately metadata is not wiped by fastboot -w, so it is
    necessary to rm metadata/vold -rf whenever you wipe data.
    fastboot flashall -w works
    fastboot reboot -w works
    A normal boot works
    Disable checkpoint commits with
    setprop persist.vold.dont_commit_checkpoint 1
    vdc checkpoint startCheckpoint 10
    adb reboot
    wait for device to fully boot then
    adb reboot
    Wait for device to fully boot then
    adb logcat -d | grep Checkpoint shows the rollback in the logs

    This tests encryption on top of checkpoints with commit, encryption
    without checkpoints, and rollback, which seems to be the key cases.

    Also ran same tests on unmodified Taimen and Blueline

Bug: 135905679
Merged-In: I24387a2943dce28b918c34894f24911b20429be7
Change-Id: I24387a2943dce28b918c34894f24911b20429be7
2019-06-27 17:42:51 +00:00
Suren Baghdasaryan 8e3b94c2e2 Fix IsUsable to check for each controller separately
am: cb06c2b376

Change-Id: Id04ea4a5a208a307a7a2a3a6c801d38232921f36
2019-06-26 15:49:23 -07:00
Suren Baghdasaryan cb06c2b376 Fix IsUsable to check for each controller separately
CgroupController::IsUsable is using a global static variable to store the
existence of the controller. That means the first controller existence
check would affect all other controllers. Fix this by making this variable
to be a member of CgroupController class so that each controller can check
for its existence independently of other controllers.

Fixes: aa1d54f0cc ("Remove ACgroupController_getFlags to fix API breakage")
Bug: 136020193
Test: adb shell cat /proc/$pid/task/*/cgroup" prints "cpuset:/top-app"
Test: for new launched activity process
Change-Id: I4741a9126ea494122d5b2b1a0c4d7252bff6025c
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-06-26 18:30:07 +00:00
Dan Albert 5dd50fdb9c Revert "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor"
am: ba4684c2b2

Change-Id: Idd32e4c28031b07cda09477b819d4bce0434b4fb
2019-06-24 16:30:43 -07:00
Dan Albert e651cb7d7b Revert "adb: turn CHECKs into an error + transport restart."
am: 2547f740ea

Change-Id: Ic4ab7cf01bc53ece9f5459e60a7ba602ec086ef0
2019-06-24 16:30:40 -07:00
Dan Albert fe8fc7bb3d Revert "Reland "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND.""
am: 782036b7af

Change-Id: I73978ff63b91e14f79a719d0aec1ee7812749b2d
2019-06-24 16:30:35 -07:00
Dan Albert ba4684c2b2 Revert "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor"
This reverts commit b2d79c5e48.

Bug: http://b/135753060
Test: treehugger
Change-Id: I2b1b2b7dfb7bab783e4ed40e295329525ceaa0dd
2019-06-24 14:36:43 -07:00
Dan Albert 2547f740ea Revert "adb: turn CHECKs into an error + transport restart."
This reverts commit b41d7ae1a9.

Bug: http://b/135753060
Test: treehugger
Change-Id: Ib7cd7b7eaffa55ec2884a096a1c11739b12af6d1
2019-06-24 14:36:41 -07:00
Dan Albert 782036b7af Revert "Reland "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND.""
This reverts commit c33aee8ac1.

Bug: http://b/135753060
Test: treehugger
Change-Id: Ic83a44e7c8f860a6c044ca20ec81f365a8a6ba4b
2019-06-24 14:36:31 -07:00
Josh Gao c745f09b33 Merge changes Ibb3f46b8,I875b87a0,I2d005e17 into qt-dev
am: 64e64eb990

Change-Id: I9541e903885ed2fd5fc1b431f881d4aa33f03411
2019-06-21 19:49:07 -07:00
Josh Gao 64e64eb990 Merge changes Ibb3f46b8,I875b87a0,I2d005e17 into qt-dev
* changes:
  Reland "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND."
  adb: turn CHECKs into an error + transport restart.
  adb: daemon: Assign valid fd to usb_handle ep0 file descriptor
2019-06-22 02:33:06 +00:00
David Anderson b01de7fc76 Merge "fs_mgr: overlay: only use system_<other> if other slot suffix not blank" into qt-dev
am: e8d1fac1a6

Change-Id: I8d2a6dcca3df75e44a67e8f7e184d52a6558e1a5
2019-06-21 17:36:16 -07:00
David Anderson e8d1fac1a6 Merge "fs_mgr: overlay: only use system_<other> if other slot suffix not blank" into qt-dev 2019-06-22 00:07:56 +00:00
Josh Gao c33aee8ac1 Reland "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND."
Read until we receive FUNCTIONFS_BIND after every USB descriptor setup,
instead of only after initial creation of the control fd, so we properly
handle a rebind caused by a change of the USB configuration.

This reverts commit 55b31933f41b1c550b788fa2054010c51f56111b.

Bug: http://b/133132986
Bug: http://b/135155652
Test: manually enabled/disabled MTP with nonblocking_ffs enabled and disabled
Change-Id: Ibb3f46b8f84854ede47a669a85e07e16a5dd6008
Merged-In: Ibb3f46b8f84854ede47a669a85e07e16a5dd6008
(cherry picked from commit b00e66f754)
2019-06-21 14:29:21 -07:00
Janis Danisevskis 5cffb8992e [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b am: b25983460c am: 20e73e23c4 am: ca662c7118 am: 14d1d6add8
am: 4ea7584d34

Change-Id: I6c0c79a772b9114b84a0fbfd37a65fd6648f2660
2019-06-21 13:57:04 -07:00
Janis Danisevskis 4ea7584d34 [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b am: b25983460c am: 20e73e23c4 am: ca662c7118
am: 14d1d6add8

Change-Id: I6dfe27acaeba2ce4bc55169dcdccd14a7b9ee358
2019-06-21 13:52:15 -07:00
Janis Danisevskis 14d1d6add8 [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b am: b25983460c am: 20e73e23c4
am: ca662c7118

Change-Id: I07e889d6ed94901f2bf70f90c995873cc58d3bf4
2019-06-21 13:48:16 -07:00
Janis Danisevskis ca662c7118 [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b am: b25983460c
am: 20e73e23c4

Change-Id: I026aa5ddb79cd10146924fd6625816782645f660
2019-06-21 13:38:10 -07:00
Janis Danisevskis 20e73e23c4 [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b
am: b25983460c

Change-Id: Ie7a02bb3c7b283f3497a469e0cd3b2b69792d2f6
2019-06-21 13:33:05 -07:00
Mark Salyzyn e16fdcd66b fs_mgr: overlay: only use system_<other> if other slot suffix not blank
Test: adb-remount-test.sh
Bug: 129988285
Change-Id: Ib929d242e7cc4953096eb6300bcf7888ce2259ab
Merged-In: Ib929d242e7cc4953096eb6300bcf7888ce2259ab
2019-06-21 10:52:58 -07:00
Android Build Merger (Role) b25983460c [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b
Change-Id: I3fb4fc631eccd68a8f4468363d841855f94187f9
2019-06-20 22:31:20 +00:00
Android Build Merger (Role) 4ae4ad8e5b [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02
Change-Id: I98df60cfed36c714dae1fa4218d3c5ef23c4035c
2019-06-20 22:31:18 +00:00
Android Build Merger (Role) e126026c02 [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701
Change-Id: I25e3d526bb3f09c826d204909ea1763af4eb951d
2019-06-20 22:31:15 +00:00
Android Build Merger (Role) 7535975701 [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d
Change-Id: I2e9d6b1a5badb501adc641b17ce337c911d09610
2019-06-20 22:31:13 +00:00
Android Build Merger (Role) bdc924f31d [automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968
Change-Id: Ie5dd32eec9a24b329ff4c5fd18c8f535f43c9bc7
2019-06-20 22:31:11 +00:00
Janis Danisevskis 6a9c4e7968 Fix a memory leak in gatekeeper.
In violation to the documentation of GateKeeper::GetAuthTokenKey and
GateKeeper::GetPasswordKey, the implementations in SoftGateKeeper
allocate and return buffers and relinquish ownership causing a memory
leak, because the caller expects the implementation to retain ownership.

Bug: 129768470
Bug: 134557251
Test: gatekeeper-unit-tests
Change-Id: I0af9539d3dcd47dfd1e7d80cdee700ea0c2d6d0f
Merged-In: I0af9539d3dcd47dfd1e7d80cdee700ea0c2d6d0f
2019-06-20 22:31:06 +00:00
Steven Moreland 8908b264f4 Merge "libhwbinder users use libhidlbase" into qt-dev
am: 490f1cf074

Change-Id: I4ada2f9de1665292624280ffbd2da715004572ad
2019-06-20 13:10:00 -07:00
Steven Moreland 490f1cf074 Merge "libhwbinder users use libhidlbase" into qt-dev 2019-06-20 19:09:01 +00:00