Commit Graph

63210 Commits

Author SHA1 Message Date
Yifan Hong f536731e5a Merge "Refactor: Move GSI AVB keys selection logic to common code." 2020-10-14 18:25:31 +00:00
Colin Cross 219b3487f8 Merge "Use ro.build.version.release_or_codename to reconstruct fingerprint" 2020-10-14 16:33:02 +00:00
Colin Cross b519c71619 Use ro.build.version.release_or_codename to reconstruct fingerprint
The ro.build.version.release property was changed from being the
codename or final name of the current release to be the final name
of the most recent release.  Use ro.build.version.release_or_codename
to reconstruct the fingerprint to match what the build system does.

Bug: 158483506
Test: adb shell getprop | grep fingerprint
Change-Id: I3bd992b6f06ff90bb6024253339a2654afa069ee
2020-10-13 12:38:48 -07:00
Treehugger Robot f9c36a2ca6 Merge "fastbootd: Add more logging for when the USB transport fails." 2020-10-13 02:18:06 +00:00
David Anderson f74c1a9556 fastbootd: Add more logging for when the USB transport fails.
Bug: 161542676
Test: fastboot flashall
Change-Id: Ief4e7452b72504c51c807dd38a07765ad65c96a4
2020-10-12 15:55:48 -07:00
Yifan Hong d65e4851e2 Refactor: Move GSI AVB keys selection logic to common code.
Test: pass
Change-Id: I5ac139ad171432e903c400077f7855d4e4bcf041
2020-10-12 13:01:14 -07:00
Steven Moreland 32535585fc Merge "libcutils: API to disable memory mitigations" 2020-10-12 16:59:23 +00:00
Wenhao Wang 323353413f Merge "rpmb_dev: Switch to RPMB provisioning scheme" 2020-10-10 05:06:56 +00:00
Steven Moreland d22659b8ea libcutils: API to disable memory mitigations
Convenience API to disable memory mitigations, where we can specify
logging and also have a single place to update once a related bug is
fixed.

Bug: 166675194
Test: use API to disable memory mitigations
Change-Id: I4a3529ea1911925c49e31cc3809c2743e401c196
2020-10-10 00:16:24 +00:00
Treehugger Robot 8d96bfa9bd Merge changes from topic "bug_168791309"
* changes:
  Add symlinks to satisfy include paths.
  Remove liblog, logcat, logd, logwrapper
2020-10-09 02:32:02 +00:00
Baligh Uddin 62e9b3305d Add symlinks to satisfy include paths.
BUG: 168791309
Test: Local build + TH
Change-Id: Iafba3e4e8dc837c57af2332057a3c773c3922cb1
2020-10-08 23:19:43 +00:00
Baligh Uddin d2c21a10d3 Remove liblog, logcat, logd, logwrapper
These subdirectories have moved to platform/system/logging.

BUG: 168791309
Test: Local build + TH
Change-Id: Iaee2ff59d4450f3e59dc9ea8b0e257b2de53e478
2020-10-08 23:17:52 +00:00
Baligh Uddin 83e9bc346a Merge "Add OWNERS block, so we can perform migration." 2020-10-08 23:05:36 +00:00
Baligh Uddin 23007f0e48 Add OWNERS block, so we can perform migration.
BUG: 168791309
TEST: YOLO
Change-Id: I6c9c12931203fe2460b2fbdca333f83541324022
2020-10-08 22:39:51 +00:00
Tom Cherry 8582aa21df Merge "logd: single std::mutex for locking log buffers and tracking readers" 2020-10-08 19:58:27 +00:00
Akilesh Kailash c81477c5e4 Merge "libsnapshot:snapuserd: Handle signals" 2020-10-08 02:49:04 +00:00
Tom Cherry c581886eea logd: single std::mutex for locking log buffers and tracking readers
There are only three places where the log buffer lock is not already
held when the reader lock is taken:
1) In LogReader, when a new reader connects
2) In LogReader, when a misbehaving reader disconnects
3) LogReaderThread::ThreadFunction()

1) and 2) happen sufficiently rarely that there's no impact if they
additionally held a global lock.
3) is refactored in this CL.  Previously, it would do the below in a loop
  1) Lock the reader lock then wait on a condition variable
  2) Unlock the reader lock
  3) Lock the log buffer lock in LogBuffer::FlushTo()
  4) In each iteration in the LogBuffer::FlushTo() loop
    1) Lock then unlock the reader lock in FilterSecondPass()
    2) Unlock the log buffer lock to send the message, then re-lock it
  5) Unlock the log buffer lock when leaving LogBuffer::FlushTo()
If these locks are collapsed into a single lock, then this simplifies to:
  1) Lock the single lock then wait on a condition variable
  2) In each iteration in the LogBuffer::FlushTo() loop
    1) Unlock the single lock to send the message, then re-lock it

Collapsing both these locks into a single lock simplifes the code and
removes the overhead of acquiring the second lock, in the majority of
use cases where the first lock is already held.

Secondly, this lock will be a plain std::mutex instead of a RwLock.
RwLock's are appropriate when there is a substantial imbalance between
readers and writers and high contention, neither are true for logd.

Bug: 169736426
Test: logging unit tests
Change-Id: Ia511506f2d0935a5321c1b2f65569066f91ecb06
2020-10-07 15:00:49 -07:00
Akilesh Kailash f594785a26 libsnapshot:snapuserd: Handle signals
1: poll events to accept client request.
2: Mask all signals except SIGINT and SIGTERM.

Bug: 168258493
Test: cow_snapuserd_test

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I330170ac15199d2a97cc3b752dbf3b62b7b51a40
2020-10-07 21:45:45 +00:00
Treehugger Robot 5f7c13fb1e Merge "fs_mgr: adb-remount-test.sh: filter out more administrivia mounts." 2020-10-07 20:04:53 +00:00
Mark Salyzyn 08cd8b70c2 fs_mgr: adb-remount-test.sh: filter out more administrivia mounts.
binder /dev/binderfs binder rw,relatime,max=1048576,stats=global 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
/dev/block/dm-3 240548676 3692368 236856308   2% /data_mirror/cur_profiles

are administrative mounts uninteresting to the adb remount test.

Fix system and vendor devt tests, turn them into warnings instead.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 170256128
Bug: 169988379
Test: adb-remount-test.sh
Change-Id: Ie19722a9ad813dce014bc27610e6db035e6c69e9
2020-10-07 08:36:20 -07:00
Tom Cherry 8401907adc Merge "Reland: "Remove logging symlinks from system/core/include"" 2020-10-07 15:11:10 +00:00
Treehugger Robot 3f452134da Merge "logd: fix bad test assumptions" 2020-10-07 03:12:49 +00:00
Treehugger Robot 4c7104ab2a Merge "Clarify `adb bugreport` failures on pre-N devices." 2020-10-07 00:59:39 +00:00
Treehugger Robot 52578dda5b Merge "Remove vts10 related configs" 2020-10-07 00:35:38 +00:00
Arve Hjønnevåg 3e7c3504a3 Merge "trusty: keymaster: set_attestation_key: Change wrapped key" 2020-10-06 23:31:38 +00:00
Tom Cherry 340afd38cb logd: fix bad test assumptions
SerializedLogChunk.three_logs assumes that log buffers are
zero-initialized, but they are not.  This causes test failures on
host.

Test: this test passes
Change-Id: I0dfa282bdc36eaa4e8e39d85c5227f717b45ec2a
2020-10-06 15:54:26 -07:00
Elliott Hughes f118cd95f1 Clarify `adb bugreport` failures on pre-N devices.
The error was meant to imply "without the filename" but (a) that wasn't
spelled out and (b) anyone who did just try the command would probably
be unpleasantly surprised by the massive amount of spam on their
terminal. So give them copy & paste instead.

(I did consider using their supplied filename, but since that's almost
certainly blah.zip, it seemed uncool to silently create a large text
file called "something.zip"!)

Bug: http://b/170225883
Test: untested for lack of a working pre-N device right now
Change-Id: I834939c963ca09927ccd4dc5ed8e88c65455838e
2020-10-06 13:53:38 -07:00
Dan Shi 67b7dd570f Remove vts10 related configs
Bug: 169582597
Test: build
Change-Id: I38e1e0f8e32b86ab14b905d040c1c62245a1a9e3
2020-10-06 13:52:44 -07:00
Xin Li 9602e3d31a Merge "DO NOT MERGE - Merge RP1A.201005.006" 2020-10-06 20:17:27 +00:00
Treehugger Robot 6d452d7e64 Merge "liblog: add pthread.h to vndk log/log.h" 2020-10-06 19:30:34 +00:00
Tom Cherry 1783f12106 Reland: "Remove logging symlinks from system/core/include"
Soong will instead directly include those paths.

Bug: 165825252
Test: treehugger
Change-Id: If1ee31ebf83715c0dfc4797305784fbfa7bd97db
2020-10-06 10:45:11 -07:00
Tom Cherry 824ef9ade6 liblog: add pthread.h to vndk log/log.h
Too many vendors assume that this is included, and it's not worth the
effort to clean up.

Bug: 165825252
Test: build
Change-Id: Ib99f0de4aac64134c21c0ee09f7ea576ebd0fe9e
2020-10-06 10:33:17 -07:00
The Android Open Source Project 7fd5f8d2bc DO NOT MERGE - Merge RP1A.201005.006
Bug: 168212094
Change-Id: I79a7517bce1c012eac2a2a7c1c2cffc5a3516eaa
Merged-In: Ia85067d4258bde4b875c832d6223db5dd26b8838
2020-10-06 04:30:21 +00:00
Tom Cherry 1bacb2c389 Merge "logd: add locks around ~SerializedFlushToState" 2020-10-05 22:22:52 +00:00
Tom Cherry 28b9eb5130 logd: add locks around ~SerializedFlushToState
This accesses shared resources in SerializedLogBuffer and therefore
requires a lock.

Bug: 169736426
Test: malloc_debug_system_tests
Change-Id: I807c65f4719481f933b4917a50f83f933b1929fb
2020-10-05 14:59:19 -07:00
Treehugger Robot bf426993db Merge "liblog: add unistd.h to vndk log/log.h" 2020-10-05 21:14:13 +00:00
Tom Cherry c274f9ff69 Merge "Revert "Remove logging symlinks from system/core/include"" 2020-10-05 19:26:17 +00:00
Christopher Ferris f30b12e6ad Merge "libunwindstack: Support signal frame CIEs." 2020-10-05 19:25:01 +00:00
Tom Cherry f94b88fa61 Revert "Remove logging symlinks from system/core/include"
Revert "Include system/core/liblog/include instead of using symlinks"

Revert submission 1428983-no-log-header-symlinks

Reason for revert: Build breaks
Reverted Changes:
I248a2f045:Include system/core/liblog/include instead of usin...
Ic189e0f59:Remove logging symlinks from system/core/include

Change-Id: Ia7d9efb29a5e83bb5d7c0e4a73f40c72c719bc62
2020-10-05 19:24:12 +00:00
Tom Cherry 136e4f6da6 liblog: add unistd.h to vndk log/log.h
Too many vendors assume that this is included, and it's not worth the
effort to clean up.

Bug: 165825252
Test: build
Change-Id: I42fb32be7e5e3201dfc5c58734e3ef5b9251faf1
2020-10-05 12:19:15 -07:00
Mohammad Islam f99f09eeda Merge "Activate encryption for /data/app-staging folder" 2020-10-05 16:01:59 +00:00
Tom Cherry f8a89dc3a2 Merge "Remove logging symlinks from system/core/include" 2020-10-05 15:26:51 +00:00
Tom Cherry 351586822f Merge "Delete include/private/android_filesystem_config.h" 2020-10-05 15:26:32 +00:00
Tom Cherry 167fbf534b Delete include/private/android_filesystem_config.h
This header should be accessed through libcutils.

Test: build
Change-Id: Ifb0ad3bc63ec5806d9c474a5d39721b2189c34de
2020-10-05 15:26:24 +00:00
Joseph Jang 012ee0ae0a Merge "fastboot: add new oem command for post wipe userdata" 2020-10-05 02:34:52 +00:00
Tianjie Xu 216ce0985f Merge changes from topic "revert-1433573-vab-libsnapshot-linkage-APIHERUSEB"
* changes:
  Revert "libsnapshot: Partially implement OpenSnapshotWriter."
  Revert "libsnapshot: Implement OnlineKernelSnapshotWriter::OpenReader."
2020-10-03 19:27:32 +00:00
Tianjie Xu 5aa52d91dd Revert "libsnapshot: Partially implement OpenSnapshotWriter."
Revert "Link to libsnapshot_cow everywhere libsnapshot is linked."

Revert submission 1433573-vab-libsnapshot-linkage

Reason for revert: b/169981170, update crash for droidfooders.
Reverted Changes:
Ie75bba98c:Link to libsnapshot_cow where libsnapshot is linke...
Ieedfadc55:libsnapshot: Partially implement OpenSnapshotWrite...
I28a5d4a88:Link to libsnapshot_cow everywhere libsnapshot is ...

Exempt-From-Owner-Approval: Revert to unblock dogfood
Change-Id: I0677df77672aca9fd54d94e009ac0be7c88a1a9d
2020-10-03 19:26:18 +00:00
Tianjie Xu ad583f2a16 Revert "libsnapshot: Implement OnlineKernelSnapshotWriter::OpenReader."
This reverts commit 39f250896a.

Reason for revert: b/169981170, update crash for droidfooders.

Change-Id: I6a3d096df3174596d36195bf59fa8fbc88c982d0
2020-10-03 07:26:29 +00:00
Wenhao Wang a560b76faa Merge "rpmb_dev: Fix RPMB_REQ_DATA_READ command" 2020-10-03 05:11:27 +00:00
Arve Hjønnevåg fe090a4686 trusty: keymaster: set_attestation_key: Change wrapped key
Remove WrappedPrivateKey and select wrapped vs plaintext key command
based on format instead.

Bug: 154033394
Test: send wrapped test key. Not yet accepted by trusty
Change-Id: I3b0a29be78f2a8e84ebd990713f66788256d8e3f
2020-10-02 16:55:16 -07:00