Commit graph

7188 commits

Author SHA1 Message Date
Mark Salyzyn
eef9f1da0b am ba419940: Merge "logcat: Better help message for white and black list"
* commit 'ba419940f75d93ac4aacef695da0570b1591f140':
  logcat: Better help message for white and black list
2014-04-11 21:37:40 +00:00
Mark Salyzyn
ba419940f7 Merge "logcat: Better help message for white and black list" 2014-04-11 21:34:09 +00:00
Mark Salyzyn
bbbe14f758 logcat: Better help message for white and black list
Change-Id: Ia739260b4e0fcf8062ad9166fd65b1d6e7bb446c
2014-04-11 13:49:43 -07:00
Narayan Kamath
a73f7e924a am 822b1a02: Merge "Add a config for dual mode zygote."
* commit '822b1a024d058641be9aefa14da794f09755ce35':
  Add a config for dual mode zygote.
2014-04-11 08:42:02 +00:00
Narayan Kamath
822b1a024d Merge "Add a config for dual mode zygote." 2014-04-11 08:22:38 +00:00
Mark Salyzyn
97ea695af7 am 032f5f23: Merge "logd: Statistics: Add up to 10 chattiest clients"
* commit '032f5f23005d8c5d4558618c5c46d3a92752b408':
  logd: Statistics: Add up to 10 chattiest clients
2014-04-10 17:34:15 +00:00
Mark Salyzyn
032f5f2300 Merge "logd: Statistics: Add up to 10 chattiest clients" 2014-04-10 17:30:44 +00:00
Mark Salyzyn
8e72c5384b logd: Statistics: Add up to 10 chattiest clients
- embellish pid name
- >1% of the logs
- fix PID gone detection (EPERM)
- some ? : cleanup

Change-Id: Iba3b306e1fee43e53931165819a398693910514b
2014-04-10 08:59:53 -07:00
Narayan Kamath
468b37c106 Add a config for dual mode zygote.
Note that init.zygote64.rc, which supports a "pure"
64 bit zygote is around only for testing.

The life cycles of both zygotes are controlled by init,
and the assumption here is that they will be available
always. We start the system_server in 32 bit mode.

Note that the distinction between "primary" and "secondary"
simply defines the order in which ABI support is queried,
there's no real requirement that the primary zygote supports
the primary ABI of the device.

bug: 13647418

Change-Id: Id0be001ea6f934c3c2022d89a63aae9fae66cc38
2014-04-10 10:45:37 +01:00
Mark Salyzyn
ae3ba0b339 am 472e04f2: Merge "logd: liblog: logcat: enable prune features for user"
* commit '472e04f2b4b1870f8be789a3f16c2abb664b731a':
  logd: liblog: logcat: enable prune features for user
2014-04-09 23:35:45 +00:00
Mark Salyzyn
472e04f2b4 Merge "logd: liblog: logcat: enable prune features for user" 2014-04-09 23:33:28 +00:00
dcashman
39a5b81290 am 2baf2886: Merge "Enable world-readable selinuxfs policy binary."
* commit '2baf2886826db1a137fa765a991f30a3937e7c4d':
  Enable world-readable selinuxfs policy binary.
2014-04-09 16:33:51 +00:00
dcashman
2baf288682 Merge "Enable world-readable selinuxfs policy binary." 2014-04-09 16:30:23 +00:00
Greg Hackmann
679e2c2522 am 9101878d: Merge "logd: fix LogStatistics::format freeing wrong pointer"
* commit '9101878dd06a74cedeadca3fec3b3db68cba8bf0':
  logd: fix LogStatistics::format freeing wrong pointer
2014-04-07 23:25:55 +00:00
Greg Hackmann
9101878dd0 Merge "logd: fix LogStatistics::format freeing wrong pointer" 2014-04-07 23:18:58 +00:00
Elliott Hughes
1a09a804ba am 47d374ec: Merge "Move date off the non-portable bionic32 \'strtotimeval\'."
* commit '47d374ec27af7bc431a86a592822fbb15ff6ba3c':
  Move date off the non-portable bionic32 'strtotimeval'.
2014-04-07 22:31:18 +00:00
Elliott Hughes
47d374ec27 Merge "Move date off the non-portable bionic32 'strtotimeval'." 2014-04-07 22:25:18 +00:00
Elliott Hughes
e25a6413d3 Move date off the non-portable bionic32 'strtotimeval'.
Change-Id: Ib706d3a536c409810cfbc47270448c6375314506
2014-04-07 15:24:47 -07:00
Greg Hackmann
239605ef64 logd: fix LogStatistics::format freeing wrong pointer
Fixes a leak and use-after-free if a client passes in an
already-allocated target buffer (currently none do)

Change-Id: Ie20c30bd5ba31e1b6db73885bd9d2ebd7e40dc27
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-04-07 15:17:30 -07:00
Tim Murray
83fd6375f6 am 31631861: Merge "Add guards to prevent typedefs when C++11 is available."
* commit '31631861647aadc28d6311a211419be79c34c7b0':
  Add guards to prevent typedefs when C++11 is available.
2014-04-07 22:00:12 +00:00
Tim Murray
3163186164 Merge "Add guards to prevent typedefs when C++11 is available." 2014-04-07 21:54:26 +00:00
Tim Murray
ae83f84548 Add guards to prevent typedefs when C++11 is available.
char32_t and char16_t are both defined in C++11.

Change-Id: I44fe8f4f05f230c18a1b77fa21b6a40c8f8ecc2d
2014-04-07 14:11:21 -07:00
dcashman
5822a4af84 Enable world-readable selinuxfs policy binary.
Change-Id: I1eefb457cea1164a8aa9eeb7683b3d99ee56ca99
2014-04-07 14:05:43 -07:00
Mark Salyzyn
21ad8b4b2c am 6b91fefd: Merge "logd: Turn off default prune by worst UID"
* commit '6b91fefdb22b33d7cdebe10fab4db834f5f8784d':
  logd: Turn off default prune by worst UID
2014-04-07 19:48:26 +00:00
Mark Salyzyn
6b91fefdb2 Merge "logd: Turn off default prune by worst UID" 2014-04-07 19:43:38 +00:00
Mark Salyzyn
0bb5288c0e logd: Turn off default prune by worst UID
- Algorithm places too much weight on stack dumps

Change-Id: Ibb31a59892870397b780965ec791f47a4ce87eaf
2014-04-07 12:17:19 -07:00
Mark Salyzyn
ffd721502e am 3e73a99f: Merge "logd: auditd: add logd.auditd.dmesg property"
* commit '3e73a99ff28a0fc0765ad3fc899cfb15f5c230f8':
  logd: auditd: add logd.auditd.dmesg property
2014-04-07 17:58:36 +00:00
Mark Salyzyn
4336d13cb1 am 85010465: Merge "logd: selinux auditd initial commit"
* commit '8501046553ac99a278f10377c2ccf9ee6d82eeb1':
  logd: selinux auditd initial commit
2014-04-07 17:58:36 +00:00
Mark Salyzyn
236d6a8143 am 44853351: Merge "logd: Add pidToUid helper"
* commit '448533515002d8836f00d5b7127a814df370c125':
  logd: Add pidToUid helper
2014-04-07 17:58:35 +00:00
Mark Salyzyn
cfb2f57916 am ebdf9778: Merge "logd: Add pidToName helper"
* commit 'ebdf9778a08c8ff23d4e4aab3041c7642c74aa89':
  logd: Add pidToName helper
2014-04-07 17:58:35 +00:00
Mark Salyzyn
3e73a99ff2 Merge "logd: auditd: add logd.auditd.dmesg property" 2014-04-07 17:54:28 +00:00
Mark Salyzyn
8501046553 Merge "logd: selinux auditd initial commit" 2014-04-07 17:54:00 +00:00
Mark Salyzyn
4485335150 Merge "logd: Add pidToUid helper" 2014-04-07 17:53:48 +00:00
Mark Salyzyn
ebdf9778a0 Merge "logd: Add pidToName helper" 2014-04-07 17:53:38 +00:00
Mark Salyzyn
e9bebd0eb1 logd: auditd: add logd.auditd.dmesg property
Change-Id: If4a579c2221eec99cf3f6acf59ead8c2d5230517
2014-04-07 10:51:00 -07:00
William Roberts
29d238d2a8 logd: selinux auditd initial commit
Initial commit for an audit daemon that writes kernel audit
messages to the Android logger. The daemon searches dmesg
for all lines that contain "audit" and writes them. Then
receiving the messages from the netlink socket.

It also formats the messages so they are compatable with
ausearch (type=<t> <m> format)

Modified: Mark Salyzyn <salyzyn@google.com>

- do not start auditd
- merge into logd, stripping unnecessary file logging.
- Convert headers and code to support C++
- Fix bugs in libaudit
- squash timestamp (replace with 0.0) due to duplication
- squash pid due to duplication
- squash comm due to duplication

Change-Id: I421bcf33e7e670d596628b1b5c7c25536ce2d3fe
2014-04-07 10:51:00 -07:00
Mark Salyzyn
4ba0387af5 logd: Add pidToUid helper
Change-Id: I23ebae1957c027bff6cbc2573a227bf0c44c08a2
2014-04-07 10:51:00 -07:00
Mark Salyzyn
9a03863e88 logd: Add pidToName helper
Change-Id: Idd8e804ab65feb8dc432150ae701464de1ad5302
2014-04-07 10:50:55 -07:00
Mark Salyzyn
113efaaeec am d1d2c15d: Merge "logd: transitory reader thread create should be detached"
* commit 'd1d2c15de8ea09989e8072d197c22020860f1461':
  logd: transitory reader thread create should be detached
2014-04-04 20:48:55 +00:00
Mark Salyzyn
d1d2c15de8 Merge "logd: transitory reader thread create should be detached" 2014-04-04 20:44:02 +00:00
Mark Salyzyn
765f782891 logd: transitory reader thread create should be detached
Bug: 13692914
Change-Id: Ia7306e6e844ae9f17c6f594bf6b25f3148652570
2014-04-04 13:12:56 -07:00
Christopher Ferris
e35cba9af0 am a97798af: Merge "Create an UnwindMapLocal object."
* commit 'a97798afc9105668a80b775516a7cc4db341a62e':
  Create an UnwindMapLocal object.
2014-04-04 02:01:13 +00:00
Christopher Ferris
a97798afc9 Merge "Create an UnwindMapLocal object." 2014-04-04 01:55:13 +00:00
Christopher Ferris
e296091060 Create an UnwindMapLocal object.
The way libunwind handles local unwinds is different from remote unwinds,
so create a new map object to handle the differences.

Add new test to verify the map data is being generated correctly.

Add new tests to check for leaks.

Refactor the BACK_LOGW code into a single header file.

Change-Id: I01f3cbfc4b927646174ea1b614fa25d23b9b3427
2014-04-03 14:19:24 -07:00
Elliott Hughes
56d57e88c6 am 5f130216: Merge "Handle errno properly to avoid corrupt str_parms"
* commit '5f130216762278331b5d97eaf1fb549680143c85':
  Handle errno properly to avoid corrupt str_parms
2014-04-03 18:25:57 +00:00
Elliott Hughes
5f13021676 Merge "Handle errno properly to avoid corrupt str_parms" 2014-04-03 18:21:55 +00:00
Jens Gulin
d3c8d5b8d4 Handle errno properly to avoid corrupt str_parms
A normal sequence of calls is as follows:
str_parms_create_str, str_parms_add_str, str_parms_destroy.
In some cases the destroy caused double free.

str_parms_add_str will clone the input and send it to hashmapPut
for storage. If hashmapPut did not store the strings it will raise
errno = ENOMEM and leave caller with ownership of the strings.
In any of these cases it will be safe to destroy the str_parms.

But what if it wasn't hashmapPut that said NOMEM? What if there
was a stale NOMEM already before a successful hashmapPut?
In that case the strings will be successfully added to the list
(if new), but when str_parms_add_str sees the NOMEM it will free
them anyway, leaving dangling pointers in the str_parms!!

It is the responsibility of the caller to clear errno before any
interesting call. This patch makes sure that str_parms_add_str
reacts only on errno emmitted from hashmapPut.

Change-Id: If87e4bcc482f09e1c66133d33517b152ebdac65f
2014-04-03 11:19:54 -07:00
Mark Salyzyn
1c95047939 logd: liblog: logcat: enable prune features for user
- Enable whitelist, blacklist and logsize tuneables for user

Change-Id: Id0c283844c71c5263a8cfbebf2e550f7ac415858
2014-04-02 13:12:04 -07:00
Narayan Kamath
b5e1374939 am 223fc42b: Merge "Add CleanSpec for zygote changes."
* commit '223fc42b5e289e882f67c893374ffbef595a6901':
  Add CleanSpec for zygote changes.
2014-04-02 16:20:54 +00:00
Narayan Kamath
223fc42b5e Merge "Add CleanSpec for zygote changes." 2014-04-02 16:17:03 +00:00