Commit graph

49794 commits

Author SHA1 Message Date
Tim Murray
41f261df25 Merge "cutils: add ashmem_init" am: 55ba959c13
am: 3d213c39e8

Change-Id: Ib9335109c0226c34dce479ee56a5f231d23f8d19
2019-04-05 03:02:02 -07:00
Tim Murray
3d213c39e8 Merge "cutils: add ashmem_init"
am: 55ba959c13

Change-Id: Iaa91f5dd9752ea59d8e055c0ddb43a6ccc8852f0
2019-04-05 02:48:57 -07:00
Treehugger Robot
55ba959c13 Merge "cutils: add ashmem_init" 2019-04-05 09:35:11 +00:00
Matthew Maurer
9050ac337c Merge "Enable Trusty Gatekeeper@1.0" am: feae89302e
am: 6f400e949a

Change-Id: If7bc0f7456a2dfdb02486a99fd2296cfbe8fd5da
2019-04-04 22:37:49 -07:00
Matthew Maurer
6f400e949a Merge "Enable Trusty Gatekeeper@1.0"
am: feae89302e

Change-Id: I66759c486a482cdb29836ce17519ae0a4fe79a2a
2019-04-04 22:32:43 -07:00
Matthew Maurer
feae89302e Merge "Enable Trusty Gatekeeper@1.0" 2019-04-05 05:15:11 +00:00
Yifan Hong
39b0e570a8 [automerger skipped] Merge "CgroupSetupCgroups: don't leak fd." into qt-dev
am: bd0f767dfe -s ours
am skip reason: change_id I6683804bc795fab6798891a4471e5fe58fbffe13 with SHA1 8df75fc304 is in history

Change-Id: I7ae6787cae8472eee881dcf810c82854fec52a4f
2019-04-04 21:58:26 -07:00
TreeHugger Robot
bd0f767dfe Merge "CgroupSetupCgroups: don't leak fd." into qt-dev 2019-04-05 04:45:42 +00:00
Nick Kralevich
4b6532c19b Merge "zip_archive.cc: fix ubsan false positive" am: adcfbf804f
am: 694e91f676

Change-Id: I02bf6ded246ec64183eaff19893552497df53fbf
2019-04-04 20:44:25 -07:00
Nick Kralevich
694e91f676 Merge "zip_archive.cc: fix ubsan false positive"
am: adcfbf804f

Change-Id: Ia58127a6fc31aa67cd384504fde1f4f8b9a9ec95
2019-04-04 20:37:45 -07:00
Nick Kralevich
adcfbf804f Merge "zip_archive.cc: fix ubsan false positive" 2019-04-05 03:23:22 +00:00
Hridya Valsaraju
51776af89b [automerger skipped] Merge "Open image files in binary mode" into qt-dev
am: 0294313ad9 -s ours
am skip reason: change_id I64370af44a050bafea60ff1b0b2be18cc531480a with SHA1 1a6f6feff4 is in history

Change-Id: I5d2ab07717e76584820c6e6a30377e65925fee0c
2019-04-04 20:05:08 -07:00
TreeHugger Robot
0294313ad9 Merge "Open image files in binary mode" into qt-dev 2019-04-05 02:42:47 +00:00
Tim Murray
8879ed7f2a 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-04 17:30:25 -07:00
Yifan Hong
05d0369879 Merge "Allow to build non-sparse super image." am: 8c82af2454
am: b4889593ef

Change-Id: I707ee1d09f4329ec963b94a46b1f1ed9f9572c23
2019-04-04 16:32:51 -07:00
Yifan Hong
b4889593ef Merge "Allow to build non-sparse super image."
am: 8c82af2454

Change-Id: I80fd803222956573a04f000e9d0944065c74a8c7
2019-04-04 16:23:10 -07:00
Treehugger Robot
8c82af2454 Merge "Allow to build non-sparse super image." 2019-04-04 23:16:06 +00:00
Christopher Ferris
f000c1d246 [automerger skipped] Merge "Fix off by one reading build id." into qt-dev
am: 4a6483923c -s ours
am skip reason: change_id I97f4a204842447a20c812f535a458155b937d5e1 with SHA1 1760b45709 is in history

Change-Id: Ia847f2fc55622f4a1f39b48ea809a3d572686e6c
2019-04-04 14:57:16 -07:00
Nick Kralevich
a4e5433660 zip_archive.cc: fix ubsan false positive
std::hash returns a 64 bit value, which is truncated to a 32 bit value
in ComputeHash. ubsan's implicit-unsigned-integer-truncation doesn't
like this implicit truncation and crashes the program. Explicitly strip
off the top order bits after computing the hash.

Remove the windows specific version of the hash computation. The windows
compile now uses clang, so this code is obsolete. This also avoids us
having to add __attribute__((no_sanitize("integer"))) to the windows
code.

This is needed to support Android booting with ubsan's
implicit-unsigned-integer-truncation option enabled.

Test: compiles and boots
Bug: 122975762
Change-Id: I2f05fbf5ffee8e90a66a6fda32e80de9cca246c0
2019-04-04 14:53:11 -07:00
Christopher Ferris
4a6483923c Merge "Fix off by one reading build id." into qt-dev 2019-04-04 21:47:42 +00:00
Josh Gao
02dc0fcda0 Merge "adb: defuse CHECK on IOVector::append of an empty block." am: 5c58e092f3
am: c923599e0c

Change-Id: Iab58ded15e69a08176e586d2cdee46b3f742e56a
2019-04-04 14:22:15 -07:00
Josh Gao
c923599e0c Merge "adb: defuse CHECK on IOVector::append of an empty block."
am: 5c58e092f3

Change-Id: Ib540d05e1c51f93ca7c5ead4c2bbfa11047eec8f
2019-04-04 14:17:05 -07:00
Elliott Hughes
b5c760e53f Merge "Remove r in R." am: 17d9938894
am: c89fb434cb

Change-Id: Ib2c1a2a59c222f7677a8fd842969eb7c6e53e6ef
2019-04-04 14:08:10 -07:00
Treehugger Robot
5c58e092f3 Merge "adb: defuse CHECK on IOVector::append of an empty block." 2019-04-04 21:02:02 +00:00
Elliott Hughes
c89fb434cb Merge "Remove r in R."
am: 17d9938894

Change-Id: I58282f0be1b59f2d47d9b990c4b7ba144e242bb1
2019-04-04 14:02:01 -07:00
Elliott Hughes
17d9938894 Merge "Remove r in R." 2019-04-04 20:48:01 +00:00
Nick Kralevich
2c96e5c2fb Merge "Avoid leaking property values into logs on error" am: 21aa749ec7
am: 8b1ddf4144

Change-Id: If0f05c6691840f3fb15baca7210a4ed7a91cc666
2019-04-04 13:42:06 -07:00
Nick Kralevich
8b1ddf4144 Merge "Avoid leaking property values into logs on error"
am: 21aa749ec7

Change-Id: Icded1f49f819b4df4c47e088ed6f40f43e79e02d
2019-04-04 13:38:54 -07:00
Treehugger Robot
21aa749ec7 Merge "Avoid leaking property values into logs on error" 2019-04-04 20:19:31 +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
dd3546c839 libcgrouprc: version script: linux only
am: d588728951

Change-Id: I173a368ecabc2ee7b0f23309df0f3ea48d722ddf
2019-04-04 12:01:12 -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
Yifan Hong
a482da1d76 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
2019-04-04 11:33:38 -07:00
Elliott Hughes
0865266048 Remove r in R.
Obsoleted by toybox `devmem` instead.

Test: builds
Change-Id: I35c1ed2cfa9b3073cab405cfaf3c989fb2a72aa2
2019-04-04 10:45:12 -07:00
Yifan Hong
0ccda711b9 Merge "CgroupSetupCgroups: don't leak fd." am: cc5e2dc2e8
am: 236abef65a

Change-Id: I0b58446b03c21fab9e83497f7d84ec5ff6f4d9ad
2019-04-04 10:41:13 -07:00
Yifan Hong
236abef65a Merge "CgroupSetupCgroups: don't leak fd."
am: cc5e2dc2e8

Change-Id: I0e5f112c0d6d17c6e7581017c2679f58cdebc6d5
2019-04-04 10:38:12 -07:00
Treehugger Robot
cc5e2dc2e8 Merge "CgroupSetupCgroups: don't leak fd." 2019-04-04 17:27:27 +00:00
Nick Kralevich
9ca898fff8 Avoid leaking property values into logs on error
The purpose of having fine grain read/write control over the property
space is to help ensure the confidentiality of data stored in
properties. Leaking property values into the dmesg buffer on errors
exposes the value outside of the access control rules specified by
policy.

(arguably this is also true for the property name, not just the value.
However, property names are exposed in other places now, so the
incentive to fix this is lower. It would also take away a valuable
debugging tool.)

Test: compiles
Change-Id: I4a0634b8b5e4fd2edf718eaf7343940df627366d
2019-04-04 10:15:25 -07: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
Hridya Valsaraju
8edd564a7b Merge "Open image files in binary mode" am: 744677aaf5
am: 70c0861e22

Change-Id: I9dd733b712fe8b717e2008c7e21881e9933e5ffb
2019-04-04 03:22:04 -07:00
Yifan Hong
113ae0258c Merge "libcgrouprc: version script: linux only" am: 9e34eee481
am: f9660b3661

Change-Id: I0a78a7fc732e65abe995937941f51ef059f357b7
2019-04-04 03:07:54 -07:00
Christopher Ferris
96ba089ea8 Merge "Fix off by one reading build id." am: 82a93856be
am: f062e4d655

Change-Id: I0bd912fee4669fef44e8740d61546d2f2073d3a6
2019-04-04 02:51:18 -07:00
Hridya Valsaraju
70c0861e22 Merge "Open image files in binary mode"
am: 744677aaf5

Change-Id: I09e6672afb96324fa94da162a0be1226a1ff4174
2019-04-03 22:05:59 -07:00
Treehugger Robot
744677aaf5 Merge "Open image files in binary mode" 2019-04-04 04:38:26 +00:00
Yifan Hong
f9660b3661 Merge "libcgrouprc: version script: linux only"
am: 9e34eee481

Change-Id: I4b42e195ab61eeee1d988d521ade83b70228a755
2019-04-03 18:37:35 -07:00
Christopher Ferris
f062e4d655 Merge "Fix off by one reading build id."
am: 82a93856be

Change-Id: I1c8d4c8510becc2e878c8580ad96d2bb535e4cab
2019-04-03 18:36:11 -07:00
Hridya Valsaraju
1a6f6feff4 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
2019-04-03 18:14:14 -07:00
Treehugger Robot
9e34eee481 Merge "libcgrouprc: version script: linux only" 2019-04-04 00:58:47 +00:00
Christopher Ferris
82a93856be Merge "Fix off by one reading build id." 2019-04-04 00:57:40 +00:00