Commit graph

64806 commits

Author SHA1 Message Date
Baligh Uddin
cfaccd322d Merge "Switch "system/core/base" ref to "system/libbase"" am: 25254eb315
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1471683

Change-Id: Id620e180370e2874535bded5b92520e7e38d8693
2020-10-27 03:55:42 +00:00
Baligh Uddin
25254eb315 Merge "Switch "system/core/base" ref to "system/libbase"" 2020-10-27 03:38:20 +00:00
Treehugger Robot
9c3496ac19 Merge "Fix lseek() check" am: df17454a84
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1473817

Change-Id: Ifbef7ed0b3837e5a886c044a67a46e5686c31f5e
2020-10-26 17:48:56 +00:00
Treehugger Robot
df17454a84 Merge "Fix lseek() check" 2020-10-26 17:24:31 +00:00
Greg Kaiser
74b8449f58 Fix lseek() check
Since 'pos' is unsigned, we need to tweak the check.

Test: TreeHugger
Change-Id: I97dcb50fb86196b09b11ba725593e6c83c5586d9
2020-10-26 06:37:32 -07:00
Yo Chiang
99436bf2aa Merge "Call GetDsuMetadataKeyDir() for DSU metadata encryption dir" am: 346e6792b4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1452359

Change-Id: I1f511c4873b5daf34a748ec318d020d1749293e9
2020-10-26 05:49:35 +00:00
Yo Chiang
346e6792b4 Merge "Call GetDsuMetadataKeyDir() for DSU metadata encryption dir" 2020-10-26 05:27:36 +00:00
Baligh Uddin
e960b47673 Switch "system/core/base" ref to "system/libbase"
BUG: 148941208
Test: TH
Change-Id: Ifa87b06ad7cfce94ed9b5be6b1ee0c358e52aba1
2020-10-24 02:31:13 +00:00
David Anderson
cc747f8500 Merge "snapuserd: Refactor client to allow persistent connections." am: 45662c8941
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1468411

Change-Id: If97a8dae405d5a40419f444ef30b8dbd6ffea219
2020-10-23 23:36:07 +00:00
David Anderson
45662c8941 Merge "snapuserd: Refactor client to allow persistent connections." 2020-10-23 22:01:42 +00:00
David Anderson
de005e145f Merge "snapuserd: Refactor daemon/server." am: 8425f6e6e6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1468410

Change-Id: I4286b948eba40d76fb7af438c6312af910cbaafc
2020-10-23 20:24:19 +00:00
Colin Cross
656f97cf61 Merge "Make the connection between implementation and llndk_library explicit" am: b527e66392
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1466034

Change-Id: If141d48c86a43c59f388115c5eebc3589bdd5b17
2020-10-23 19:00:06 +00:00
Primiano Tucci
8ff9efc482 Merge "Introduce security.lower_kptr_restrict property" am: 24a21867e7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1455185

Change-Id: I23669ae623e3bdd3694766dda3704a97c3db2144
2020-10-23 18:58:49 +00:00
David Anderson
8425f6e6e6 Merge "snapuserd: Refactor daemon/server." 2020-10-23 18:33:15 +00:00
Colin Cross
b527e66392 Merge "Make the connection between implementation and llndk_library explicit" 2020-10-23 18:09:42 +00:00
Primiano Tucci
24a21867e7 Merge "Introduce security.lower_kptr_restrict property" 2020-10-23 18:03:30 +00:00
Treehugger Robot
959048182b Merge "fs_mgr.cpp: fix the problem that the casefold feature not enabled for the data partition" am: d0ce499873
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1471662

Change-Id: I7ae318f77c5f5dbb295b25f69b0d500f2bdabbc4
2020-10-23 16:49:21 +00:00
Treehugger Robot
d0ce499873 Merge "fs_mgr.cpp: fix the problem that the casefold feature not enabled for the data partition" 2020-10-23 16:47:43 +00:00
Baligh Uddin
53f75c82ce Merge "Migrate system/core/adb to packages/modules/adb" am: 3f52272883
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1465244

Change-Id: Ia0799b6599336b7769afe2bad79bf816a8f645b2
2020-10-23 16:39:25 +00:00
Baligh Uddin
3f52272883 Merge "Migrate system/core/adb to packages/modules/adb" 2020-10-23 16:16:32 +00:00
Daniel Rosenberg
37ee1dc4ac Merge changes I3339d552,I126e1583,Iccc6580a am: 323060840a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1465344

Change-Id: I2403b284a5635943244f5bdda9f7b9c8a2b1d0b1
2020-10-23 11:18:38 +00:00
Daniel Rosenberg
323060840a Merge changes I3339d552,I126e1583,Iccc6580a
* changes:
  Add GetLastLabel and InitializeAppend
  Switch up Cow Format to be resumable
  reland: Rename Flush to Finalize
2020-10-23 11:08:46 +00:00
Yongqin Liu
c007c43335 fs_mgr.cpp: fix the problem that the casefold feature not enabled for the data partition
The value of entry.mount_point for data partition is "/data"

Fixes: 5ba5b90cd6 ("fs_mgr: try tune2fs for casefolding on /data only")

Test: got "Can't mount with encoding and encryption" problem reported
      by the db845c build with the default 5.4.38 prebuilt kernel

Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Change-Id: I226a2275f5f2ee18503c5a3863ef5a1d2c2ed7be
2020-10-23 13:34:49 +08:00
David Anderson
fe7585a8b0 snapuserd: Refactor client to allow persistent connections.
This refactors SnapuserdClient so it retains a connection for its
lifetime. This allows SnapshotManager to ensure the daemon is running
and hold a connection open across all of its operations.

The main impetus of this change is to remove the ambiguity between first
and second-stage sockets. SnapshotManager should only ever connect to
the first-stage socket during first-stage init, or, to initiate the
"transition" step during second-stage init.

The transition steps are roughly:
 (1) Start second-stage daemon.
 (2) Load new device-mapper tables.
 (3) Connect second-stage daemon to new dm-user devices.
 (4) Activate the new tables, flushing IO to the first-stage daemon.
 (5) Send a signal to the first-stage daemon to exit.

This patch makes it easier to hold these two separate connections.

Bug: 168554689
Test: manual test
Change-Id: I51cb9adecffb19143ed685e0c33456177ec3d81f
2020-10-22 22:07:23 -07:00
David Anderson
cff35f67ad snapuserd: Refactor daemon/server.
This is in preparation for moving to a traditional client/server model
where clients stay connected and the server multiplexes multiple
connections.

Client has been renamed to DmUserClient to differentiate it from local
socket clients.

poll() responsibilities have been moved into SnapuserdServer. In
addition, the server now tracks all open clients and polls them
together with the listen socket.

SnapuserDaemon is now only responsible for signal masking. These two
classes can probably be merged together - I didn't do that here because
the patch was already large.

Bug: 168554689
Test: manual test
Change-Id: Ibc06f6287d49e832a8e25dd936ec07747a1b0555
2020-10-22 22:00:17 -07:00
Daniel Rosenberg
3d17cb9a57 Add GetLastLabel and InitializeAppend
GetLastLabel returns the last Label that a reader is confident about.
InitializeAppend starts a writer up to append data after the last given
label, assuming all later labels are not relevant data.

Change-Id: I3339d5527bae833d9293cbbc63126136b94bd976
Bug: 168829493
Test: cow_api_test
2020-10-22 21:26:27 -07:00
Daniel Rosenberg
2d2fd72502 Switch up Cow Format to be resumable
This switches up the format to alternate ops with data, followed by a
footer containing additional meta information. This allows the file to
be resumed at arbitrary points if writing gets interrupted by power
loss.
Also adds a label op, which allows labeling future ops as connected.
If the footer is missing, Append will treat the last label as possibly
corrupt, and ignore it.

Change-Id: I126e15837d710776f9396e7afc9b0cd595e26b59
Bug: 168829493
Test: cow_api_test
2020-10-22 21:26:27 -07:00
Baligh Uddin
795c2c222c Migrate system/core/adb to packages/modules/adb
BUG: 167963357
Test: TH
Merged-In: Ie1f82db2fb14e1bdd183bf8d3d93d5e9f974be5d
Change-Id: I810a109116247af2af9a8628680620cb683d48a9
2020-10-23 03:43:43 +00:00
David Anderson
e3c278a20a Merge "libsnapshot: Add .rc file for snapuserd." am: 7d55df2895
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1468412

Change-Id: Ifdbbb5af374b60d8d279624cfcd2b6185a7d4571
2020-10-22 21:04:45 +00:00
David Anderson
7d55df2895 Merge "libsnapshot: Add .rc file for snapuserd." 2020-10-22 18:21:18 +00:00
Primiano Tucci
253289fe07 Introduce security.lower_kptr_restrict property
This is to allow the tracing service to temporarily
lower kptr_restrict for the time it takes to build
its internal symbolization map (~200ms), only on
userdebug/eng builds.
kptr_restrict unfortunately cannot be lowered by
the tracing service itself. The main reason for that
is the fact that the kernel enforces a CAP_SYS_ADMIN
capability check at write() time, so the usual pattern
of opening the file in init and passing the FD to the
service won't work.

For more details see the design doc go/perfetto-kallsyms.
Bug: 136133013
Test: perfetto_integrationtests --gtest_filter=PerfettoTest.KernelAddressSymbolization in r.android.com/1454882

Change-Id: Ib2a8c69ed5348cc436223ff5e3eb8fd8df4ab860
2020-10-22 16:18:41 +01:00
Daniel Rosenberg
b4a81ccd5a reland: Rename Flush to Finalize
As we change to a more resumable format, flush mostly writes the final
parts of the file that are needed, which would write extra data that is
not needed to continue writing, and would immediately be overwritten.

Additionally, in the next patch we will fsync the file after adding an
op, making the flush built in, and the Finalize name more appropriate.

Bug: 168829493
Test: builds
Change-Id: Iccc6580ac72ff066cfeeb32e3cdaf69c5ba615fc
2020-10-22 02:34:26 -07:00
Treehugger Robot
d7fb304da9 Merge "Use the "marketing names" for Q and R." am: 1ef094a890
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1470050

Change-Id: Iceea149d239ea0dda86f5f1ff8753a54ce488979
2020-10-22 06:55:51 +00:00
Christopher Ferris
988995e6e1 Merge "Update for new kernel headers." am: 758e52551f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1466035

Change-Id: I51d64f9a60faff2db9cb6813060703b19043ecda
2020-10-22 06:34:48 +00:00
Treehugger Robot
1ef094a890 Merge "Use the "marketing names" for Q and R." 2020-10-22 01:00:54 +00:00
Christopher Ferris
758e52551f Merge "Update for new kernel headers." 2020-10-22 00:54:16 +00:00
Elliott Hughes
86777107c0 Use the "marketing names" for Q and R.
Even though they're numbers.

Test: treehugger
Change-Id: I0872853c98eacdd789fc83f59de82334e1e82ab9
2020-10-21 16:36:14 -07:00
Yifan Hong
d09e1e6414 Merge "Always create ramdisk/first_stage_ramdisk." am: 634a3dc179
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1468563

Change-Id: If2d3dab0b2c1557e41ea13df7999121b81866128
2020-10-21 18:50:43 +00:00
Yifan Hong
634a3dc179 Merge "Always create ramdisk/first_stage_ramdisk." 2020-10-21 18:35:22 +00:00
Jason Chiu
e9e08faf3a Merge "Disable callstack for mac too." am: 7e93bd24b2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1468408

Change-Id: I47ddebe05e37cf58ddbaeff0cc3c9d148ecd31f8
2020-10-21 08:30:47 +00:00
Jason Chiu
7e93bd24b2 Merge "Disable callstack for mac too." 2020-10-21 08:14:23 +00:00
David Anderson
26878da29b libsnapshot: Add .rc file for snapuserd.
Bug: 168554689
Test: setprop ctl.start snapuserd
Change-Id: I9b8f20a364249135a1edb0ee69f039059c4deaf3
2020-10-21 00:41:45 -07:00
Chiachang Wang
0e408358d1 Merge "Prevent using abstract terms in the property name" am: ba8a309773
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1462103

Change-Id: Ie49560910bfb02bd5b1fba4549963c7b50d9b7d2
2020-10-21 07:27:27 +00:00
David Anderson
ded0ee57a8 Merge "libsnapshot: Add a source_partition parameter to OpenSnapshotWriter." am: 7d66a60012
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1441021

Change-Id: Icd7135365cc4744909a6fbc3cf191da872139f9b
2020-10-21 07:26:39 +00:00
Chiachang Wang
ba8a309773 Merge "Prevent using abstract terms in the property name" 2020-10-21 07:00:56 +00:00
David Anderson
7d66a60012 Merge "libsnapshot: Add a source_partition parameter to OpenSnapshotWriter." 2020-10-21 06:55:03 +00:00
Christopher Ferris
8377b10f29 Disable callstack for mac too.
Bug: 171353386

Test: Builds.
Change-Id: Id8a5cce170682ea43aa641c187c22cb31b6fd017
2020-10-21 06:04:00 +00:00
Daniel Rosenberg
0459d05e48 Merge "Revert "Rename Flush to Finalize"" am: bc7a365bbe
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1468963

Change-Id: I0107619922b5c7cf0917e4b4eb587a28824dc7d1
2020-10-21 04:01:37 +00:00
Daniel Rosenberg
bc7a365bbe Merge "Revert "Rename Flush to Finalize"" 2020-10-21 03:50:40 +00:00
Jason Chiu
ebfbf7d920 Revert "Rename Flush to Finalize"
This reverts commit 6177f6f6c4.

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=sdk_x86-sdk&lkgb=6919873&lkbb=6919923&fkbb=6919923, bug b/171353958

Change-Id: Iea3059b4bf64a7cac930c40b8b312b5b26b0baea
BUG: 168829493
2020-10-21 03:16:42 +00:00