Commit graph

80285 commits

Author SHA1 Message Date
David Anderson
d6bf86b8cf Support sysfs changes in the Linux 5.15 kernel.
DM_DEV_CREATE no longer creates sysfs nodes. Note this in ueventd and
add some helper APIs to libdm, so devices can be created with a
placeholder table.

This also fixes a bug in dmctl where the detailed info on suspended
devices was wrong.

Bug: 259328366
Test: dmctl with "uevents" tool
Change-Id: I822f8010e48d32841aa0ee508822f76d03a3dd85
2022-12-08 16:22:47 -08:00
Treehugger Robot
8e50ae513b Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/core" am: 1a72f42e52
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2333753

Change-Id: Id07fd5f54cb3b9f130d4deff4c6677ae345e4114
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 19:32:41 +00:00
Treehugger Robot
1a72f42e52 Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/core" 2022-12-08 19:05:32 +00:00
Sanjana Sunil
9c759ea9a5 Merge "Create misc_ce and misc_de mirror storage" am: aeee1c6231
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2300222

Change-Id: If7ed93bb7a4b673704b057bb164d393e75a07965
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 18:21:14 +00:00
Sanjana Sunil
aeee1c6231 Merge "Create misc_ce and misc_de mirror storage" 2022-12-08 18:09:11 +00:00
Daniel Zheng
833ca65916 Merge "Updating fastboot to modern c++ standards" am: 14000f19a9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2320806

Change-Id: I6672628707746fe2e301ea26217be430509b4d5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 17:27:42 +00:00
Sally Qi
945f66ed95 Merge "Add COLOR_MODE_DISPLAY_BT2020 to graphics header." am: 364c71c320
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2321464

Change-Id: Iabc625c6f96bba6da9697dc0618301da51ba104a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 17:27:27 +00:00
Daniel Zheng
14000f19a9 Merge "Updating fastboot to modern c++ standards" 2022-12-08 17:23:08 +00:00
Sally Qi
364c71c320 Merge "Add COLOR_MODE_DISPLAY_BT2020 to graphics header." 2022-12-08 17:00:12 +00:00
Bob Badour
bbe272be62 [LSC] Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  trusty/keymint/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I70d332c63bd3a02e1d00a87579d1c16054167845
2022-12-08 05:36:04 -08:00
Hsin-Yi Chen
3de02bd0d5 Add an ABI dump directory for libutils
The ABI dumps add visibility for API changes in a commonly used library.

Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \
      -libs libutils -products aosp_arm64 \
      -ref-dump-dir system/core/libutils/abi-dumps
Test: m libutils.vendor
Bug: 227282691
Change-Id: I498c62853562a8fc6702bdd622603b6f7d516274
2022-12-08 11:06:22 +08:00
Eric Miao
eaccc4ff79 Merge "libutils: Add more tests for Unicode" am: 8d60cfe2cb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2322174

Change-Id: I108bebdd405c06d2b5377da368291cd628ba61dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 23:30:33 +00:00
Eric Miao
8d60cfe2cb Merge "libutils: Add more tests for Unicode" 2022-12-07 23:06:17 +00:00
Eran Messeri
b8c8f2df6e Bump the KeyMint version to v3
To match what the implementation returns.

Bug: 244732345
Test: atest android.keystore.cts.DeviceOwnerKeyManagementTest
Change-Id: I48b4c6694d938d3d61a1524319e1d8b1da19e0b5
2022-12-07 13:05:57 +00:00
David Drysdale
0f334824ba Merge "KeyMint HAL in Rust for Trusty" am: e0af2b83f3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2328293

Change-Id: I7609f3c9fe3a3dfdace54eedc30695b9c00c48c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 10:36:34 +00:00
David Drysdale
e0af2b83f3 Merge "KeyMint HAL in Rust for Trusty" 2022-12-07 10:20:08 +00:00
David Anderson
cbd082d46d Disable multilib for CtsInitTestCases.
Bug: 260393485
Test: run cts -m CtsInitTestCases
Change-Id: I92a11b7961411b22525d4434312479878b353b55
2022-12-06 20:13:53 -08:00
Chih-hung Hsieh
128a4dbcdb Merge "Fix potential memory leaks" am: 48cd41324b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2322216

Change-Id: Ifb07cd42290257dd60add0cc2b31dd2a465ddc20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 03:52:03 +00:00
Chih-hung Hsieh
48cd41324b Merge "Fix potential memory leaks" 2022-12-07 02:36:27 +00:00
Bart Van Assche
1c5372d64b Merge "init: Enable ANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION" am: d3484c84bf
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2323103

Change-Id: Id682928a501401cf8c841ad3b34341549bea57ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 23:28:47 +00:00
Eric Miao
c2527073c2 libutils: Add more tests for Unicode
This CL added additional tests for converting between utf16 and utf8,
specifically tests that:

  1. check utf16_to_utf8_length() returns 0 if input is an
     empty UTF16 string

  2. check utf16_to_utf8_length() returns 1 if input is a
     single ASCII character UTF16 string

  3. check utf16_to_utf8_length() returns 3 if input is a
     single UTF-16 character between U+0800 - U+FFFF

  4. check utf16_to_utf8_length() returns 4 if input has
     a surrogate pair

  5. check unpaired UTF-16 surrogate is handled correctly
     (skipped)

  6. check utf16_to_utf8_length(0 handles invalid surrogate
     case correctly, by skipping the first but handling the
     rest correctly

  7. check a normal string with a mix of 1/2/3/4-byte UTF8
     characters is correctly converted by utf16_to_utf8()

  8. check conversion from invalid utf8 sequence with invalid
     leading byte and/or invalid trailing byte(s) should still
     work and not crash

Change-Id: If68e514af0e84ddebf5900b2e140e76ba4f44553
2022-12-06 15:14:27 -08:00
Bart Van Assche
d3484c84bf Merge "init: Enable ANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION" 2022-12-06 23:05:30 +00:00
Bart Van Assche
d4b8403faa Merge "init: Prevent copying of Service objects" am: 9dbf8c32e9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2328597

Change-Id: I8dc110aaf4ca0ee371f1917f2c59b3ceaae88696
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 18:23:01 +00:00
Bart Van Assche
c367d858df Merge "init/Android.bp: Sort cflags alphabetically" am: b3f9f6f4c6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2323102

Change-Id: I4dc879d3a4117664230c3878bd6e449196953acb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 18:22:51 +00:00
Bart Van Assche
9dbf8c32e9 Merge "init: Prevent copying of Service objects" 2022-12-06 17:32:23 +00:00
Bart Van Assche
b3f9f6f4c6 Merge "init/Android.bp: Sort cflags alphabetically" 2022-12-06 17:29:41 +00:00
David Drysdale
719d4a8bde Allow selection of Trusty KeyMint HAL implementation
By default, the existing C++ implementation of KeyMint will continue to
be used.  However, this can be overridden at build time to force use of
the Rust implementation by setting

    export TRUSTY_KEYMINT_IMPL=rust

Note that this requires a concomitant change to the bootloader prebuilts
that include the Trusty prebuilts, to include the corresponding Rust
version of the KeyMint TA.

Bug: 197891150
Bug: 225036046
Test: VtsAidlKeyMintTargetTest
Change-Id: I05b4b7d49cea0ac1c10b3a2e8fa5c49374aa1675
2022-12-06 13:51:35 +00:00
Hasini Gunasinghe
bf839f7b9f KeyMint HAL in Rust for Trusty
Implementation of the KeyMint HAL service based on the Rust reference
implementation.

This CL adds the code and associated metadata, but does not included it
into the overall build.

Bug: 197891150
Bug: 225036046
Test: VtsAidlKeyMintTargetTest
Change-Id: I9d95b9d8be645b6299a06d40973b38b66dcf3c07
2022-12-06 13:51:35 +00:00
Treehugger Robot
38ada069b4 Merge "init: Make an error message more informative" am: 70b22e1c5b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2328596

Change-Id: I8c8e06a497ea4ad4a27de8da6616c3d1e738edd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 03:22:56 +00:00
Treehugger Robot
70b22e1c5b Merge "init: Make an error message more informative" 2022-12-06 03:04:16 +00:00
Treehugger Robot
f75bd0eeea Merge "init: Convert a single-element array into a scalar" am: ab3bc215e8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2323101

Change-Id: I0ee8f1c31aac7bfabd201ca7d15c31f3bc12163f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 02:11:13 +00:00
Treehugger Robot
ab3bc215e8 Merge "init: Convert a single-element array into a scalar" 2022-12-06 01:48:58 +00:00
Kiyoung Kim
201dac162c Merge "Remove LLNDK libraries from system required" am: 5bc57325fb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2319962

Change-Id: I03c535a7cdb931b4e38b590a420a9a1a577948d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 00:56:27 +00:00
Treehugger Robot
701f00fd4c Merge "init: Do not invoke the ServiceList destructor when exiting" am: dfc88362b1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2328595

Change-Id: Ie4d505be5198d258d9d77f32672850b450f8b84b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 00:56:08 +00:00
Kiyoung Kim
5bc57325fb Merge "Remove LLNDK libraries from system required" 2022-12-06 00:48:15 +00:00
Treehugger Robot
dfc88362b1 Merge "init: Do not invoke the ServiceList destructor when exiting" 2022-12-06 00:14:43 +00:00
Chih-Hung Hsieh
784e63c9a2 Fix potential memory leaks
Bug: 259995529
Test: make tidy-system_subset
Change-Id: I604a308caf498a854b916dc86a8e274148c21ab0
2022-12-05 23:52:58 +00:00
Treehugger Robot
3dbaa1fc10 Merge "Suppress clang-tidy on crasher.cpp" am: a8ff9a4955
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2326314

Change-Id: Iae9fd3386cb1ffaa5555aed877d606c716d7dec3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-05 21:49:18 +00:00
Treehugger Robot
a8ff9a4955 Merge "Suppress clang-tidy on crasher.cpp" 2022-12-05 21:26:39 +00:00
Bart Van Assche
0bb4757d03 init: Prevent copying of Service objects
Service objects have external state (the child process) and hence must
not be duplicated. Disable the copy constructor and the assignment
operator to prevent that these objects get duplicated accidentally.

Bug: 213617178
Change-Id: Ia5391154b94eca7f12be69eabcdf3f173fc06452
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-12-05 11:41:26 -08:00
Bart Van Assche
42764c4e3e init: Make an error message more informative
Make it easier to diagnose service failures.

Bug: 213617178
Change-Id: I27135cb32b6a98b2fe24ab2324dffbf5b591fdd5
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-12-05 11:41:10 -08:00
Chih-Hung Hsieh
3ec1e81425 Suppress clang-tidy on crasher.cpp
* Intentional crash test code with null/free/escape warnings.

Test: make tidy-system-core-debuggerd_subset
Change-Id: Ib1255c17a374729c82aa246c6a59156dbc4e1b77
2022-12-05 11:28:40 -08:00
Bart Van Assche
c41a4826d1 init: Do not invoke the ServiceList destructor when exiting
From the Google C++ style guide: "Objects with static storage duration
are forbidden unless they are trivially destructible." Hence this CL.

Bug: 213617178
Change-Id: I4c9a51618ee1eb14ed439295a5fc0101b940a63d
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-12-05 10:45:49 -08:00
Bart Van Assche
aee2ec8f1e init: Enable ANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION
From the unique_fd.h header file: "unique_fd's operator int is
dangerous, but we have way too much code that depends on it, so make
this opt-in at first."

From the Google C++ style guide: "Do not define implicit conversions."
See also go/cstyle#Implicit_Conversions.

Hence this CL that disables unique_fd::operator int().

Change-Id: I28d94755d5408f63e5819da8d1cbc285057f867f
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-12-05 09:40:06 -08:00
Bart Van Assche
91ba2197ef init/Android.bp: Sort cflags alphabetically
Sort the compiler flags alphabetically before adding a new macro
definition.

Change-Id: If919333302817406a890c9622396ec96920adf29
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-12-05 09:40:05 -08:00
Bart Van Assche
fdc0f89a4a init: Convert a single-element array into a scalar
Simplify PollIn() by converting a single-element array into a scalar. No
functionality is changed.

Change-Id: I3ef36b9c0daafeed3a92f90c7a7c4fe0654dd586
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-12-05 09:40:05 -08:00
Eran Messeri
6c29c112d3 Merge "Update the KeyMint version to 3" am: 633b9ba26b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2294697

Change-Id: Ib02ac9f1e8b36c7f3ad9ecb367de271beb41de43
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-05 17:39:33 +00:00
Eran Messeri
633b9ba26b Merge "Update the KeyMint version to 3" 2022-12-05 17:16:16 +00:00
Armelle Laine
127abfa058 Merge "trusty/test/binder: Add package support for modules that have AIDL interfaces" am: c4108e917b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2166216

Change-Id: Iea999b38cb5257ff3db996d75a908a0a0956bc51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 23:40:48 +00:00
Armelle Laine
c4108e917b Merge "trusty/test/binder: Add package support for modules that have AIDL interfaces" 2022-12-02 23:22:39 +00:00