Commit graph

49797 commits

Author SHA1 Message Date
TreeHugger Robot
0294313ad9 Merge "Open image files in binary mode" into qt-dev 2019-04-05 02:42:47 +00:00
Tim Murray
943f1c1d4a cutils: add ashmem_init
Add a new ashmem_init function that only dlopens libashmemd_client.
This allows the library to be preloaded in the zygote.

Test: boots, works
Bug: 129543489

Change-Id: Ie106791edf381654f085203c266c9f9c0df35cfc
2019-04-05 00:28:05 +00:00
Yifan Hong
b4b2bfc115 Allow to build non-sparse super image.
- Rename SparseBuilder to ImageBuilder, WriteSplitSparseFiles
  to WriteSplitImageFiles, WriteToSparseFile to WriteToImageFile, etc.
- Add sparsify argument to ImageBuilder, WriteToImageFile, and
  WriteSplitImageFiles

This allows lpmake to write non-sparse super image directly. Virtual
devices needs non-sparse images to work on.

Test: lpmake without --sparse
Test: liblp_test
Bug: 120041578

Change-Id: I76ee09efd02df7caaa8abd37a55ae0bebf9cfa29
Merged-In: I76ee09efd02df7caaa8abd37a55ae0bebf9cfa29
2019-04-04 16:34:05 -07:00
Christopher Ferris
4a6483923c Merge "Fix off by one reading build id." into qt-dev 2019-04-04 21:47:42 +00:00
Yifan Hong
0558e58214 CgroupSetupCgroups: don't leak fd.
- If file is unlinked, the mmapped region is still there.
- If file is truncated, a SIGBUS will be seen, and holding
  the fd doesn't help.

Test: boots (sanity)
Bug: 123664216
Change-Id: I6683804bc795fab6798891a4471e5fe58fbffe13
Merged-In: I6683804bc795fab6798891a4471e5fe58fbffe13
2019-04-04 13:14:10 -07:00
Yifan Hong
d588728951 libcgrouprc: version script: linux only
mac builds doesn't support version script.
This fixes the build.

Test: pass

Fixes: 129905103

Change-Id: Ia3d06e4eff05b41982b3dfbb946efa41358b2c76
2019-04-04 18:48:16 +00:00
Hridya Valsaraju
4113cf749e Open image files in binary mode
This is required for read() to function correctly
in Windows since it behaves differently in text mode and
binary mode and may cause unpredictable behavior depending
on the contents of the image file.

Bug: 129281908
Test: fastboot.exe flashall
Change-Id: I64370af44a050bafea60ff1b0b2be18cc531480a
Merged-In: I64370af44a050bafea60ff1b0b2be18cc531480a
(cherry picked from commit 1a6f6feff4)
2019-04-04 09:48:29 -07:00
Christopher Ferris
a46de76024 Fix off by one reading build id.
Update unit tests and add new build id displaying in offline unwinds.

Bug: 129873279

Test: All unit tests pass.
Test: Verify that debuggerd displays build id properly.
Change-Id: I97f4a204842447a20c812f535a458155b937d5e1
Merged-In: I97f4a204842447a20c812f535a458155b937d5e1
(cherry picked from commit 1760b45709)
2019-04-04 09:26:28 -07:00
Jaegeuk Kim
20b0bd9ca4 Merge "libfiemap_writer: test pinned file bit" am: 73bb342956 am: e0df95d8a8
am: fa5dced8ea

Change-Id: I1008eb301eb4b6f813e3a14e739492695c7dd896
2019-04-03 15:21:06 -07:00
Jaegeuk Kim
fa5dced8ea Merge "libfiemap_writer: test pinned file bit" am: 73bb342956
am: e0df95d8a8

Change-Id: I02a0da79d123a8ef7ea13af7ffcef3e3b487dc57
2019-04-03 15:13:03 -07:00
Jaegeuk Kim
e0df95d8a8 Merge "libfiemap_writer: test pinned file bit"
am: 73bb342956

Change-Id: I2a4b5794e2be4c28f2362ed95e8cd75994d02cbd
2019-04-03 15:04:24 -07:00
Treehugger Robot
73bb342956 Merge "libfiemap_writer: test pinned file bit" 2019-04-03 21:31:18 +00:00
Yifan Hong
662eeac40c [automerger skipped] Merge changes from topic "libprocessgroup_rc" am: 25d42eeaa6 am: 8f3d266984
am: 10f7835736 -s ours
am skip reason: change_id I47c46ca9ba5c1fbf3f9f7a1b185dc48b058b1e32 with SHA1 eecba5c11d is in history

Change-Id: I55e5a8c5e71ff037bb391909a167d3b3db69d37a
2019-04-03 14:01:08 -07:00
Yifan Hong
2b040de4d7 [automerger skipped] Add libcgrouprc to ld.config.*.txt. am: 063b6beef0 am: 4e52c76d92
am: 794f523b80 -s ours
am skip reason: change_id I23c3ece44816e4e213f9630b915e19978a259823 with SHA1 169a3e6095 is in history

Change-Id: I27ec2c2dce10b2bbf6929f6b4b4c2ef8fe823e0c
2019-04-03 14:00:12 -07:00
Yifan Hong
0f50989a61 [automerger skipped] libprocessgroup: use libcgrouprc to read cgroup.rc am: 53e0deb7b2 am: c2cb4aa768
am: 30559a8a00 -s ours
am skip reason: change_id I635d9885db62e82f37421f6d20f59c84a6f4cbb2 with SHA1 fad638c82d is in history

Change-Id: I531a2cc66c5374ad0a8ffdd0bb4e6b2294bfbf51
2019-04-03 13:59:24 -07:00
Yifan Hong
8fa5f95050 [automerger skipped] libprocessgroup_setup: use libcgrouprc_format am: d8ce1fb1d1 am: edca509a38
am: 818d7e3678 -s ours
am skip reason: change_id If5e2301a1b65c3f6a51a1661cfeeed4e299f634e with SHA1 1a0996a308 is in history

Change-Id: If71b56793a251a5c318787d680df32be6c9e294e
2019-04-03 13:58:25 -07:00
Yifan Hong
ba414d95c5 [automerger skipped] libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup am: 6f9ce2e548 am: c1c18f9a04
am: e7f9de2cc7 -s ours
am skip reason: change_id I941dc0c415e2b22ae663d43e30dc7a464687325e with SHA1 bd623a4ce0 is in history

Change-Id: Ifec90c82d6e1c58be8c6e1328cb858e6d3a8edcb
2019-04-03 13:57:38 -07:00
Yifan Hong
8298fc6177 [automerger skipped] libprocessgroup: Add libcgrouprc am: 098323ba5b am: 15c6496640
am: 6dc78dc56f -s ours
am skip reason: change_id I9c13c0528461758154e23cbab3a94ade7fb351ee with SHA1 d895647095 is in history

Change-Id: I9233b271e03ec67ff7bfa3ef728d227cc6aef01d
2019-04-03 13:56:51 -07:00
Yifan Hong
7a8be29c1c [automerger skipped] libprocessgroup: Add libcgrouprc_format am: c4b3ab4edc am: 7e7c203528
am: e470498138 -s ours
am skip reason: change_id Iaf6199f759a6264590b13ca7ba6d7f576c3ed56a with SHA1 f4212744ed is in history

Change-Id: Ibcd0a74102a606e7dccc7f65f58cb56968d01fbb
2019-04-03 13:56:06 -07:00
Yifan Hong
10f7835736 Merge changes from topic "libprocessgroup_rc" am: 25d42eeaa6
am: 8f3d266984

Change-Id: Iec5b74b1e6a72f5afd1386f902aae7e942d104cd
2019-04-03 12:54:53 -07:00
Yifan Hong
794f523b80 Add libcgrouprc to ld.config.*.txt. am: 063b6beef0
am: 4e52c76d92

Change-Id: I4c05c28b213a3781cd94b34de64d95c7aaa22320
2019-04-03 12:54:05 -07:00
Yifan Hong
30559a8a00 libprocessgroup: use libcgrouprc to read cgroup.rc am: 53e0deb7b2
am: c2cb4aa768

Change-Id: Icb28519d3ed68751de8bad36611ab090b276a4bb
2019-04-03 12:53:13 -07:00
Yifan Hong
818d7e3678 libprocessgroup_setup: use libcgrouprc_format am: d8ce1fb1d1
am: edca509a38

Change-Id: I584367960506fcc724bb8a20b78cc5091084e131
2019-04-03 12:52:36 -07:00
Yifan Hong
e7f9de2cc7 libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup am: 6f9ce2e548
am: c1c18f9a04

Change-Id: I4d716a985ea666324d3daaaa0d00a5a90cd3c3ea
2019-04-03 12:51:59 -07:00
Yifan Hong
6dc78dc56f libprocessgroup: Add libcgrouprc am: 098323ba5b
am: 15c6496640

Change-Id: I2e6969425516c307275f94d21d8161999eebecd4
2019-04-03 12:51:23 -07:00
Yifan Hong
e470498138 libprocessgroup: Add libcgrouprc_format am: c4b3ab4edc
am: 7e7c203528

Change-Id: Iadd78024c14c6406dda85743e7315b62a338dd1e
2019-04-03 12:50:46 -07:00
Yifan Hong
8f3d266984 Merge changes from topic "libprocessgroup_rc"
am: 25d42eeaa6

Change-Id: I73dab7acb0ae8359572c25e2138e11609d5878ef
2019-04-03 12:35:20 -07:00
Yifan Hong
4e52c76d92 Add libcgrouprc to ld.config.*.txt.
am: 063b6beef0

Change-Id: Iae9ed8a20e0dfed73489ba8973feab62e8d20065
2019-04-03 12:34:03 -07:00
Yifan Hong
c2cb4aa768 libprocessgroup: use libcgrouprc to read cgroup.rc
am: 53e0deb7b2

Change-Id: I154787974376c5bce3d158ac2b70a9444c0fc295
2019-04-03 12:32:51 -07:00
Yifan Hong
edca509a38 libprocessgroup_setup: use libcgrouprc_format
am: d8ce1fb1d1

Change-Id: I43c903bae8fdbe752d70914c088a4770e192af22
2019-04-03 12:31:25 -07:00
Yifan Hong
c1c18f9a04 libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup
am: 6f9ce2e548

Change-Id: I3a0ccd7894d17a83c898718807387968bef44c3a
2019-04-03 12:29:30 -07:00
Yifan Hong
15c6496640 libprocessgroup: Add libcgrouprc
am: 098323ba5b

Change-Id: Ia385e7d0af1b6f0801b9f4c3d88d756acebaa02a
2019-04-03 12:27:30 -07:00
Yifan Hong
7e7c203528 libprocessgroup: Add libcgrouprc_format
am: c4b3ab4edc

Change-Id: I5c24cd183a45d87997118c8fbe26d0b526ed78fd
2019-04-03 12:25:22 -07:00
Yifan Hong
25d42eeaa6 Merge changes from topic "libprocessgroup_rc"
* changes:
  CgroupSetupCgroups -> CgroupSetup
  Add libcgrouprc to ld.config.*.txt.
  libprocessgroup: use libcgrouprc to read cgroup.rc
  libprocessgroup_setup: use libcgrouprc_format
  libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup
  libprocessgroup: Add libcgrouprc
  libprocessgroup: Add libcgrouprc_format
2019-04-03 19:08:51 +00:00
Yifan Hong
bd5853cb48 Merge changes from topic "libprocessgroup_rc"
* changes:
  CgroupSetupCgroups -> CgroupSetup
  Add libcgrouprc to ld.config.*.txt.
  libprocessgroup: use libcgrouprc to read cgroup.rc
  libprocessgroup_setup: use libcgrouprc_format
  libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup
  libprocessgroup: Add libcgrouprc
  libprocessgroup: Add libcgrouprc_format
2019-04-03 16:41:21 +00:00
Julien Desprez
f3ec311a9c Merge "Replace reboot-fastboot by reboot fastboot" am: cd68bda4ec am: d2353d030f
am: 168be967f5

Change-Id: I32b6726dc8b03bf04a161ea3b8ced5aa29dfb923
2019-04-03 02:37:58 -07:00
Julien Desprez
168be967f5 Merge "Replace reboot-fastboot by reboot fastboot" am: cd68bda4ec
am: d2353d030f

Change-Id: I248e96898c155c019e0af826b92520f373e3773e
2019-04-03 02:30:33 -07:00
David Srbecky
50a70173e5 Merge "Check for data races when reading JIT/DEX entries." am: 59c70a5b75 am: 9363485979
am: 4d03a384c2

Change-Id: Ice57130b051b8e2024594856252acea834ffa990
2019-04-03 02:07:55 -07:00
Julien Desprez
d2353d030f Merge "Replace reboot-fastboot by reboot fastboot"
am: cd68bda4ec

Change-Id: I311a3b93b27a8360aa81447d482e6c0c2e2cc404
2019-04-03 01:43:07 -07:00
David Srbecky
4d03a384c2 Merge "Check for data races when reading JIT/DEX entries." am: 59c70a5b75
am: 9363485979

Change-Id: If702c873330b09020dd701f5e786a03ca4d28ac0
2019-04-03 01:39:57 -07:00
Treehugger Robot
cd68bda4ec Merge "Replace reboot-fastboot by reboot fastboot" 2019-04-03 08:24:34 +00:00
David Srbecky
9363485979 Merge "Check for data races when reading JIT/DEX entries."
am: 59c70a5b75

Change-Id: I64832ce6d28f0dd0c9036e48031ce3b9faae8dac
2019-04-03 01:17:45 -07:00
David Srbecky
59c70a5b75 Merge "Check for data races when reading JIT/DEX entries." 2019-04-03 07:15:39 +00:00
TreeHugger Robot
bdf2df0f15 Merge "Increase the SO_SNDBUF for statsd socket." 2019-04-03 05:55:26 +00:00
Yifan Hong
063b6beef0 Add libcgrouprc to ld.config.*.txt.
Test: boots (sanity)
Bug: 123664216
Change-Id: I23c3ece44816e4e213f9630b915e19978a259823
Merged-In: I23c3ece44816e4e213f9630b915e19978a259823
2019-04-02 22:31:57 -07:00
Yifan Hong
53e0deb7b2 libprocessgroup: use libcgrouprc to read cgroup.rc
Use the LL-NDK library to read cgroup.rc.

As a side-effect, the CgroupController class is changed
to a wrapper of ACgroupController* from the library. The
class itself essentially becomes the pointer, and can be
trivially copied. Modify all client code for this change.

Test: builds and boots
Bug: 123664216

Change-Id: I635d9885db62e82f37421f6d20f59c84a6f4cbb2
Merged-In: I635d9885db62e82f37421f6d20f59c84a6f4cbb2
2019-04-02 22:31:57 -07:00
Yifan Hong
d8ce1fb1d1 libprocessgroup_setup: use libcgrouprc_format
Use CgroupController definition from libcgrouprc_format, not
libprocessgroup, because the wire format will be removed
from libprocessgroup later.

Bug: 123664216
Test: builds
Change-Id: If5e2301a1b65c3f6a51a1661cfeeed4e299f634e
Merged-In: If5e2301a1b65c3f6a51a1661cfeeed4e299f634e
2019-04-02 22:31:57 -07:00
Yifan Hong
6f9ce2e548 libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup
Only init uses SetupCgroups. This functionality is
moved from libprocessgroup to its own library, and only
init links to it.

Also, merge CgroupSetupCgroups() with CgroupMap::SetupCgroups()
because the former is just an alias of the latter, and
CgroupMap does not belong to libcgrouprc_setup.

Test: boots
Bug: 123664216
Change-Id: I941dc0c415e2b22ae663d43e30dc7a464687325e
Merged-In: I941dc0c415e2b22ae663d43e30dc7a464687325e
2019-04-02 22:31:57 -07:00
Yifan Hong
098323ba5b libprocessgroup: Add libcgrouprc
This module is an LL-NDK library that can be loaded by
modules that link to libprocessgroup (which is in VNDK).
This module defines APIs that reads cgroups.rc file
programatically. Internally, it uses libcgrouprc_format to
do so.

Test: builds
Bug: 123664216

Change-Id: I9c13c0528461758154e23cbab3a94ade7fb351ee
Merged-In: I9c13c0528461758154e23cbab3a94ade7fb351ee
2019-04-02 22:31:57 -07:00
Yifan Hong
c4b3ab4edc libprocessgroup: Add libcgrouprc_format
This module defines the wire format of the mmap()ed cgroup.rc
file.

Test: builds
Bug: 123664216

Change-Id: Iaf6199f759a6264590b13ca7ba6d7f576c3ed56a
Merged-In: Iaf6199f759a6264590b13ca7ba6d7f576c3ed56a
2019-04-02 22:31:57 -07:00