Commit graph

86300 commits

Author SHA1 Message Date
Yi-Yo Chiang
41ecc10ead Merge "fs_mgr: Remove deprecated include path system/core/fs_mgr/include_fstab" into main am: c900c0ddc0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2817115

Change-Id: I2cb61204e82375f884614ca38b075ab97119d91c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-07 07:50:55 +00:00
Yi-Yo Chiang
c900c0ddc0 Merge "fs_mgr: Remove deprecated include path system/core/fs_mgr/include_fstab" into main 2023-11-07 07:31:51 +00:00
Daniel Zheng
e42383472a Merge "test_v3: write multiple ops" into main am: 03b2213e38
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2816448

Change-Id: I0faf42a9092d9a7642fd9174d4cc440e53ade4d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-07 06:01:26 +00:00
Daniel Zheng
63c34f6bde Merge "test_v3: Add max op test case" into main am: 2bc7fd4538
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2816436

Change-Id: If4ddb766fc74e664edb31aee60bda75386fce556
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-07 06:01:13 +00:00
Daniel Zheng
1eea376656 Merge "libsnapshot: Add XorOp to v3 Cow" into main am: 5c8c768c10
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2811005

Change-Id: I970d3acf67315d1ec49db5abec81a9c486693c5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-07 06:00:50 +00:00
Daniel Zheng
03b2213e38 Merge "test_v3: write multiple ops" into main 2023-11-07 05:41:21 +00:00
Daniel Zheng
2bc7fd4538 Merge "test_v3: Add max op test case" into main 2023-11-07 05:41:16 +00:00
Daniel Zheng
5c8c768c10 Merge "libsnapshot: Add XorOp to v3 Cow" into main 2023-11-07 05:41:08 +00:00
Daniel Zheng
1c9f0474a6 test_v3: write multiple ops
test case for reading and writing multiple operations of different types

Test: cow_api_test
Change-Id: I8d59a460a50c7054df0b17dc44dd6605048682aa
2023-11-06 15:05:22 -08:00
Daniel Zheng
16d35611ed test_v3: Add max op test case
Add test case to ensure that add blocks will fail when we try to add
more blocks that options.op_count_max specifies. Expected behavior is
that we will write until that count and then fail

Test: cow_api_test
Change-Id: Icb44508c1bacbbe676347df9a58c0526068eebe0
2023-11-06 15:05:22 -08:00
Daniel Zheng
770bb3ec99 libsnapshot: Add XorOp to v3 Cow
Adding in XOR operation to v3 writer. Parser has to go through ops and
create a mapping of XOR operation to it's data

Test: cow_api_test
Bug: 307452468
Change-Id: I51e13a59ba472b62bdcc05921f2e5d6e2c8ad2af
2023-11-06 15:05:21 -08:00
T.J. Mercier
0fcf20e274 Merge "libprocessgroup: Use correct language for cgroups" into main am: d79ad66873
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2808375

Change-Id: Ia81ce53c992b230ac31d28a9dcc0296e5351bc0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-06 22:09:35 +00:00
T.J. Mercier
a5c6b198ae Merge "libprocessgroup: Remove max_processes from KillProcessGroup API" into main am: ef9e7f8572
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2808374

Change-Id: I9dfd7d6d28e7f45ef53e8af71592d4ceb0903411
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-06 22:09:07 +00:00
T.J. Mercier
d79ad66873 Merge "libprocessgroup: Use correct language for cgroups" into main 2023-11-06 21:44:18 +00:00
T.J. Mercier
ef9e7f8572 Merge "libprocessgroup: Remove max_processes from KillProcessGroup API" into main 2023-11-06 21:43:59 +00:00
Treehugger Robot
52ec54ddff Merge "Update fmtlib to 10.1.1" into main am: 6c7dca816f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2814593

Change-Id: Ia3ac6567df7db5e027960fd7b025824f16076607
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-05 04:16:24 +00:00
Treehugger Robot
6c7dca816f Merge "Update fmtlib to 10.1.1" into main 2023-11-05 03:36:11 +00:00
T.J. Mercier
a99e7d84cb libprocessgroup: Use correct language for cgroups
Refer to cgroups and the cgroup hierarchy by their correct names.

Bug: 301871933
Change-Id: Iebb3eac9363018e923773292786d01977c8763ae
2023-11-03 18:34:46 +00:00
Yi-Yo Chiang
6a974aecb9 fs_mgr: Remove deprecated include path system/core/fs_mgr/include_fstab
These headers are exported by libfs_mgr and libfstab. Users should use
those libraries instead of directly referencing the include dir with
LOCAL_C_INCLUDES.

Bug: 293695109
Test: presubmit build pass
Change-Id: I888f59879f31fb75ddd5a0d243d4796415b57c7d
2023-11-03 15:11:10 +08:00
Daniel Zheng
c902293874 Merge "libsnapshot: Implement CowWriterV3::EmitCopy" into main am: c7c6605c35
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2811001

Change-Id: Ifbfd8df57330cc30e3d80470d09cc030375bf1c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-03 04:38:23 +00:00
Daniel Zheng
7c77bfa892 Merge "libsnapshot: Implement CowWriterV3:EmitBlocks" into main am: fc94e8a96f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2809875

Change-Id: I976ab9dcc15a43e70a4293f67d731ba09315fcd7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-03 04:38:13 +00:00
Daniel Zheng
c7c6605c35 Merge "libsnapshot: Implement CowWriterV3::EmitCopy" into main 2023-11-03 03:48:35 +00:00
Daniel Zheng
fc94e8a96f Merge "libsnapshot: Implement CowWriterV3:EmitBlocks" into main 2023-11-03 03:48:31 +00:00
Bart Van Assche
600af32e4c Merge changes I3c882c36,I930c668d,I29e2d51d into main am: 63d52783de
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2815845

Change-Id: I46555b1a0672178488de9b9ce391bdc9d2738fe3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-03 01:40:40 +00:00
Bart Van Assche
63d52783de Merge changes I3c882c36,I930c668d,I29e2d51d into main
* changes:
  init: Fix a bug in the WaitToBeReaped() logging code
  init/host_init_verifier: Fix a compiler warning
  init: Fix a compiler warning
2023-11-03 00:55:57 +00:00
Daniel Zheng
29be15feda Merge "libsnapshot: Implement CowWriterV3::EmitzeroBlocks." into main am: 9f53082e3b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2800836

Change-Id: I283bcab4786b09a37baf066e96183d49fbcfcdc1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-02 22:15:34 +00:00
Daniel Zheng
fb2098be51 Merge "libsnapshot: Parser v3 implementation" into main am: cdb935e95f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2792195

Change-Id: Id88f9ef10bf543a8d37f6dc22ef24e3fa3c1611f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-02 22:15:24 +00:00
Daniel Zheng
9f53082e3b Merge "libsnapshot: Implement CowWriterV3::EmitzeroBlocks." into main 2023-11-02 21:52:18 +00:00
Daniel Zheng
cdb935e95f Merge "libsnapshot: Parser v3 implementation" into main 2023-11-02 21:51:45 +00:00
Daniel Zheng
a1014852a1 libsnapshot: Implement CowWriterV3::EmitCopy
Add copy operation to v3 writer

Test: cow_api_test
Bug: 307452468
Change-Id: I5956084bfadff4536bad11f3683d639408a79892
2023-11-02 14:40:23 -07:00
Daniel Zheng
805d10fa16 libsnapshot: Implement CowWriterV3:EmitBlocks
Add in replace ops to WriterV3 without compression support (will be
added in later). CowReader also has to be changed since we no longer
have a CowFooter (our checks need to be updated correspondingly).
We need next_data_pos_ to be pointed to after the operation buffer. This
section is appended to incrementally as we write replace + xor
operations

Test: cow_api_test
Change-Id: Ie979c72f842edd04337d900fd43dac8031207517
2023-11-02 14:38:37 -07:00
David Anderson
53bd5585e9 libsnapshot: Implement CowWriterV3::EmitzeroBlocks.
Add zero block operation to writer v3. We currently write this operation
to after the scratch space. Once resume point support is added we may
need to change this to write after the resume point. This CL only
supports zero blocks, so writeoperation does not take in data yet.

Bug: 307452468
Test: cow_api_test
Change-Id: I659b2e2e4f6e0d96e374ed29012318cc34b4158d
2023-11-02 13:38:37 -07:00
Daniel Zheng
ee35a8184c libsnapshot: Parser v3 implementation
Also adds a test for CowWriterV3 + CowParserV3.

Bug: 307452468
Test: read a header written by v3 writer
Change-Id: I77cf048604c82a010cfdbfb38d0f8beef597d112
2023-11-02 13:38:37 -07:00
Daniel Zheng
a2f148ddb3 Merge "libsnapshot: Add Parser v3 + stub" into main am: c9c120e0b1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2815834

Change-Id: I74fe8f0af192a71b66c7f068653d17a78304cd0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-02 20:30:40 +00:00
Daniel Zheng
0ec664a592 Merge "libsnapshot: Add Parser base class" into main am: cb618c18c9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2815833

Change-Id: I14db9eddc90667e326ab9ba8660c67c1634f9b4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-02 20:30:09 +00:00
Daniel Zheng
c9c120e0b1 Merge "libsnapshot: Add Parser v3 + stub" into main 2023-11-02 20:07:54 +00:00
Daniel Zheng
cb618c18c9 Merge "libsnapshot: Add Parser base class" into main 2023-11-02 20:07:50 +00:00
Bart Van Assche
7ce6453aa8 init: Fix a bug in the WaitToBeReaped() logging code
Only report status information for the processes that are still running.
Additionally, make the logging output look better by starting the
process information from /proc start on a new line.

Fixes: ea595ba2a0 ("init: Log more information if stopping times out")
Change-Id: I3c882c364f11278087a78efb7a8e8fee8e582417
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-02 13:06:23 -07:00
Bart Van Assche
4844092066 init/host_init_verifier: Fix a compiler warning
Fix the following compiler warning:

//system/core/init:host_init_verifier clang++ host_init_verifier.cp
system/core/init/host_init_verifier.cpp:112:9: warning: ISO C++ requires field designators to be specified in declaration order; field 'pw_shell' will be initialized after field 'pw_uid' [-Wreorder-init-list]
        .pw_uid = 0,
        ^~~~~~~~~~~
system/core/init/host_init_verifier.cpp:111:21: note: previous initialization for field 'pw_shell' is here
        .pw_shell = static_shell,
                    ^~~~~~~~~~~~

Change-Id: I930c668d7fb1d12ebe9307b1549776da71a9a95a
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-02 13:06:23 -07:00
Bart Van Assche
ac8b5bd0bc init: Fix a compiler warning
Fix the following compiler warning:

system/core/init/init.cpp:754:57: warning: ISO C++ requires field designators to be specified in declaration order; field '' will be initialized after field 'sa_flags' [-Wreorder-init-list]
    const struct sigaction act { .sa_handler = SIG_DFL, .sa_flags = SA_NOCLDSTOP };
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
system/core/init/init.cpp:754:34: note: previous initialization for field '' is here
    const struct sigaction act { .sa_handler = SIG_DFL, .sa_flags = SA_NOCLDSTOP };
                                 ^~~~~~~~~~~~~~~~~~~~~

Change-Id: I29e2d51dfdff85212a33eebfd51b241268cdfe9a
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-02 13:06:22 -07:00
Dennis Shen
2854ab55d0 Merge "Move staging value application logic to persistent_properties and add unit tests" into main am: fa21f12e3b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2801973

Change-Id: Iab84061afd32ac75b4251ee7d23252f8c584ea06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-02 17:49:00 +00:00
Daniel Zheng
875df3436d libsnapshot: Add Parser v3 + stub
previously upload patch broke build -> bug id: 308868619

This patch updates the unimplemnted pure virtual method data_loc()
Adding in parser v3 plus stub implementation.

Bug: 307452468
Test: th
Change-Id: I815a741b01c46a11a2e60f59305843ce8329a065
2023-11-02 10:20:48 -07:00
David Anderson
e5a343b1af libsnapshot: Add Parser base class
Add in Parser base class and refactor code to work with it. Base class
will have ops() method which returns a vector of v3 operations.
v2_parser translates it's v2 operations to v3 operations with this
method.

Bug: 307452468
Test: Test with critical OTA paths?
Change-Id: I52d0d0554973714189a6e1013d026f96503238b6
2023-11-02 10:19:31 -07:00
Dennis Shen
fa21f12e3b Merge "Move staging value application logic to persistent_properties and add unit tests" into main 2023-11-02 17:00:44 +00:00
Dennis Shen
79283ef377 Move staging value application logic to persistent_properties and add
unit tests

1, Previous implementation has the staged prop application done in
property_service, which caused a number of unnecessary changes which
including exposing apis like AddPersistentProperty. In addition, it made
the property_service logic complicated. A better design is to have the
staged value application done while reading the persistent properties
from file. This way, no change to property service. In addition, unit
test is much cleaner and efficient.

2, add a unit test to lock down the behavior. Specifically, it locks down that when a prop is staged, it should be applied the next time when the persistent prop is loaded. In addition, it should lock down that other persistent props are not overwritten.

Bug: b/307752841, b/300111812, b/306062513

Change-Id: I43c603efbb803195065dda3f0bc2145716302bbc
2023-11-02 14:17:33 +00:00
Hsiu-Chang Chen
f51ad72a78 Merge changes from topic "revert-2781730-YHMBOJWFHT" into main am: 77aa824423
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2813983

Change-Id: If7bad9bba06657cea3990885cdb891c37fafb891
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-02 04:45:20 +00:00
Hsiu-Chang Chen
77aa824423 Merge changes from topic "revert-2781730-YHMBOJWFHT" into main
* changes:
  Revert "libsnapshot: Add Parser base class"
  Revert "libsnapshot: Add Parser v3 + stub"
2023-11-02 04:24:16 +00:00
Hsiu-Chang Chen
e2ce495aa2 Revert "libsnapshot: Add Parser base class"
Revert submission 2781730

Reason for revert: It breaks build

Reverted changes: /q/submissionid:2781730

Bug: 308868619
Change-Id: I255263d14a1ced57b80efd373dd22eb22bb6efc1
2023-11-02 03:25:24 +00:00
Hsiu-Chang Chen
ad37351bd1 Revert "libsnapshot: Add Parser v3 + stub"
Revert submission 2781730

Reason for revert: It breaks build

Reverted changes: /q/submissionid:2781730

Bug: 308868619
Change-Id: I53b6b619635f150455cdba00237d130cae5df347
2023-11-02 03:25:24 +00:00
Daniel Zheng
d36d4fbce5 Merge changes Ie01f94d0,Iccc9755a into main am: a4c2d78763
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2781730

Change-Id: I6e79298c4643293e46a7f7de20d7aaa93e8db973
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-02 01:22:15 +00:00