Commit graph

58583 commits

Author SHA1 Message Date
Treehugger Robot
f898aade18 Merge "Fix quoting of paths in auth code." am: b371af9e0f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1363936

Change-Id: Ide1441464235ad2839b752e3642a8c88aa7cd784
2020-07-16 17:01:22 +00:00
Treehugger Robot
b371af9e0f Merge "Fix quoting of paths in auth code." 2020-07-16 16:47:20 +00:00
Michael Wright
009d58d8da Merge "Soften BitSet class comment." am: 2ea91cfe76
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360510

Change-Id: Ie3339cabc02b476dd45bc028de09de7d4ee37a2f
2020-07-16 12:45:22 +00:00
Michael Wright
2ea91cfe76 Merge "Soften BitSet class comment." 2020-07-16 12:28:03 +00:00
Alex Buynytskyy
5f3ced82f4 Merge "install-multi-package fix" am: 35f3169c5c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362351

Change-Id: I670d3929fb307bc1ac0c76d05203a528c000ddd0
2020-07-16 05:48:42 +00:00
Alex Buynytskyy
35f3169c5c Merge "install-multi-package fix" 2020-07-16 05:34:44 +00:00
Alex Buynytskyy
71afeb9a5e install-multi-package fix
Fixes: 158851500
Test: adb install-multi-package -d -g $HOME/tmp/base-master.apk:$HOME/tmp/base-en.apk
Change-Id: I92e034c0a8c27eab6d5a82e96817af4a7555388f
Merged-In: I92e034c0a8c27eab6d5a82e96817af4a7555388f
2020-07-16 04:57:07 +00:00
Michael Wright
f32317c869 Soften BitSet class comment.
std::bitset<> doesn't have exact replacements for all of the
functionality of BitSet32/64, so there are still places we want to use
these classes.

Bug: 160010896
Test: test BitSet_test.cpp
Change-Id: Ica59a138e014d82139fb6dcea0597a207faecc2a
2020-07-16 00:04:20 +00:00
Tom Cherry
fc207e2d16 Merge "logd: don't use a thread for deleting log chunks" am: 7c95de7591
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1359387

Change-Id: Ia2c0e03501ea486960e4d4bc826d798ee69bd7a5
2020-07-15 23:14:17 +00:00
Tom Cherry
c89430bda3 Merge "logd: allow opting into simple or serialized log buffers" am: ed99870f79
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362341

Change-Id: I5f932bee0e53c7ad66b3b34774b28aa241cde4ed
2020-07-15 23:13:45 +00:00
Tom Cherry
7c95de7591 Merge "logd: don't use a thread for deleting log chunks" 2020-07-15 22:57:50 +00:00
Tom Cherry
ed99870f79 Merge "logd: allow opting into simple or serialized log buffers" 2020-07-15 22:56:57 +00:00
Elliott Hughes
bdb5233f0c Fix quoting of paths in auth code.
Noticed looked at the log in http://b/160831491.

Test: builds
Change-Id: I95c595ba433a868dedeee8059cfba4c6de8ba91b
2020-07-15 11:55:40 -07:00
Treehugger Robot
28d3a43275 Merge "Fix an issue with C-compatibility due to a missing tag name" am: 37b0d41faf
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362857

Change-Id: I52f96d0d78c15d725c217e90dd08de369ea580b1
2020-07-14 22:29:08 +00:00
Treehugger Robot
37b0d41faf Merge "Fix an issue with C-compatibility due to a missing tag name" 2020-07-14 22:15:36 +00:00
Stephen Hines
84fac2c5d0 Fix an issue with C-compatibility due to a missing tag name
system/core/libpixelflinger/include/pixelflinger/format.h:85:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror,-Wnon-c-typedef-for-linkage]
typedef struct {
              ^
              GGLFormat
system/core/libpixelflinger/include/pixelflinger/format.h:98:5: note: type is not C-compatible due to this member declaration
     inline uint32_t mask(int i) const {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
system/core/libpixelflinger/include/pixelflinger/format.h:124:3: note: type is given name 'GGLFormat' for linkage purposes by this typedef declaration
} GGLFormat;
  ^

Bug: http://b/155835175
Test: m with aosp_blueline
Change-Id: I2819427e2c9e885f7b66527d5268987e8cc73f31
Merged-In: I73b95ff1d6d17af512ce2226b6324e5da0343c39
2020-07-14 14:38:43 -07:00
Yifan Hong
0c1a242060 Merge changes from topic "vendor_dlkm" am: 7ca7680ec5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1350785

Change-Id: I1d3ff13bb5093fd1aedb7c2f47878999d3e8e792
2020-07-14 19:29:02 +00:00
Yifan Hong
7ca7680ec5 Merge changes from topic "vendor_dlkm"
* changes:
  load sysprops from vendor_dlkm.
  fastboot: Add vendor_dlkm
  rootdir: add vendor_dlkm symlinks
2020-07-14 19:15:12 +00:00
Tom Cherry
c1edd66317 logd: allow opting into simple or serialized log buffers
Test: set properties and see logd use the appropriate buffer.
Change-Id: I2dcce7d9661a43adfafb69427d9271ee7ee29f43
2020-07-14 11:52:06 -07:00
Tom Cherry
4f8125af38 logd: don't use a thread for deleting log chunks
This was a premature optimization.  Profiling shows that decompressing
and deleting these logs is rather fast and overall CPU utilization is
lower without the added thread.

Test: profile logd with/without this thread
Change-Id: I31bd52077b495d562dd5797585191dc200ad3859
2020-07-14 18:50:45 +00:00
Steven Moreland
84cdbe20a4 Merge "String8: explicit int -> char cast." am: 3619489de6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362304

Change-Id: Iadd3d6cf8bce3351b1be0767ece1a2fad141886a
2020-07-14 16:45:29 +00:00
Steven Moreland
3619489de6 Merge "String8: explicit int -> char cast." 2020-07-14 16:30:42 +00:00
Tom Cherry
8a5c635a8f Merge "logd: update SerializedLogChunk for new prune calcuations" am: 63e7541faa
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362308

Change-Id: Ie47061c7eaa2dec96c4fad27884d281a5a739763
2020-07-14 01:46:50 +00:00
Tom Cherry
63e7541faa Merge "logd: update SerializedLogChunk for new prune calcuations" 2020-07-14 01:22:05 +00:00
Tom Cherry
44e1a5d59c logd: update SerializedLogChunk for new prune calcuations
A previous change included sizeof(SerializedLogChunk) to the size of a
log chunk to more accurately track logd's log usage, but did not
update the tests that check this value, so this change updates them
appropriately.

Bug: 161179582
Test: logd-unit-tests
Change-Id: Ic37f07fff98c260dcf39b7cc79504c1c3fc2149d
2020-07-13 17:29:55 -07:00
Steven Moreland
fdbc565dd5 String8: explicit int -> char cast.
Since tolower/toupper take and return integer arguments, ascii chars in
the extended range will be converted from positive int values to
negative char values. In order to silence an error here, which was added
recently with integer sanitization here, casting explicitly.

Fixes: 160831549
Test: w/ libutils_fuzz_string8
Change-Id: Iedcd6643f95f84ce662a80e38931d918a200f508
2020-07-13 23:33:25 +00:00
Treehugger Robot
88121b10af Merge "extend syscall minijail for clang code coverage" am: aa64d3b23f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1361997

Change-Id: If843446ecd1eb3b8e714d1237159afbb85cadb03
2020-07-13 22:33:32 +00:00
Treehugger Robot
aa64d3b23f Merge "extend syscall minijail for clang code coverage" 2020-07-13 22:21:12 +00:00
Ray Essick
a20596752c extend syscall minijail for clang code coverage
cutover to clang-based code coverage uses extra system call (ftruncate)
when writing coverage data. exposed while generating coverage for media.extractor.

Bug: 160917521
Test: build, boot, kill -37 extractors for {arm,x86}x{32,64}
Change-Id: I555b168c7aab43caa590df951861b92e8fa14bc3
2020-07-13 13:39:05 -07:00
Tom Cherry
a7aaf84b4e Merge "logd: optionally track the full size of log buffers" am: 478d93846d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1353171

Change-Id: I4f1b942079a9ac2a6ef5e99a1720baf9b1acc57f
2020-07-13 19:50:41 +00:00
Tom Cherry
478d93846d Merge "logd: optionally track the full size of log buffers" 2020-07-13 19:34:15 +00:00
Treehugger Robot
459b5d6350 Merge "toolbox: make all janitors the owners." am: 5f33339b2f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1351802

Change-Id: I24e9f80a49e99c3a9112179be1d200f6bb2d941f
2020-07-13 17:53:06 +00:00
Treehugger Robot
5f33339b2f Merge "toolbox: make all janitors the owners." 2020-07-13 17:31:11 +00:00
Michael Wright
1baa61b095 Merge "Cast away signedness of built-ins in BitSet." am: 71f4494bd1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360509

Change-Id: I3a67be30a6bfa5f9df3b2f106a775612ca7a3fa5
2020-07-13 15:57:23 +00:00
Michael Wright
71f4494bd1 Merge "Cast away signedness of built-ins in BitSet." 2020-07-13 15:45:40 +00:00
Yo Chiang
8cf6a0b69e Merge "Move SingletonTest back to libutils_test" am: 9a57044ab3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360220

Change-Id: Ic9c06cf69623150c041ce5e544a8eb6321f39623
2020-07-13 03:59:41 +00:00
Yo Chiang
9a57044ab3 Merge "Move SingletonTest back to libutils_test" 2020-07-13 03:49:17 +00:00
Michael Wright
23e1363d55 Cast away signedness of built-ins in BitSet.
Most of the built-in functions return signed values but BitSet deals
only in unsigned values. We can safely cast these away though as they're
always indices, which can't be negative.

Bug: 160010896
Test: atest inputflinger_tests, atest libinput_tests
Change-Id: I6e0b33972fabcd41ad1c269ea0e2a07b13b33c12
2020-07-12 01:56:58 +01:00
Matthew Maurer
85128d42c9 Merge "trusty: rpmb_dev: Prevent desync between rpmb_dev and storageproxyd" am: 30b0838b70
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360681

Change-Id: I85b0dfc9092d44023d5c5d5dc5bbc1a867f765e4
2020-07-10 22:47:58 +00:00
Matthew Maurer
30b0838b70 Merge "trusty: rpmb_dev: Prevent desync between rpmb_dev and storageproxyd" 2020-07-10 22:27:24 +00:00
Matthew Maurer
8f62566566 trusty: rpmb_dev: Prevent desync between rpmb_dev and storageproxyd
The mock RPMB can get out of sync with TD storage blocks in the event of
panic or crash. Making this O_SYNC will prevent this from happening.

Bug: 160723681
Test: None
Change-Id: Ia16dfc88ceae56e4e9724a42ac0db492c0e707a4
2020-07-10 22:09:01 +00:00
Treehugger Robot
e526b545cd Merge "init README: document AIDL service interface" am: 4d3c284605
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360957

Change-Id: I2900e7a9ea5f19c185112a4d6394b0087fda048d
2020-07-10 19:41:00 +00:00
Tom Cherry
cb8ddce387 Merge "liblog: remove faulty logic in __android_logger_valid_buffer_size" am: 089455f163
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360177

Change-Id: Iea70205318f7dda34db469fa4d1563a85128c81e
2020-07-10 19:40:53 +00:00
Treehugger Robot
4d3c284605 Merge "init README: document AIDL service interface" 2020-07-10 19:30:52 +00:00
Tom Cherry
089455f163 Merge "liblog: remove faulty logic in __android_logger_valid_buffer_size" 2020-07-10 19:26:38 +00:00
Steven Moreland
fa2457e1cd init README: document AIDL service interface
There is documentation for how AIDL works with ctl commands or
interface_start commands, however it seems we were missing documentation
on declaration of interfaces.

Bug: N/A
Test: N/A
Change-Id: I0e5d2350b6b847a870eafbc69828e75f1f6ca4f0
2020-07-10 17:53:18 +00:00
Yo Chiang
5b028bab2a Move SingletonTest back to libutils_test
Use the new "data_libs:" to specify test library dependency. This is
like "data:" and it treats compiled libraries as test data files.
The result is libutils_test_singleton{1,2} is picked up by libutils_test
and installed next to the test binary.

Mark the test libs libutils_test_singleton{1,2} as uninstallable. This
prevents installing libutils_test_singleton{1,2} directly and only
permits installing via "data_libs:".

```
$ m libutils_test
testcases
└── libutils_test
    ├── arm
    │   ├── libutils_test
    │   ├── libutils_test_singleton1.so
    │   └── libutils_test_singleton2.so
    ├── arm64
    │   ├── libutils_test
    │   ├── libutils_test_singleton1.so
    │   └── libutils_test_singleton2.so
    └── libutils_test.config
```

Bug: 124838889
Test: atest libutils_test
Change-Id: I432135e128fc9eedb1b8c18a331957e271d8b0f0
2020-07-10 19:34:53 +08:00
Tom Cherry
0315b29497 liblog: remove faulty logic in __android_logger_valid_buffer_size
In testing, I saw that the 'main' and 'events' log buffers were set to
incorrect sizes when they were intended to be >= 4MB.  The bug is
tracked down to an invalid line in
__android_logger_valid_buffer_size():

  /* maximum memory impact a somewhat arbitrary ~3% */
  pages = (pages + 31) / 32;

There are two issues with this line:
1) That is not the right calculation for 3%.
2) `pages` is a static variable, so it repeatedly is decremented until
   reaching 1.

The consequence is that this function gives invalid results for the
first few calls, then returns true as long as the input is between
LOG_BUFFER_MIN_SIZE and LOG_BUFFER_MAX_SIZE.  That check is enough, so
the rest of this logic is removed.

Test: buffers are set to the right sizes.
Change-Id: I4d19b1d0fdbd83843d2d61a484ac083d571ef37b
2020-07-09 20:39:17 -07:00
Yifan Hong
2ed3cdaa06 load sysprops from vendor_dlkm.
Load sysprops from /vendor_dlkm/build.prop. Note that
no property contexts are loaded from vendor_dlkm.

Test: getprop | grep vendor_dlkm
Bug: 156020364
Change-Id: Ib0e8ba1791e1d2c11d055ef496208993e11d9b0f
2020-07-09 15:06:44 -07:00
Yifan Hong
6b1c15c063 fastboot: Add vendor_dlkm
Test: add vendor_dlkm partition and flash
Bug: 156020364
Change-Id: If6794ca5a76613a1a3337a4637edd1d364eff5dd
2020-07-09 15:06:44 -07:00