Commit graph

58847 commits

Author SHA1 Message Date
Jaegeuk Kim
4929adbd70 Merge "fs_mgr: try tune2fs for casefolding on /data only" am: 8a6e8be2b8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1401147

Change-Id: I612ffacba843388e27e8145eaf7b98f43c8b8a16
2020-08-15 03:56:02 +00:00
Jaegeuk Kim
8a6e8be2b8 Merge "fs_mgr: try tune2fs for casefolding on /data only" 2020-08-15 03:42:05 +00:00
Songchun Fan
7d1c5b5e1d Merge "[adb] fix signature check" am: d500072443
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1400967

Change-Id: I44225ec7aa22bad5f23a6bc92c68c9626311a32d
2020-08-14 21:56:18 +00:00
Songchun Fan
d500072443 Merge "[adb] fix signature check" 2020-08-14 21:32:39 +00:00
Jaegeuk Kim
5ba5b90cd6 fs_mgr: try tune2fs for casefolding on /data only
Bug: 163420666
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Id646bd25d6fed0f547fb0647150acdc4845a5eec
2020-08-14 12:57:25 -07:00
Songchun Fan
c935d0c450 [adb] fix signature check
BUG: 163543633
Test: atest CtsIncrementalInstallHostTestCases
Change-Id: Ie65d4639d5fb5b2dc100f1d17e3dd1c843510325
2020-08-14 11:49:58 -07:00
Treehugger Robot
5db8da5eaf Merge "libcutils: use 0 for netlink socket port id" am: e473c89c52
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1400307

Change-Id: I3a61ad53abad599ff7567d4373973be86f550efa
2020-08-14 18:12:26 +00:00
Treehugger Robot
e473c89c52 Merge "libcutils: use 0 for netlink socket port id" 2020-08-14 17:52:37 +00:00
Gyeongtaek Lee
2f11cb4c4c libcutils: use 0 for netlink socket port id
AudioHAL and SoundtriggerHAL is separeted HAL but running in thread with
same process id.
So, if both HAL try to open netlink socket using uevent_open_socket(),
secondly opening socket receives already-in-use error.
To prevent situation, set 0 to socket port id.
By the LINUX man page, "The kernel assigns the process ID to the first
netlink socket the process opens and assigns a unique nl_pid to every
netlink socket that the process subsequently creates."

Bug:163008274
Test: tested by opening netlink socket in AudioHAL and
SoundtriggerHAL both.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
Change-Id: I5f9859e8dac749bf5d0998e825043c9988c202ba
2020-08-14 21:29:17 +09:00
Christopher Ferris
e694f34b3c Merge "Set warning for dex pc not in map." am: 278f11b574
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1396068

Change-Id: I6fa6270c8cafce8b8e03e1b8f8de6e9e61999bca
2020-08-13 23:45:38 +00:00
Christopher Ferris
278f11b574 Merge "Set warning for dex pc not in map." 2020-08-13 23:25:26 +00:00
Florian Mayer
96e966eb3d Set warning for dex pc not in map.
This way, the profilers will know they have to reparse maps.

Bug: 163130539

Test: Verified updated unit tests pass.
Change-Id: I88a801ffdda12811eab5e4833dcf472f2d75c09a
2020-08-13 13:07:21 -07:00
Tom Cherry
a45c7e8a3d Merge "Reland: "liblog: use a blocking socket for sending messages to logd""" am: 0398117a9a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1397710

Change-Id: I949aa35c504bc91e51c5393b4c65d70fd6e5ad23
2020-08-13 15:27:39 +00:00
Tom Cherry
0398117a9a Merge "Reland: "liblog: use a blocking socket for sending messages to logd""" 2020-08-13 15:15:57 +00:00
Tom Cherry
5dfb05fd3d Merge changes I40fe9b79,I4b6f8331 am: 7ef8bca1f9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1397551

Change-Id: Ic532b745de48852259aa8dda4ee0829bd1c2ecbf
2020-08-12 23:03:05 +00:00
Tom Cherry
7ef8bca1f9 Merge changes I40fe9b79,I4b6f8331
* changes:
  logd: SerializedLogBuffer: never wait for a reader during prune/clear
  logd: always wake 'wrapped' readers on prune
2020-08-12 22:44:42 +00:00
Treehugger Robot
47d5a1f03f Merge "Fix non-existent module error" am: 1173476551
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1398408

Change-Id: I5f7e98723834ca9c2bdb4175d894a4a6a8177c5b
2020-08-12 19:58:10 +00:00
Tom Cherry
3932a9c074 logd: SerializedLogBuffer: never wait for a reader during prune/clear
Previously, chatty had logic that would skip a certain number of log
entries to satify pruning, but otherwise keep the reader connected.
This was a best-effort attempt at helping pruning and had additional
logic that handled further disruptions, if logd's memory was 2x the
allotted memory.

The new logic has two components:
1) memcpy() each individual log message in FlushTo() such that there
are no references to the underlying log data without a lock held.
Note, that this memcpy is completely negligible for performance.
2) In Prune(), immediately delete all log chunks required to reduce
memory to the allotted amount, which is now safe given 1).  If readers
will lose logs, continue to print a warning.

This additionally makes the Clear() logic deterministic.  It was
previously best effort in chatty, but will immediately and always
clear all logs for SerializedLogBuffer.

Bug: 163617910
Test: logging unit tests
Test: Prune() immediately frees buffers during high log pressure
Test: Clear() immediately frees buffers during high log pressure
Change-Id: I40fe9b791312af3dc256b166e5c34425f4ca51ac
2020-08-12 12:49:56 -07:00
Treehugger Robot
1173476551 Merge "Fix non-existent module error" 2020-08-12 19:49:18 +00:00
Treehugger Robot
d4c3f86952 Merge "charger: Avoid a couple string constructions" am: b9edfee8a2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1397708

Change-Id: I3c510bcf3da0d196aede80c5a16865fed39c0d85
2020-08-12 19:48:17 +00:00
Treehugger Robot
b9edfee8a2 Merge "charger: Avoid a couple string constructions" 2020-08-12 19:29:49 +00:00
Tom Cherry
c5282c2121 Reland: "liblog: use a blocking socket for sending messages to logd""
This reverts commit b1eb731197.

Test: post-submit failure now passes
Change-Id: Iabbd18ad8403dd30aa07dd73e42fcc5b233b0222
2020-08-12 10:51:27 -07:00
Tom Cherry
d0e8451d59 logd: always wake 'wrapped' readers on prune
See the comment in the code for more details.  'wrapped' readers are
uncommon and error prone, and this change makes them more reliable.
Its side effect is that wrapped readers will wake more often, but
they'll still be batched to a large degree.

Bug: 163617910
Test: logging unit tests
Test: logcat --wrap does the right thing
Change-Id: I4b6f8331ff7854787c97f821b2a5bf8d7da321c6
2020-08-12 10:42:44 -07:00
Tom Cherry
43e2505544 Merge "logd: add a test that logd ignores SIGPIPE" am: 0df0fcbb9d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1392784

Change-Id: I4a5444701ac2548c6151993df9d96edd2336a944
2020-08-12 17:38:29 +00:00
Tom Cherry
0df0fcbb9d Merge "logd: add a test that logd ignores SIGPIPE" 2020-08-12 17:18:57 +00:00
Yo Chiang
78ee4c1005 Fix non-existent module error
TARGET module init_vendor requires non-existent TARGET module: init_first_stage

Module `init_first_stage` is skipped (not defined) on ASAN builds.

Bug: 163802658
Test: TH
Change-Id: I5aa030dfaa59a21511a7112ff89f8a5d8b8dc735
2020-08-12 16:27:08 +00:00
Greg Kaiser
8763fd26fb charger: Avoid a couple string constructions
With a couple recent changes to APIs taking a const std::string&,
instead of a const char *, we switch to directly passing in a
reference to our string.

Test: TreeHugger
Change-Id: Id9f832dd5e3def28cfeaa0d3cda7da323332b16c
2020-08-12 07:03:50 -07:00
Treehugger Robot
e5c827a25a Merge "Add failure logs in __ashmem_open_locked()" am: 546cf270ab
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1394158

Change-Id: Ic4b9148b484ed79bf4fdb73fa5e2e5905497555f
2020-08-11 23:23:45 +00:00
Treehugger Robot
546cf270ab Merge "Add failure logs in __ashmem_open_locked()" 2020-08-11 23:04:28 +00:00
Tom Cherry
cfe90f29ac Merge "Revert "liblog: use a blocking socket for sending messages to logd"" am: cadeec102c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1397308

Change-Id: Ibb9b17338b6a00967b7981ea365a34939e3a40e7
2020-08-11 22:30:54 +00:00
Tom Cherry
cadeec102c Merge "Revert "liblog: use a blocking socket for sending messages to logd"" 2020-08-11 22:17:41 +00:00
Tom Cherry
b1eb731197 Revert "liblog: use a blocking socket for sending messages to logd"
This reverts commit 4af349b072.

Reason for revert: post submit test logs too much fails after this
Bug: 163611679

Change-Id: If9939f3c9864dad67536d0c5481f662b9d07c58e
2020-08-11 22:15:09 +00:00
Treehugger Robot
f614dd953e Merge "liblog: remove android_lookupEventTag" am: d81e1d3483
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1396175

Change-Id: I3f2e7cf013201a8a9cfc13a3b5bc2c4c0790162f
2020-08-11 19:06:22 +00:00
Yifan Hong
e92882a855 Merge changes from topic "charger_soong" am: 333149339b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1394309

Change-Id: I74f8883963fa06d4000694b037117d7298897370
2020-08-11 19:05:51 +00:00
Treehugger Robot
d81e1d3483 Merge "liblog: remove android_lookupEventTag" 2020-08-11 19:05:35 +00:00
Yifan Hong
333149339b Merge changes from topic "charger_soong"
* changes:
  charger: Add tests for loading animation resources
  charger: Move built-in resources to /system
  charger: Load default resources from /system
2020-08-11 18:51:31 +00:00
Tom Cherry
175366df44 liblog: remove android_lookupEventTag
This function has been marked deprecated for quite some time, has no
users, and isn't in liblog.map.txt.

Test: build
Change-Id: Ic3bf47c780b18a5d4f1e997b9265be76049fb824
2020-08-11 09:20:18 -07:00
Elliott Hughes
6c39be7d7f Merge "libsparse: Fix overflow of merged sparse chunk length" am: 7298ba0992
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1394507

Change-Id: If23bd796c34f82cf104d86719967c6dbff4cef3f
2020-08-11 15:35:27 +00:00
Tom Cherry
fe74b01def Merge "liblog: use a blocking socket for sending messages to logd" am: d731184c38
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1395649

Change-Id: I31c95843d1c7d40d662bcb4eb31829b2241757c2
2020-08-11 15:35:20 +00:00
Elliott Hughes
7298ba0992 Merge "libsparse: Fix overflow of merged sparse chunk length" 2020-08-11 15:19:01 +00:00
Tom Cherry
d731184c38 Merge "liblog: use a blocking socket for sending messages to logd" 2020-08-11 15:13:02 +00:00
Hyeongseok Kim
e8d02c50d7 libsparse: Fix overflow of merged sparse chunk length
Merging sparse chunk can make sparse map block bigger than 4GiB,
that can't be covered by unsigned integer type. Fix this by
changing unsigned int to uint64_t type.

Test: sparse build
Bug: 162808120
Change-Id: Id4d3f88f9d531c25c3937c99b2c81efb915605ee
Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
Cc: hyeongseok.kim <hyeongseok.kim@lge.com>
2020-08-11 08:34:28 +09:00
Tom Cherry
4af349b072 liblog: use a blocking socket for sending messages to logd
liblog uses a non-blocking socket for sending messages to logd as a
performance/reliability trade-off, favoring not blocking processes
when they log over reliably tracking all logs.

This change asserts that the above is the wrong trade-off: that log
relability is more important than slight delays when logging. Further
points to consider:

1) The new logd implementation without chatty has lower latency and
less variance in its ::Log() function.
2) liblog also writes to /dev/pmsg0 and this call is already blocking.
3) Logging is already expensive and excess spam must be eliminated
regardless.

Bug: 151654749
Bug: 155922578
Bug: 160314220
Test: No messages are dropped by this socket
Change-Id: I163b7d51aa73a10978850f1868cb9fc4bf9ead1b
2020-08-10 15:56:15 -07:00
Eric Biggers
f79287b5cc Merge "fs_mgr: use __ANDROID_API_Q__ instead of pre_gki_level" am: 9b6922b5df
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1394890

Change-Id: If9f3833dfec2f29d436fd535d64404281a93d82e
2020-08-10 22:53:51 +00:00
Eric Biggers
9b6922b5df Merge "fs_mgr: use __ANDROID_API_Q__ instead of pre_gki_level" 2020-08-10 22:35:21 +00:00
Tom Cherry
0b1ebf0475 Merge "logd: document the decision to use compression instead of chatty" am: c486371741
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1394969

Change-Id: I5d9df6eae40cb7c53ba2738fdfd96494eb6625b2
2020-08-10 22:04:31 +00:00
Tom Cherry
c486371741 Merge "logd: document the decision to use compression instead of chatty" 2020-08-10 21:47:39 +00:00
Hridya Valsaraju
9a147033f8 Add failure logs in __ashmem_open_locked()
Bug: 160984921
Test: build, boot
Change-Id: I754c961289828463af6de905d8b057b4350f5f07
2020-08-10 14:14:13 -07:00
Tom Cherry
edc1ba6a1d logd: document the decision to use compression instead of chatty
Open README.compression.md in a markdown viewer for details.

Test: vscode and gitiles render this correctly
Change-Id: Iaa0093dc565b5c6bb016c9e97248375f0906d0c8
2020-08-10 11:53:51 -07:00
Eric Biggers
75ebdd9c7c fs_mgr: use __ANDROID_API_Q__ instead of pre_gki_level
The name "pre_gki_level" is causing some confusion because not all
devices launching with Android R are subject to the GKI requirement.
(See b/161563110#comment11.)  E.g., devices that use a 4.14-based kernel
are exempt from GKI.  However, the encryption requirements still apply.

Just use __ANDROID_API_Q__ directly instead.

No change in behavior.

Change-Id: I4242745ccc9f88e084a1adfab5796daa9bc59b6e
2020-08-10 11:43:52 -07:00