Commit Graph

50947 Commits

Author SHA1 Message Date
Josh Gao 7c3b87ffd2 Merge "Revert "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND."" am: a6f90ce599
am: 099fc95530

Change-Id: Iaa1d67735ed8a4c582c42b630cf90c2c384fd2f6
2019-06-14 16:55:35 -07:00
Josh Gao 099fc95530 Merge "Revert "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND.""
am: a6f90ce599

Change-Id: I39fd7c134b47dd2601a9bec6a013eb73568f9c4a
2019-06-14 16:44:34 -07:00
Josh Gao a6f90ce599 Merge "Revert "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND."" 2019-06-14 23:25:35 +00:00
Steve Muckle 941d1e7121 Merge "VtsKernelLiblpTest: use static test" am: 6860f68475
am: 94697281d0

Change-Id: Ic8f9e2bdf47ead09fe9dccc0162122a857be0f11
2019-06-14 16:22:29 -07:00
Josh Gao 9dba0f5824 Revert "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND."
We're only reading FUNCTIONFS_BIND on creation upon the first creation
of the control fd, which results in an abort when rebind happens (e.g.
when MTP is enabled) and we unexpectedly read FUNCTIONFS_BIND in the
second instantiation of the connection.

This reverts commit 2b668d3906.

Bug: http://b/135155652
Test: manually enabled MTP
2019-06-14 16:21:21 -07:00
Steve Muckle 94697281d0 Merge "VtsKernelLiblpTest: use static test"
am: 6860f68475

Change-Id: If6957eb82469bf687cb804fb6a54d73a3e6b0ed5
2019-06-14 16:11:18 -07:00
Treehugger Robot 6860f68475 Merge "VtsKernelLiblpTest: use static test" 2019-06-14 23:00:48 +00:00
Jaegeuk Kim fb43140c31 Merge "fs_mgr_fstab: translate reserve_root to reserved_size in fsmgr" am: c47618662f
am: 394e2ad0a2

Change-Id: I7b51b1083ae666a4692b25993175f88fc489de60
2019-06-14 15:19:48 -07:00
Jaegeuk Kim 394e2ad0a2 Merge "fs_mgr_fstab: translate reserve_root to reserved_size in fsmgr"
am: c47618662f

Change-Id: Ic3daa609c300fc6fa009a2c5dfd417cc4462bfb4
2019-06-14 15:11:11 -07:00
Jaegeuk Kim c47618662f Merge "fs_mgr_fstab: translate reserve_root to reserved_size in fsmgr" 2019-06-14 21:49:18 +00:00
Tom Cherry b208032521 Merge "Add Errorf and ErrnoErrorf" am: ebbe9e7391
am: a7c8b3c49f

Change-Id: Ie8b87bd13a324b9cc97b69a7a179e3e056919498
2019-06-14 11:47:33 -07:00
Tom Cherry a7c8b3c49f Merge "Add Errorf and ErrnoErrorf"
am: ebbe9e7391

Change-Id: I2d748929f5db5a06aaa685f0ae8dba75bdae637e
2019-06-14 11:39:26 -07:00
Steve Muckle 83019575ac VtsKernelLiblpTest: use static test
To avoid introducing dependencies on target libraries, use a statically
compiled test instead.

Bug: 134912860
Test: run vts-kernel -m VtsKernelLiblpTest
Change-Id: Ie24cc8532c7821cb225c024c240c4d485557bfa7
2019-06-14 11:37:09 -07:00
Tom Cherry ebbe9e7391 Merge "Add Errorf and ErrnoErrorf" 2019-06-14 18:12:00 +00:00
Jaegeuk Kim f07d07bf47 fs_mgr_fstab: translate reserve_root to reserved_size in fsmgr
Without this patch, fstab should decribe reserve_root=[# of 4KB blocks] in
f2fs mount option as well as reserved_size=[KB] in fsmgr flag to notify it
to framework.
With this patch, it should be just fine to use reserve_root=[# of 4KB blocks]
in fstab.

Bug: 135003600
Test: checked vold.has_reserved
Change-Id: Iab75f7da9792ad205a6c4d2d0f1eba8c16a5266a
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-06-14 17:38:33 +00:00
Peter Collingbourne 0070e92aff Merge "Link the sanitizer runtime libraries to the default unrestricted namespace." am: 2d620c00f3
am: 41e3b68758

Change-Id: Ie138c5a1373ded873c80312b101eb5738d99a80e
2019-06-13 23:58:03 -07:00
Peter Collingbourne 41e3b68758 Merge "Link the sanitizer runtime libraries to the default unrestricted namespace."
am: 2d620c00f3

Change-Id: I76b87f8ddc10409fad653aacdecd84293cd64179
2019-06-13 23:50:02 -07:00
Treehugger Robot 2d620c00f3 Merge "Link the sanitizer runtime libraries to the default unrestricted namespace." 2019-06-14 06:37:38 +00:00
Jiyong Park 20524ed6a2 Add Errorf and ErrnoErrorf
String formatting for error message can be done by using Errorf and
ErrnoErrorf. e.g. `return Errorf("{} failures", num_failure);`

The string format follows that of fmtlib, not printf.

Bug: 132145659
Test: libbase_test
Change-Id: I65f45d5f12ed23e2c14d6eb442278f467cc42e83
2019-06-14 14:29:36 +09:00
Dongcheol Shin 9b3ad8846b Merge "Support importing property file with expanded name" am: 69880e1a39
am: c3967a111d

Change-Id: I59419d8087ca0d2f13685bf86e3c122ae61dc0ab
2019-06-13 18:51:49 -07:00
Peter Collingbourne 563ca38154 Link the sanitizer runtime libraries to the default unrestricted namespace.
Without this, binaries can't be run out of /data/local/tmp on a HWASANified
device.

Test: Chromium's /data/local/tmp/md5sum/md5sum_bin works on walleye_hwasan-userdebug
Change-Id: Ieceaab8aae0024864022ca42b38aa36e6212cf31
2019-06-13 18:50:46 -07:00
Dongcheol Shin c3967a111d Merge "Support importing property file with expanded name"
am: 69880e1a39

Change-Id: Ic2453514c72ddd88269cef659df42642997427c9
2019-06-13 17:31:18 -07:00
Treehugger Robot 69880e1a39 Merge "Support importing property file with expanded name" 2019-06-13 23:40:48 +00:00
Dongcheol Shin a87c0f99ad Support importing property file with expanded name
This change is to support importing property file with its path
variations.

By substitute its filename with another, it can be used to handle
runtime varying filename within single binary.

Here's an example of usage in property defined file.
    import /odm/build_${ro.boot.product.hardware.sku}.prop

Bug: 132592551
Test: boot a device and checks above example import statement in
    "/odm/build.prop" loading expanded filename correctly

Change-Id: If3fdcf620a5d717e0930b1e4e58261bc8f79ec24
2019-06-13 23:40:23 +00:00
Elliott Hughes 4955543050 Merge "ziparchive: add a std::string_view overload to Next." am: bc420c4748
am: 7068fc739e

Change-Id: I114bb4d471a1d84e0004898c5bc62db81b9e6cdd
2019-06-13 07:33:40 -07:00
Elliott Hughes 7068fc739e Merge "ziparchive: add a std::string_view overload to Next."
am: bc420c4748

Change-Id: Iee7491a8fb184d1d5cea5d117b6a62732b6de9d1
2019-06-13 07:26:48 -07:00
Elliott Hughes bc420c4748 Merge "ziparchive: add a std::string_view overload to Next." 2019-06-13 14:13:02 +00:00
Min Yun ce98fdefee [automerger skipped] Merge "Add libcgrouprc to ld.config.txt." into qt-dev
am: 4e5fddd5f5 -s ours
am skip reason: change_id I7d3e7e6477708a505b87a884e05cd719f5a3d496 with SHA1 d695733df9 is in history

Change-Id: I143bd517f40f4b9829a27bde9dfd68e0c0f4f82e
2019-06-12 15:50:22 -07:00
TreeHugger Robot 4e5fddd5f5 Merge "Add libcgrouprc to ld.config.txt." into qt-dev 2019-06-12 22:36:30 +00:00
mtk16036 f3d94aa5b1 [automerger skipped] race condition in libprocessgroup
am: 540b1556c9 -s ours
am skip reason: change_id Iccf2f705e030f79324f1164509e715dc5be825de with SHA1 53f79e6861 is in history

Change-Id: I4ebf37df6f143263c9fae847a6224c404fed1958
2019-06-12 15:19:45 -07:00
David Anderson cb4f84ee3a Merge "fastbootd: Don't include all of the fs_mgr namespace in commands.cpp." am: 5482189612
am: 2836aee649

Change-Id: I9720e52a8e53d54663f746506acaba4f55f516d0
2019-06-12 14:35:52 -07:00
David Anderson 6e439bf7b2 Merge "libfiemap_writer: Handle dm stacking more accurately." am: 43d9ced663
am: da64dc5322

Change-Id: If7c5aff8c9a5e71fd600118a6539d904bc0d1429
2019-06-12 14:34:22 -07:00
David Anderson 2836aee649 Merge "fastbootd: Don't include all of the fs_mgr namespace in commands.cpp."
am: 5482189612

Change-Id: I02ae71163c875a6cef5dd2bdb72e31b4ead5b0f5
2019-06-12 14:28:47 -07:00
David Anderson da64dc5322 Merge "libfiemap_writer: Handle dm stacking more accurately."
am: 43d9ced663

Change-Id: I5cae48a9bf110a24539ef66531a408dcc3a15fd2
2019-06-12 14:27:19 -07:00
David Anderson 5482189612 Merge "fastbootd: Don't include all of the fs_mgr namespace in commands.cpp." 2019-06-12 21:10:33 +00:00
David Anderson 43d9ced663 Merge "libfiemap_writer: Handle dm stacking more accurately." 2019-06-12 21:09:59 +00:00
mtk16036 540b1556c9 race condition in libprocessgroup
while enable fdsan (file descriptor sanitizer),
fdsan report use-after-close error after boot complete (sedom).

Because, in SetCgroupAction::EnableResourceCaching() currently has a data race against all the
use fd_ functions like SetCgroupAction::ExecuteForProcess(uid_t uid, pid_t pid) etc.

ThreadA                                     | ThreadB
-------------------------------------------------------------------------------------------------
in SetCgroupAction::EnableResourceCaching() | in SetCgroupAction::ExecuteForProcess(...)
-------------------------------------------------------------------------------------------------
                                            | in SetCgroupAction::AddTidToCgroup(int tid, int fd)
-------------------------------------------------------------------------------------------------
fd_ = std::move(fd); /*modified fd_ value*/ |
-------------------------------------------------------------------------------------------------
                                            | write(fd)  /* crash here, fd is closed by ThreadA*/
-------------------------------------------------------------------------------------------------

So, add mutex lock to protect fd_ data race.

Bug: 134120826
Test: auto test, run the adb reboot test 100 times and no fdsan error report on libprocessgroup
Merged-In: Iccf2f705e030f79324f1164509e715dc5be825de
Change-Id: Iccf2f705e030f79324f1164509e715dc5be825de
2019-06-12 19:27:14 +00:00
Elliott Hughes 1e40c30b0c ziparchive: add a std::string_view overload to Next.
Recovery wanted this, and frameworks/base/ wants it too.

Bug: http://b/129068177
Test: treehugger
Change-Id: I8ee3f7c058fc9c1cde829da613ed15be5ce7b41e
2019-06-12 12:12:47 -07:00
Christopher Ferris b21fdb7972 Merge "Internalize subclasses of Memory" am: 5fb660930c
am: 7ad4c6b7f8

Change-Id: Ic0ba267a0bdb081158ae4cc81ec025cc3dba0947
2019-06-12 09:31:22 -07:00
Christopher Ferris 7ad4c6b7f8 Merge "Internalize subclasses of Memory"
am: 5fb660930c

Change-Id: I1fc6df9d1c6a195e78e62a6361ad1c9df0e28a8c
2019-06-12 09:23:19 -07:00
Christopher Ferris 5fb660930c Merge "Internalize subclasses of Memory" 2019-06-12 16:10:10 +00:00
Jiyong Park 6b5f5a202d Merge "Add libcgrouprc to ld.config.txt." am: 210b56e9a8
am: 875326a506

Change-Id: I502624287fc3cbffb7364c0a6850bae3fc5080f6
2019-06-12 08:35:13 -07:00
Jiyong Park 875326a506 Merge "Add libcgrouprc to ld.config.txt."
am: 210b56e9a8

Change-Id: I970388547469429bf3da64604c4141111387d37a
2019-06-12 08:29:09 -07:00
Jiyong Park 210b56e9a8 Merge "Add libcgrouprc to ld.config.txt." 2019-06-12 15:15:51 +00:00
Josh Gao db51d08cc8 Merge "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND." am: cb2352a75d
am: b965eea9c6

Change-Id: I81d74942931f8ede3e0c29d1ecef08d3f4f8149c
2019-06-12 07:53:09 -07:00
Josh Gao b965eea9c6 Merge "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND."
am: cb2352a75d

Change-Id: I4245392aabc9fce64ef79c54f00f7c9d35c36958
2019-06-12 07:47:10 -07:00
Treehugger Robot cb2352a75d Merge "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND." 2019-06-12 14:34:14 +00:00
Suren Baghdasaryan 4df6f518d8 Merge "race condition in libprocessgroup" am: aba081c119
am: 9a7ef4957e

Change-Id: I05705adc808290495807d4d52cf45aebc6cb90dc
2019-06-12 07:06:32 -07:00
Suren Baghdasaryan 9a7ef4957e Merge "race condition in libprocessgroup"
am: aba081c119

Change-Id: If21a1b91bd5fe2b45bf95a69e5b8f479b01a396b
2019-06-12 07:01:31 -07:00
Suren Baghdasaryan aba081c119 Merge "race condition in libprocessgroup" 2019-06-12 13:55:33 +00:00