Commit Graph

26712 Commits

Author SHA1 Message Date
forfun d3435f5d31 Merge "modify a minor error in mount_with_alternatives Test: when called with end_idx = null"
am: 3080ce2fe4

Change-Id: I3b7b2167a9d3cd492bb9970e9330ca965d0fb843
2016-12-20 02:13:07 +00:00
Treehugger Robot 3080ce2fe4 Merge "modify a minor error in mount_with_alternatives Test: when called with end_idx = null" 2016-12-20 02:08:36 +00:00
Mark Salyzyn 0f3c31086d Merge "logd: sum liblog tag messages"
am: 27425fd80d

Change-Id: Iff565b1ff40c100c2d4b38d1514de0d5b1c94b8e
2016-12-19 23:50:07 +00:00
Mark Salyzyn ebfba62dcb Merge "logd: correct duplicate message state machine"
am: 9fa0215e15

Change-Id: Id08fcce15a8edb5985f76e2063a1bf8486c93b22
2016-12-19 23:49:56 +00:00
Treehugger Robot 27425fd80d Merge "logd: sum liblog tag messages" 2016-12-19 23:43:48 +00:00
Treehugger Robot 9fa0215e15 Merge "logd: correct duplicate message state machine" 2016-12-19 23:43:23 +00:00
Mark Salyzyn 704c1b9dfa Merge "logd: add android::sizesTotal() function"
am: d04fa942e5

Change-Id: I8dbf35655c0c32ebbb8c563c11b2fe62fe37084b
2016-12-19 23:25:39 +00:00
Treehugger Robot d04fa942e5 Merge "logd: add android::sizesTotal() function" 2016-12-19 23:19:11 +00:00
Mark Salyzyn b545e1c9e3 logd: trailing spaces in log statistics (part deux)
Test: manual
Bug: 30118730
Change-Id: Iafda6f95e1b1377649e01868c81c0056c116e01b
2016-12-19 15:06:42 -08:00
Mark Salyzyn d966e22680 Revert "logd: trailing spaces in log statistics"
Caused +/- field data to land under the Pruned column

This reverts commit 0adcc3e3e8.

Test: manual
Bug: 30118730
Change-Id: Ic75ce3a90baded19f3efc0cc77474fe5d9a8accd
2016-12-19 15:06:37 -08:00
Mark Salyzyn 1dfb4de436 logd: sum liblog tag messages
As an extension to the duplicate multiple message filtering, special
case liblog tagged event messages to be summed.  This solves the
inefficient and confusing duplicate message report from the DOS attack
detection such as:

liblog: 2
liblog: 2
liblog: 2
liblog: 2
liblog: 3

which would result in:

liblog: 2
chatty: ... expire 2 lines
liblog: 2
liblog: 3

And instead sums them and turns them all into:

liblog: 11

liblog messages should never be subject to chatty conversion.

Test: liblog-benchmarks manually check for coalesced liblog messages
      and make sure they do not turn into chatty messages.
      Instrumented code to capture sum intermediates to be sure.
Bug: 33535908
Change-Id: I3bf03c4bfa36071b578bcd6f62234b409a91184b
2016-12-19 14:03:38 -08:00
Mark Salyzyn 8f83a35511 logd: correct duplicate message state machine
Inspection turned up that for the case of three identical messages,
the result would be a stutter of the first message only.  Added
comments to describe the state machine, incoming variables, outcoming
and false condition outputs, for proper maintenance in the future.

Test: gTest liblog-benchmarks BM_log_maximum* and manually check
      for correct midstream chatty messages,
Bug: 33535908
Change-Id: I852260d18a484e6207b80063159f1a74eaa83b55
2016-12-19 14:01:45 -08:00
Mark Salyzyn c4b880d146 Merge "liblog: pmsg read permissions for AID_LOGD"
am: 152b003bbf

Change-Id: Ifcc860bb70ab30a387132ccfecaa29afde3f5bde
2016-12-19 16:02:25 +00:00
Mark Salyzyn 3296291cff logd: add android::sizesTotal() function
Test: gTest liblog-unit-tests, logd-unit-tests and logcat-unit-tests
Bug: 31456426
Change-Id: I6fb6cd589227fc43d22f9336e01f1bf7e3feb24c
2016-12-19 08:00:16 -08:00
Mark Salyzyn 152b003bbf Merge "liblog: pmsg read permissions for AID_LOGD" 2016-12-19 15:57:08 +00:00
Mark Salyzyn 5bd8f2d956 liblog: pmsg read permissions for AID_LOGD
Test: gTest liblog-unit-test and logd-unit-tests
Bug: 31456426
Change-Id: I7a2fe8245ecd651883f7851ce71b6c45e373af82
2016-12-19 15:57:01 +00:00
Colin Cross d233c2752b Remove obsolete mentions of LLVM_HOST_BUILD_MK
The libbacktrace common flags don't need the flags from
LLVM_HOST_BUILD_MK, they are added directly to libbacktrace_offline.
The -fno-omit-frame-pointer is unnecessary, as we no longer import
flags only used to build LLVM into everything that depends on LLVM.
Removing -Wno-extern-c-compat doesn't cause any warnings.

Test: mma -j
Change-Id: Ia01380e8572c3d84268843291a54ec8c932a327f
2016-12-17 13:34:05 -08:00
Elliott Hughes c7816ee377 Merge "Move init bootcharting onto its own thread."
am: 8766ecb78d

Change-Id: I43a00a8336f4774cf89c18f0cf78df23ca8c2bb1
2016-12-17 18:00:02 +00:00
Elliott Hughes 8766ecb78d Merge "Move init bootcharting onto its own thread." 2016-12-17 17:56:15 +00:00
Daniel Cashman c21c4e3837 Merge "Revert "Compile sepolicy on-device at early boot.""
am: 58929b0447

Change-Id: Iebc03e89240bfa77401ede8699196063b399e3db
2016-12-17 01:08:24 +00:00
Daniel Cashman 58929b0447 Merge "Revert "Compile sepolicy on-device at early boot."" 2016-12-17 00:59:43 +00:00
Daniel Cashman a26a98726e Revert "Compile sepolicy on-device at early boot."
This reverts commit 2fae5d65d5.

Change-Id: Id8bfc0f85d19e98df3759a2fcc6b3a331b4eec29
2016-12-17 00:53:45 +00:00
Nick Kralevich e733fac3ef Merge "fs_config.c: make *.prop files 0600"
am: ebc39117ee

Change-Id: I8d8700564cad1dfc6e0140313f3f656986b8da27
2016-12-17 00:50:06 +00:00
Treehugger Robot ebc39117ee Merge "fs_config.c: make *.prop files 0600" 2016-12-17 00:35:36 +00:00
dcashman 64a83f9a30 Merge "Compile sepolicy on-device at early boot."
am: 356b339b0d

Change-Id: I84dcbeb25e125cc941d32e3074bcab7891eb38df
2016-12-17 00:23:45 +00:00
Treehugger Robot 356b339b0d Merge "Compile sepolicy on-device at early boot." 2016-12-17 00:17:13 +00:00
Daniel Friederich bc4d167a2d Merge "adb: fix adb trace tag"
am: 94dd4b7410

Change-Id: I49e76ef75e91759ebe2c03fb6f5e4f1e97ac9596
2016-12-17 00:15:23 +00:00
Treehugger Robot 94dd4b7410 Merge "adb: fix adb trace tag" 2016-12-17 00:07:41 +00:00
Nick Kralevich 5f9fa90425 fs_config.c: make *.prop files 0600
Enforce that the only API for reading properties is through the property
server, not by reading the (system|vendor|rootfs) *.prop files.

Test: Device boots and no property errors.
Change-Id: Ibb6ed4e74a80cac00010c707d7574f8e92fc6448
2016-12-16 14:54:02 -08:00
Elliott Hughes c249794628 Move init bootcharting onto its own thread.
This reduces the overhead when bootcharting is on (obviously), but also
removes the "do we need to do anything for bootcharting?" check in cases
where we're not bootcharting.

Bug: http://b/23478578
Bug: http://b/33450491
Test: rebooted with bootcharting on/off
Change-Id: Id8746b5023b17d7615679eba0bcd02aee048ef1a
2016-12-16 14:45:17 -08:00
Mark Salyzyn ad3f07d25e Merge "logd: record multiple duplicate messages as chatty"
am: d0ee73932f

Change-Id: I4e3d6695d33f01b066bb9706e77daf7223f3ab11
2016-12-16 22:16:56 +00:00
Treehugger Robot d0ee73932f Merge "logd: record multiple duplicate messages as chatty" 2016-12-16 22:05:12 +00:00
dcashman 2fae5d65d5 Compile sepolicy on-device at early boot.
Compile policy from disparate sources at beginning of init and use to load
rather than relying on prebuilt policy.

Bug: 31363362
Test: Policy builds on-device and boots.
Change-Id: I681ec3f7da351d0b24d1f1e81e8a6b00c9c9d20c
2016-12-16 14:02:31 -08:00
Jorge Lucangeli Obes 9e9c49f2d8 Merge "capabilities: Check ambient caps, last valid runtime cap."
am: 044b18cb7f

Change-Id: Ib45e37d200b57b9837befdf203012b88724f41e5
2016-12-16 20:01:18 +00:00
Treehugger Robot 044b18cb7f Merge "capabilities: Check ambient caps, last valid runtime cap." 2016-12-16 19:50:34 +00:00
Mark Salyzyn ebb7a0dbc5 Merge "liblog: move log_is_loggable.c to properties.c"
am: 3ef8ad8548

Change-Id: I207fd9e243ad689f8ea3234d58c39385c452d71d
2016-12-16 19:08:23 +00:00
Mark Salyzyn 3ef8ad8548 Merge "liblog: move log_is_loggable.c to properties.c" 2016-12-16 19:01:21 +00:00
David Pursell 494737b05a Merge "fastboot: fix set_active for legacy A/B."
am: 719263e6d2

Change-Id: I1648745412c4aa8ec64d1ca0865b94f326e93643
2016-12-16 18:12:08 +00:00
Jorge Lucangeli Obes f3f824ee42 capabilities: Check ambient caps, last valid runtime cap.
Partners have expressed interest in using the 'capabilities' keyword
in init, so make the code more resilient:
-Check that ambient capabilities are supported by the kernel.
-Check that the last valid cap at runtime is not higher than what's in
kernel headers.
-Check that the user is not requesting a capability present in kernel
headers but not supported by the kernel at runtime.
-Don't attempt to drop bounding set capabilities not supported at
runtime.

This CL also fixes a small bug where < should have been used instead of
<=, and uses 'static' instead of anonymous namespaces.

Bug: 32438163
Test: Use a test service that uses capabilities.
Test: Apply in internal tree and test with angler and rild.

Change-Id: Ia271cc7eb389d1d526d61f897261e4bac4d19e5d
2016-12-16 13:04:52 -05:00
Treehugger Robot 719263e6d2 Merge "fastboot: fix set_active for legacy A/B." 2016-12-16 18:04:27 +00:00
Elliott Hughes a6532b4717 Merge "Improve init bootcharting."
am: 4ee7861ee1

Change-Id: I1ac594b6e0325f4006fa1ca60ee75af8849a5901
2016-12-16 17:38:39 +00:00
Elliott Hughes 4ee7861ee1 Merge "Improve init bootcharting." 2016-12-16 17:32:27 +00:00
Mark Salyzyn 774e04f779 liblog: move log_is_loggable.c to properties.c
Just makes sense cleanup

Test: gTest liblog-unit-tests
Bug: 33535908
Change-Id: I85de049f3cd73a473d56db5970d42eee5f9f70a8
2016-12-16 08:43:56 -08:00
forfun c5c0306424 modify a minor error in mount_with_alternatives
Test: when called with end_idx = null

Change-Id: I7e5d298f496847acb4aefbaad66cd98e907467bc
Signed-off-by: forfun <forfun414@gmail.com>
2016-12-16 07:02:57 +00:00
Hung-ying Tyan ecfce13ce2 fs_mgr: add verify_dev flag to fs_mgr_setup_verity()
Bug: 33682519
Test: Tested on bullhead with https://android-review.googlesource.com/#/c/315463.
Change-Id: Ie12230c6f77a2834c179e44b59817292d58726f7
2016-12-16 15:00:05 +08:00
Jeff Sharkey 04c9a4da7e Merge "Add fs_mgr option to enable/disable quotas."
am: 3b261ace57

Change-Id: I63957616da4017af4bd386c676876931f98926fe
2016-12-16 05:06:12 +00:00
Jeff Sharkey c8e717f414 Merge "fs_mgr: support to reserved some blocks for an ext2/3/4 partition."
am: 60739458e5

Change-Id: I919f6f4411e7d89d4b85ee66bea5eb71a4304889
2016-12-16 05:05:58 +00:00
Jeff Sharkey 3b261ace57 Merge "Add fs_mgr option to enable/disable quotas." 2016-12-16 04:56:39 +00:00
Jeff Sharkey 60739458e5 Merge "fs_mgr: support to reserved some blocks for an ext2/3/4 partition." 2016-12-16 04:56:30 +00:00
Mark Salyzyn 5f1b27fdbb Merge "liblog: event_tag_map use unordered_map"
am: 8b99ef6c21

Change-Id: I0644ce91d87088dd5583f10c6fdf4443820a90be
2016-12-16 02:10:15 +00:00