Commit graph

56132 commits

Author SHA1 Message Date
Woody Chow
8db23af93b Merge "Fix unsigned integer overflow of i, which gives SIGABRT" 2020-01-22 01:14:18 +00:00
Elliott Hughes
556bb77f6f Merge "Make OSTREAM_STRING_POINTER_USAGE_WARNING build even with GCC"
am: 7becf26301

Change-Id: I734de51bbb9cbbb16f8768411711c67efd2c819d
2020-01-21 17:13:13 -08:00
Elliott Hughes
7becf26301 Merge "Make OSTREAM_STRING_POINTER_USAGE_WARNING build even with GCC" 2020-01-22 01:06:05 +00:00
Alessio Balsini
e0e4df8486 Merge "Snapshot merge progress percentage"
am: 3ddd4304f5

Change-Id: Ibf6b6bbbb3c1f11b4ece4d50e8ce18c77bdb45fd
2020-01-21 16:28:52 -08:00
Treehugger Robot
3ddd4304f5 Merge "Snapshot merge progress percentage" 2020-01-22 00:25:50 +00:00
Tom Cherry
42c89602da Merge changes Icb49b30b,Ib52cbfb4
am: 81c8385ab3

Change-Id: I2e1431bc655dfb26f1b9307d91ab07fbac0cbd99
2020-01-21 14:31:41 -08:00
Tom Cherry
81c8385ab3 Merge changes Icb49b30b,Ib52cbfb4
* changes:
  Move minimum log priority from libbase to liblog
  Move SetLogger and SetAborter from libbase to liblog
2020-01-21 22:27:49 +00:00
Elliott Hughes
58fdc98bf5 Merge "Update shell_and_utilities docs for R."
am: 2353510b5a

Change-Id: If7e48b8ec6fcac02df79e220ac2151de6d077b30
2020-01-21 14:16:40 -08:00
Elliott Hughes
2353510b5a Merge "Update shell_and_utilities docs for R." 2020-01-21 21:45:59 +00:00
Yifan Hong
b98a2e36ae SnapshotManager::WaitForMerge gives more info
It now returns Ok() if successful, NeedsReboot() if merge
it should be checked again after reboot, and Error() for
other errors.

This wraps UpdateState to help clients interpret the UpdateState value.

Also separate SnapshotManager::Return from FiemapStatus since they are
for different libraries and have (potentially) different set of error codes.

Test: libsnapshot_test
Bug: 138808328
Change-Id: I8c95417c2b0b7b2a362beb12585f861453a79278
2020-01-21 13:34:55 -08:00
Ryan Savitski
bc1dba9d4f Merge "init: add builtin check for perf_event LSM hooks"
am: cdebef1d2b

Change-Id: Ibd81d1eca1af30c50265af4a84fc8f28f31c228e
2020-01-21 12:45:49 -08:00
Ryan Savitski
cdebef1d2b Merge "init: add builtin check for perf_event LSM hooks" 2020-01-21 20:40:50 +00:00
Steven Moreland
604ed987f3 Merge "libutils: sp lh comparison w/ pointer"
am: 2ac625db19

Change-Id: Iaf8cb1ba18da25b371c672a955f925404b4402f2
2020-01-21 12:20:49 -08:00
Tom Cherry
0391a879f7 Move minimum log priority from libbase to liblog
See the previous commit moving SetLogger and SetAborter to liblog for
motivation.

This creates more harmony between the two mechanisms in libbase and
liblog for checking loggability.
Currently:
1) libbase filters all messages based on its minimum log priority. For
   example, if minimum log priority in libbase remained at its
   default, but a tag was specifically opted into DEBUG logs via
   log.tag.<tag>, libbase would not print this log.
2) liblog ignores libbase's minimum log priority.  For example if a
   process called SetMinimumLogPriority(WARNING) but used a library
   that logged via liblog's ALOGI macro, that log would still be
   printed even though the process intends on filtering out those INFO
   messages.

With this change:
1) If both a minimum log priority and a priority through log.tag.<tag>
   are set, then the lower of the two values is used.
2) If only one or the other is set, then that value is used.  This
   fixes the two issues described above.
3) If neither of these values are set, then the default of using INFO
   is unchanged.

Bug: 116329414
Bug: 119867234
Test: libbase and liblog minimum log priority tests
Change-Id: Icb49b30b9d93bf797470e23730ae9e537931bb6c
2020-01-21 12:14:43 -08:00
Steven Moreland
2ac625db19 Merge "libutils: sp lh comparison w/ pointer" 2020-01-21 20:14:23 +00:00
Josh Gao
1c698729df Merge "debuggerd_handler: increase thread stack size."
am: 6ea42a892f

Change-Id: I898ab82cd0689144b3fd37fb3a144380db6ef229
2020-01-21 12:04:28 -08:00
Treehugger Robot
6ea42a892f Merge "debuggerd_handler: increase thread stack size." 2020-01-21 20:00:05 +00:00
Yabin Cui
3e59bf0686 Merge "libprocinfo: remove error msg for unknown process state."
am: 63f25aa3fa

Change-Id: Ib3f330c12bc322a01ef89af7cc27d95814318dc8
2020-01-21 11:45:13 -08:00
Yabin Cui
63f25aa3fa Merge "libprocinfo: remove error msg for unknown process state." 2020-01-21 19:40:15 +00:00
Yifan Hong
f58732260d Merge "SnapshotManager::Return -> Return"
am: 5e3e76520d

Change-Id: I3e3b00eb420e441bac70bf916e349013b2c3117c
2020-01-21 11:36:37 -08:00
Yifan Hong
5e3e76520d Merge "SnapshotManager::Return -> Return" 2020-01-21 19:33:27 +00:00
Tom Cherry
349b0c43ad Move SetLogger and SetAborter from libbase to liblog
libbase is copied into each APEX module which requires it, meaning
that there may be multiple instances of libbase running within a
single process with their own copy of libbase's globals.  This means
that SetLogger() and SetAborter() will only impact logs from the
instance of libbase that calls it.  This change moves this state to
liblog, since it will only ever have one instance in a single
process.

One major side-effect here is that now both ALOGE style and LOG(...)
style logs will be handled through the same logger function.  For
example, a logger specified through libbase's SetLogger() will now see
logs sent to liblog through ALOGE().  This is intended behavior.

A second side-effect is that libbase's stderr logger is used for all
host logging now.  It's simply a better logging default than the
fake_log_device logger in liblog currently and makes ALOGE and
LOG(...) logs on host follow the same format.

Bug: 119867234
Test: libbase and liblog unit tests; logging works
Change-Id: Ib52cbfb4e43749e50910ed19a993dffae19ace86
2020-01-21 11:05:24 -08:00
Tom Cherry
6552262bba Merge "Allow fuzzy_fastboot test devices over internet"
am: adfb1c6d1b

Change-Id: I96e1962d171aed0491a8f37a4ba45b9e14e196a5
2020-01-21 10:36:25 -08:00
Tom Cherry
adfb1c6d1b Merge "Allow fuzzy_fastboot test devices over internet" 2020-01-21 18:32:17 +00:00
Janis Danisevskis
3bfe324c95 Merge "First working version of the confirmationui HAL service"
am: a78d0cb735

Change-Id: I3444e33493da7d3a205e2a377a2e1510440e808e
2020-01-21 08:45:51 -08:00
Treehugger Robot
a78d0cb735 Merge "First working version of the confirmationui HAL service" 2020-01-21 16:40:03 +00:00
Satoshi Niwa
5b92e15b99 Merge "init: Fix a bug in MountDir"
am: c3d94633a2

Change-Id: Ia912188f6cef2bf4771f4010dc5e4430087cd1dd
2020-01-21 07:44:39 -08:00
steven_fann
fde5e27602 Allow fuzzy_fastboot test devices over internet
Bug: 144667236
Test: fuzzy_fastboot --serial=192.168.1.104:5555 --gtest_filter=*Logical*

Change-Id: I02e62f706d0a3a19a9b7b56788abe05759d2d63d
2020-01-21 15:40:52 +00:00
Treehugger Robot
c3d94633a2 Merge "init: Fix a bug in MountDir" 2020-01-21 15:39:04 +00:00
Davide Pallotti
2acd25a33d Make OSTREAM_STRING_POINTER_USAGE_WARNING build even with GCC
This is for projects built with GCC that import parts of Android that,
despite not having Android-specific dependencies, still end up
depending on logging.h.
Also removes outdated notes.

Change-Id: I5a47b302bcaeeb935592d8fc7ad2fe5068d226c3
2020-01-21 10:54:36 +01:00
Woody Chow
7fb93c168e Fix unsigned integer overflow of i, which gives SIGABRT
Bug: 147640670
Test: None

Change-Id: I157aacbf9ddaa6a91eccd940573cf187b58e8d5e
2020-01-21 02:00:54 +00:00
Satoshi Niwa
1eb300dca5 init: Fix a bug in MountDir
mkdir always returns -1 for any types of errors.
errno should be checked for actual error type.

Test: m
Change-Id: I1b56d48ba48992a2f9629dc09d795c277b5b774d
2020-01-20 18:00:49 +09:00
nelsonli
7315bc9175 Merge "[vts-core] Make VtsKernelLibcutilsTest runnable by base TradeFed"
am: 0852b10b37

Change-Id: Idd1430e83e46f21346599a53897ebdcffdd7a961
2020-01-19 18:36:37 -08:00
Treehugger Robot
0852b10b37 Merge "[vts-core] Make VtsKernelLibcutilsTest runnable by base TradeFed" 2020-01-20 02:32:56 +00:00
Josh Gao
55c7ed4e2e debuggerd_handler: increase thread stack size.
1 page isn't enough to log on AArch64, and clean pages are free, so
increase the stack size to 8 pages.

Bug: http://b/144887737
Test: treehugger
Change-Id: I731b3bc27ab37f4b830a9478a04cd34d4f7648d3
2020-01-17 17:25:30 -08:00
Janis Danisevskis
8fe0cfb098 First working version of the confirmationui HAL service
This implementation does not provide any security guaranties.
 * The input method (NotSoSecureInput) runs a crypto protocols that is
   sufficiently secure IFF the end point is implemented on a trustworthy
   secure input device. But since the endpoint is currently in the HAL
   service itself this implementation is not secure.
 * This implementation provides most of the functionality, but not the
   secure UI infrastructure required to run Android Protected
   Confirmation.

Bug: 146078942
Test: VtsHalConfirmationUIV1_0TargetTest
Change-Id: I14717b5fa4ef15db960cdd506b8c6fe5369aec8d
2020-01-17 16:34:48 -08:00
Yabin Cui
1c22b4fedf libprocinfo: remove error msg for unknown process state.
Unknown process states are expected since libprocinfo doesn't
list all process states in
https://github.com/torvalds/linux/blob/master/fs/proc/array.c#L130.
So remove error message for unknown state.

Bug: none
Test: run libprocinfo_test.
Change-Id: I321893855235367e037afd58ccb63d5140619095
2020-01-17 15:55:13 -08:00
Steven Moreland
306f8b5713 libutils: sp lh comparison w/ pointer
Perhaps the better question is, why have I 100s of times, typed
"ASSERT_NE(nullptr, foo)" for sp<> foo, and got a compiler error and
then change it to "foo.get()". This CL so we can stop wasting cycles
with that error.

Fixes: 147842528
Test: libutils_test
Change-Id: Id63b29d2a1ff3077201a62b69d864c5a826c47e0
2020-01-17 22:50:30 +00:00
Yifan Hong
b37311d4dd SnapshotManager::Return -> Return
Now that the class becomes more complicated, move it out
of SnapshotManager.

Also, make it independent of FiemapStatus. libsnapshot and
libfiemap has different return classes.

Test: libsnapshot_test
Change-Id: If340959ba60bcd51c36e2b48f4d11c149ead907a
2020-01-17 14:43:27 -08:00
Automerger Merge Worker
f29bb3a0ce Merge "Give x permission on apex data directories." am: d6289bdf13
Change-Id: Id3a451ca9509789a9e563fc2819e5de2faddcdd1
2020-01-17 17:19:18 +00:00
Oli Lan
d6289bdf13 Merge "Give x permission on apex data directories." 2020-01-17 17:08:21 +00:00
Alessio Balsini
fb58f0d45a When encountered an unexpected status, mention it
Instead of just mentioning that something wrong has been found when
parsing UpdateState, also log the value of the erroneous status.

Bug: none
Test: m
Change-Id: I487a115a9347199059a684ef682bec79fa5f26a9
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-01-17 16:56:05 +00:00
Automerger Merge Worker
87e084a077 Merge changes Ibb4b4ca4,I31572afa am: 0a86d01080
Change-Id: Id9d2e43373af19b1bc9d445de56ca050638f2ef6
2020-01-17 15:45:29 +00:00
Automerger Merge Worker
d2d39d19c3 Merge "llkd: ignore frozen processes" am: 11159b5214
Change-Id: I3dfe6e86bfb8bb494534d351cd3a4a910c584da7
2020-01-17 15:45:19 +00:00
Treehugger Robot
0a86d01080 Merge changes Ibb4b4ca4,I31572afa
* changes:
  llkd: test: llkd.sleep also check for __arm64_sys_openat
  llkd: requires sys_admin permissions
2020-01-17 15:39:45 +00:00
Marco Ballesio
11159b5214 Merge "llkd: ignore frozen processes" 2020-01-17 15:35:20 +00:00
Automerger Merge Worker
98c17d457e Merge "Fix ota test case" am: a36f7c1f93
Change-Id: I6bc947c43699f53ba9a460b8f144c2ddb9591e29
2020-01-17 12:29:27 +00:00
Nikita Ioffe
a36f7c1f93 Merge "Fix ota test case" 2020-01-17 12:18:53 +00:00
Oli Lan
90c523b30b Give x permission on apex data directories.
This gives search (x) permission on the parent apex data
directory /data/misc/apexdata so that directories below it
may be opened. It also gives that permission on the apex
data directories themselves.

Bug: 147848983
Test: Build & flash, check perms are correct
Change-Id: I27c4ea01602002c89d0771a144265e3879d9041a
2020-01-17 11:41:04 +00:00
Automerger Merge Worker
4a7a61d2c6 Merge "Add version #29 and #30 to liblog" am: d82d9851de
Change-Id: I82e8d2669b62ac379d22c4c87677afc375c6876d
2020-01-17 03:20:28 +00:00