Commit Graph

58592 Commits

Author SHA1 Message Date
Elliott Hughes a31c38df2d Merge "libunwindstack: support for Armv8.3-A Pointer Authentication" am: 1270608dbf
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1215022

Change-Id: I6ca4b5c940c624c7bceb4c4da2da17dd9c344ca6
2020-07-17 18:11:53 +00:00
Elliott Hughes 1270608dbf Merge "libunwindstack: support for Armv8.3-A Pointer Authentication" 2020-07-17 18:01:19 +00:00
Tom Cherry e7e77f71c4 Merge "logd: always compress SerializedLogChunk in FinishWriting()" am: aa0358b8fe
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1365225

Change-Id: I3b1565a75467cbc82f87ff08c4f9801229b680d7
2020-07-17 17:15:51 +00:00
Tom Cherry aa0358b8fe Merge "logd: always compress SerializedLogChunk in FinishWriting()" 2020-07-17 17:02:20 +00:00
Tom Cherry 59caa7a045 logd: always compress SerializedLogChunk in FinishWriting()
When calculating the space used for pruning, if a log chunk is
compressed, that size is used otherwise the uncompressed size is
used.  This is intended to reach a steady state where 1/4 of the log
buffer is the uncompressed log chunk that is being written to and the
other 3/4 of the log buffer is compressed logs.

If we wait until there are no readers referencing the log chunk before
compressing it, we end up with 2 uncompressed logs (the one that was
just filled, that readers are still referencing, and the new one that
was allocated to fit the most recent log), which take up 1/2 of the
log buffer's allotted size and will thus cause prune to delete more
compressed logs than it should.

Instead, we should always compress the log chunks in FinishWriting()
such that the compressed size will always be used for log chunks other
than the one that is not actively written to.

Decompressed logs due to readers are ephemeral by their nature and
thus don't add to the log buffer size for pruning.

Test: observe that log buffers can be filled in the presence of a reader.
Change-Id: Ie21ccff032e41c4a0e51710cc435c5ab316563cb
2020-07-16 20:46:14 -07:00
Treehugger Robot d2ec029290 Merge "Revert "Temporarily disable init_kill_services_test."" am: e866ce04a7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362864

Change-Id: I6d38f4f2ba5deb7537b73d5501166438d8d1c9b1
2020-07-16 21:54:54 +00:00
Treehugger Robot e866ce04a7 Merge "Revert "Temporarily disable init_kill_services_test."" 2020-07-16 21:29:33 +00:00
Treehugger Robot f898aade18 Merge "Fix quoting of paths in auth code." am: b371af9e0f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1363936

Change-Id: Ide1441464235ad2839b752e3642a8c88aa7cd784
2020-07-16 17:01:22 +00:00
Treehugger Robot b371af9e0f Merge "Fix quoting of paths in auth code." 2020-07-16 16:47:20 +00:00
Michael Wright 009d58d8da Merge "Soften BitSet class comment." am: 2ea91cfe76
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360510

Change-Id: Ie3339cabc02b476dd45bc028de09de7d4ee37a2f
2020-07-16 12:45:22 +00:00
Michael Wright 2ea91cfe76 Merge "Soften BitSet class comment." 2020-07-16 12:28:03 +00:00
Alex Buynytskyy 5f3ced82f4 Merge "install-multi-package fix" am: 35f3169c5c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362351

Change-Id: I670d3929fb307bc1ac0c76d05203a528c000ddd0
2020-07-16 05:48:42 +00:00
Alex Buynytskyy 35f3169c5c Merge "install-multi-package fix" 2020-07-16 05:34:44 +00:00
Alex Buynytskyy 71afeb9a5e install-multi-package fix
Fixes: 158851500
Test: adb install-multi-package -d -g $HOME/tmp/base-master.apk:$HOME/tmp/base-en.apk
Change-Id: I92e034c0a8c27eab6d5a82e96817af4a7555388f
Merged-In: I92e034c0a8c27eab6d5a82e96817af4a7555388f
2020-07-16 04:57:07 +00:00
Michael Wright f32317c869 Soften BitSet class comment.
std::bitset<> doesn't have exact replacements for all of the
functionality of BitSet32/64, so there are still places we want to use
these classes.

Bug: 160010896
Test: test BitSet_test.cpp
Change-Id: Ica59a138e014d82139fb6dcea0597a207faecc2a
2020-07-16 00:04:20 +00:00
Tom Cherry fc207e2d16 Merge "logd: don't use a thread for deleting log chunks" am: 7c95de7591
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1359387

Change-Id: Ia2c0e03501ea486960e4d4bc826d798ee69bd7a5
2020-07-15 23:14:17 +00:00
Tom Cherry c89430bda3 Merge "logd: allow opting into simple or serialized log buffers" am: ed99870f79
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362341

Change-Id: I5f932bee0e53c7ad66b3b34774b28aa241cde4ed
2020-07-15 23:13:45 +00:00
Tom Cherry 7c95de7591 Merge "logd: don't use a thread for deleting log chunks" 2020-07-15 22:57:50 +00:00
Tom Cherry ed99870f79 Merge "logd: allow opting into simple or serialized log buffers" 2020-07-15 22:56:57 +00:00
Elliott Hughes bdb5233f0c Fix quoting of paths in auth code.
Noticed looked at the log in http://b/160831491.

Test: builds
Change-Id: I95c595ba433a868dedeee8059cfba4c6de8ba91b
2020-07-15 11:55:40 -07:00
Treehugger Robot 28d3a43275 Merge "Fix an issue with C-compatibility due to a missing tag name" am: 37b0d41faf
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362857

Change-Id: I52f96d0d78c15d725c217e90dd08de369ea580b1
2020-07-14 22:29:08 +00:00
Treehugger Robot 37b0d41faf Merge "Fix an issue with C-compatibility due to a missing tag name" 2020-07-14 22:15:36 +00:00
Stephen Hines 84fac2c5d0 Fix an issue with C-compatibility due to a missing tag name
system/core/libpixelflinger/include/pixelflinger/format.h:85:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror,-Wnon-c-typedef-for-linkage]
typedef struct {
              ^
              GGLFormat
system/core/libpixelflinger/include/pixelflinger/format.h:98:5: note: type is not C-compatible due to this member declaration
     inline uint32_t mask(int i) const {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
system/core/libpixelflinger/include/pixelflinger/format.h:124:3: note: type is given name 'GGLFormat' for linkage purposes by this typedef declaration
} GGLFormat;
  ^

Bug: http://b/155835175
Test: m with aosp_blueline
Change-Id: I2819427e2c9e885f7b66527d5268987e8cc73f31
Merged-In: I73b95ff1d6d17af512ce2226b6324e5da0343c39
2020-07-14 14:38:43 -07:00
Steven Moreland a3d40729a5 Revert "Temporarily disable init_kill_services_test."
This reverts commit bd68757d44.

Reason for revert: reland test

The test now reboots after it is completed, in case there is some state it doesn't catch locally, and servicemanager restarts more of the system.

Change-Id: I1d6d021f75ef091aa7d6973b80ed162253514697
Fixes: 156380383
Test: atest init_kill_services_test # several times on cf, check logs to confirm system finishes in clean rebooted state
2020-07-14 21:14:19 +00:00
Tamas Petz 6835d019b2 libunwindstack: support for Armv8.3-A Pointer Authentication
This patch adds support for handling return addresses signed with
pointer authentication. It simply strips the authentication code
without verifying its correctness, and thus works with both A and B
keys and through key-change boundaries.

Additons:
  * DW_CFA_AARCH64_negate_ra_state: new CFA operation.
  * RA_SIGN_STATE: new pseudo register.
  * Pass the arch to DwarfCfa so that the new op is only executed
    on aarch64.

The stripping uses the xpaclri instruction. This is a hint space
instruction which is compatible with pre Armv8.3-A devices. For cases
where it cannot be used, a mask can be set instead.

Test: libunwindstack_test
      Without this patch all UnwindTest.* testcases should fail if
      compiled with Pointer Authentication.

The tests should be executed with both -mbranch-protection=pac-ret and
pac-ret+leaf flags so that either some or all functions have pointer
authentication instructions.

Change-Id: Id7c3f1d0e2fc7fccb19bd1430826264405a9df7c
2020-07-14 13:31:59 -07:00
Yifan Hong 0c1a242060 Merge changes from topic "vendor_dlkm" am: 7ca7680ec5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1350785

Change-Id: I1d3ff13bb5093fd1aedb7c2f47878999d3e8e792
2020-07-14 19:29:02 +00:00
Yifan Hong 7ca7680ec5 Merge changes from topic "vendor_dlkm"
* changes:
  load sysprops from vendor_dlkm.
  fastboot: Add vendor_dlkm
  rootdir: add vendor_dlkm symlinks
2020-07-14 19:15:12 +00:00
Tom Cherry c1edd66317 logd: allow opting into simple or serialized log buffers
Test: set properties and see logd use the appropriate buffer.
Change-Id: I2dcce7d9661a43adfafb69427d9271ee7ee29f43
2020-07-14 11:52:06 -07:00
Tom Cherry 4f8125af38 logd: don't use a thread for deleting log chunks
This was a premature optimization.  Profiling shows that decompressing
and deleting these logs is rather fast and overall CPU utilization is
lower without the added thread.

Test: profile logd with/without this thread
Change-Id: I31bd52077b495d562dd5797585191dc200ad3859
2020-07-14 18:50:45 +00:00
Steven Moreland 84cdbe20a4 Merge "String8: explicit int -> char cast." am: 3619489de6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362304

Change-Id: Iadd3d6cf8bce3351b1be0767ece1a2fad141886a
2020-07-14 16:45:29 +00:00
Steven Moreland 3619489de6 Merge "String8: explicit int -> char cast." 2020-07-14 16:30:42 +00:00
Tom Cherry 8a5c635a8f Merge "logd: update SerializedLogChunk for new prune calcuations" am: 63e7541faa
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362308

Change-Id: Ie47061c7eaa2dec96c4fad27884d281a5a739763
2020-07-14 01:46:50 +00:00
Tom Cherry 63e7541faa Merge "logd: update SerializedLogChunk for new prune calcuations" 2020-07-14 01:22:05 +00:00
Tom Cherry 44e1a5d59c logd: update SerializedLogChunk for new prune calcuations
A previous change included sizeof(SerializedLogChunk) to the size of a
log chunk to more accurately track logd's log usage, but did not
update the tests that check this value, so this change updates them
appropriately.

Bug: 161179582
Test: logd-unit-tests
Change-Id: Ic37f07fff98c260dcf39b7cc79504c1c3fc2149d
2020-07-13 17:29:55 -07:00
Steven Moreland fdbc565dd5 String8: explicit int -> char cast.
Since tolower/toupper take and return integer arguments, ascii chars in
the extended range will be converted from positive int values to
negative char values. In order to silence an error here, which was added
recently with integer sanitization here, casting explicitly.

Fixes: 160831549
Test: w/ libutils_fuzz_string8
Change-Id: Iedcd6643f95f84ce662a80e38931d918a200f508
2020-07-13 23:33:25 +00:00
Treehugger Robot 88121b10af Merge "extend syscall minijail for clang code coverage" am: aa64d3b23f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1361997

Change-Id: If843446ecd1eb3b8e714d1237159afbb85cadb03
2020-07-13 22:33:32 +00:00
Treehugger Robot aa64d3b23f Merge "extend syscall minijail for clang code coverage" 2020-07-13 22:21:12 +00:00
Ray Essick a20596752c extend syscall minijail for clang code coverage
cutover to clang-based code coverage uses extra system call (ftruncate)
when writing coverage data. exposed while generating coverage for media.extractor.

Bug: 160917521
Test: build, boot, kill -37 extractors for {arm,x86}x{32,64}
Change-Id: I555b168c7aab43caa590df951861b92e8fa14bc3
2020-07-13 13:39:05 -07:00
Tom Cherry a7aaf84b4e Merge "logd: optionally track the full size of log buffers" am: 478d93846d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1353171

Change-Id: I4f1b942079a9ac2a6ef5e99a1720baf9b1acc57f
2020-07-13 19:50:41 +00:00
Tom Cherry 478d93846d Merge "logd: optionally track the full size of log buffers" 2020-07-13 19:34:15 +00:00
Treehugger Robot 459b5d6350 Merge "toolbox: make all janitors the owners." am: 5f33339b2f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1351802

Change-Id: I24e9f80a49e99c3a9112179be1d200f6bb2d941f
2020-07-13 17:53:06 +00:00
Treehugger Robot 5f33339b2f Merge "toolbox: make all janitors the owners." 2020-07-13 17:31:11 +00:00
Michael Wright 1baa61b095 Merge "Cast away signedness of built-ins in BitSet." am: 71f4494bd1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360509

Change-Id: I3a67be30a6bfa5f9df3b2f106a775612ca7a3fa5
2020-07-13 15:57:23 +00:00
Michael Wright 71f4494bd1 Merge "Cast away signedness of built-ins in BitSet." 2020-07-13 15:45:40 +00:00
Yo Chiang 8cf6a0b69e Merge "Move SingletonTest back to libutils_test" am: 9a57044ab3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360220

Change-Id: Ic9c06cf69623150c041ce5e544a8eb6321f39623
2020-07-13 03:59:41 +00:00
Yo Chiang 9a57044ab3 Merge "Move SingletonTest back to libutils_test" 2020-07-13 03:49:17 +00:00
Michael Wright 23e1363d55 Cast away signedness of built-ins in BitSet.
Most of the built-in functions return signed values but BitSet deals
only in unsigned values. We can safely cast these away though as they're
always indices, which can't be negative.

Bug: 160010896
Test: atest inputflinger_tests, atest libinput_tests
Change-Id: I6e0b33972fabcd41ad1c269ea0e2a07b13b33c12
2020-07-12 01:56:58 +01:00
Matthew Maurer 85128d42c9 Merge "trusty: rpmb_dev: Prevent desync between rpmb_dev and storageproxyd" am: 30b0838b70
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360681

Change-Id: I85b0dfc9092d44023d5c5d5dc5bbc1a867f765e4
2020-07-10 22:47:58 +00:00
Matthew Maurer 30b0838b70 Merge "trusty: rpmb_dev: Prevent desync between rpmb_dev and storageproxyd" 2020-07-10 22:27:24 +00:00
Matthew Maurer 8f62566566 trusty: rpmb_dev: Prevent desync between rpmb_dev and storageproxyd
The mock RPMB can get out of sync with TD storage blocks in the event of
panic or crash. Making this O_SYNC will prevent this from happening.

Bug: 160723681
Test: None
Change-Id: Ia16dfc88ceae56e4e9724a42ac0db492c0e707a4
2020-07-10 22:09:01 +00:00