Commit graph

78684 commits

Author SHA1 Message Date
Sanjana Sunil
aeee1c6231 Merge "Create misc_ce and misc_de mirror storage" 2022-12-08 18:09:11 +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
Eric Miao
8d60cfe2cb Merge "libutils: Add more tests for Unicode" 2022-12-07 23:06:17 +00:00
David Drysdale
e0af2b83f3 Merge "KeyMint HAL in Rust for Trusty" 2022-12-07 10:20:08 +00:00
Chih-hung Hsieh
48cd41324b Merge "Fix potential memory leaks" 2022-12-07 02:36:27 +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
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
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
70b22e1c5b Merge "init: Make an error message more informative" 2022-12-06 03:04:16 +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
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
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
633b9ba26b Merge "Update the KeyMint version to 3" 2022-12-05 17:16:16 +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
Christopher Ferris
c444569a82 Merge "Add myself to janitor owners." 2022-12-02 23:01:59 +00:00
Chih-hung Hsieh
0a5c0b4364 Merge "Fix "Attempt to delete released memory" warning." 2022-12-02 22:36:39 +00:00
Christopher Ferris
6a907a10aa Add myself to janitor owners.
Since I have to go around the tree modifying code when updating
kernel headers, it seems to make sense to get on this list.

Test: NA
Change-Id: I714b1cbacd336deef1d0e37576d2ab500832eb1a
2022-12-02 12:50:43 -08:00
Chih-Hung Hsieh
c76bc32d95 Fix "Attempt to delete released memory" warning.
EXPECT_NONFATAL_FAILURE(statement, ...) expands to
  do {
    ... statement ...
  } while (::testing::internal::AlwaysFalse());

Clang analyzer cannot see into AlwaysFalse(),
and gives a false warning assuming that the
do loop can be done twice.

Use a unique_ptr::reset to call delete,
because reset can be called multiple times..

Bug: 259999410
Test: make tidy-system-core-fastboot_subset
Change-Id: Ie536f76635dd55f4e47b80eed6498fd1193b88ee
2022-12-02 12:38:41 -08:00
David Anekstein
d12c75f531 trusty/test/binder: Add package support for modules that have AIDL interfaces
Bug: 240461931
Change-Id: Ia88303a4b806be860cac5a324d55d0ab87dce189
2022-12-02 20:27:28 +00:00
Treehugger Robot
9e6005ada4 Merge "Fix nullptr access when cow reader open fails" 2022-12-02 19:25:32 +00:00
Kelvin Zhang
bc1a5b1393 Fix nullptr access when cow reader open fails
Bug: 260805150
Test: th
Change-Id: Id945cc4fa0fce141e3d52b8259241e22ba590ebd
2022-12-02 09:50:44 -08:00
Sally Qi
af7be76168 Add COLOR_MODE_DISPLAY_BT2020 to graphics header.
Bug: 256551001
Test: build and flash; hidl-gen -Lexport-header -o $ANDROID_BUILD_TOP/system/core/include/system/graphics-base-v1.2.h
android.hardware.graphics.common@1.2

Change-Id: I989d1171c98f477f174ad092b74d455a062c9bad
2022-12-01 22:25:40 -08:00
Daeho Jeong
eff9050ccf Merge "set iostat_period_ms to 1 sec" 2022-12-02 05:05:12 +00:00
Daeho Jeong
2accf5bd79 set iostat_period_ms to 1 sec
Current period of this is 3 sec and it is used when Perfetto profiling is running on Android. Without Perfetto profiling, it doesn't affect the system at all. However, 3 sec doesn't provide enough granularity to understand F2FS I/O behaviors. To make F2FS I/O profiling ftrace effective, set the ftrace period to 1 sec.

Test: check f2fs iostat_period_ms sysfs node value
Change-Id: I2d418795613dfbd1aea6c4f13c9a39af3deb1c4d
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2022-12-01 22:27:09 +00:00
Bart Van Assche
fa4926a9de Merge "Revert "init: Add more diagnostics for signalfd hangs."" 2022-12-01 17:50:27 +00:00
Treehugger Robot
2e2fed7668 Merge "fs_mgr/OWNERS: Update bug component" 2022-12-01 17:16:57 +00:00
Yi-Yo Chiang
701d643b2a fs_mgr/OWNERS: Update bug component
Fix: 261015598
Test: none
Change-Id: I52c6cca5d46f7c6f02e6b4ca608e14ef3a3de81b
2022-12-01 23:47:02 +08:00
Eran Messeri
e345066058 Update the KeyMint version to 3
Part of the change to support 2nd IMEI attestation.

Bug: 244732345
Test: atest keystore2_test android.keystore.cts.DeviceOwnerKeyManagementTest
Change-Id: I59544e1e8019869cadeb7b46800c9b519048934c
2022-12-01 11:00:16 +00:00
Treehugger Robot
7bc5a7ef5f Merge "init: Fix and re-enable the init#StartConsole test" 2022-12-01 04:56:09 +00:00
Kiyoung Kim
62a307ab61 Remove LLNDK libraries from system required
Remove LLNDK libraries from system required libs as those libraries will
be appended to the configuration from the build.

Bug: 251782700
Test: Cuttlefish build and boot succeeded
Change-Id: I81d508a5e15a9dd1919935f07569271609738710
2022-12-01 11:36:45 +09:00
David Anderson
85b7bbf41f Merge "libsnapshot: Disable 32-bit VTS tests on 64-bit systems." 2022-12-01 00:25:24 +00:00
Bart Van Assche
3b21d95a0e init: Fix and re-enable the init#StartConsole test
Skip the test if /dev/console does not exist. Fix the console service
security label. Fix the getsid() test.

Bug: 260104465
Test: atest 'CtsInitTestCases:init#StartConsole' on a P2023 development board
Change-Id: If2533a3f205f922a9b04a748cb558a09c5925986
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-11-30 13:25:47 -08:00
Treehugger Robot
a3e605486d Merge "trusty/storage: Add property indicating when fs is ready" 2022-11-30 21:06:13 +00:00
Bart Van Assche
29d8a42d14 Revert "init: Add more diagnostics for signalfd hangs."
Revert commit 14f9c15e05 ("init: Add more diagnostics for signalfd
hangs") because:
* That commit was intented to help with root-causing b/223076262.
* The root cause of b/223076262 has been fixed (not blocking SIGCHLD
  in all threads in the init process).

Test: Treehugger
Change-Id: I586663ec0588e74a9d58512f7f31155398cf4f52
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-11-30 09:17:16 -08:00
Daniel Zheng
65452d036e Updating fastboot to modern c++ standards
Test: tested fastboot on raven device
Change-Id: I0c1fa4cd09378282edf5df54ae26d747e6d4f3eb
2022-11-30 03:36:46 +00:00
Max Bires
f9e6c5104d Merge "Add TEST_MAPPING files." 2022-11-29 17:53:18 +00:00
Martin Stjernholm
84681d34f6 Merge "Remove dalvik.vm.usejitprofiles system property." 2022-11-29 11:15:45 +00:00
Max Bires
065a7207a2 Add TEST_MAPPING files.
These TEST_MAPPING definitions ensure that the VTS tests for the
respective HAL services will be executed upon any changes committed to
the HAL services.

Test: hopefully this is the test
Change-Id: Icfaf3621f2c7b9608deb998ba4b5cfd6621a7310
2022-11-29 02:50:45 -08:00