summaryrefslogtreecommitdiffstats
path: root/logd
Commit message (Collapse)AuthorAgeFilesLines
* logd: kill(0,0) issueMark Salyzyn2014-10-081-1/+6
| | | | | | | | | | - Recognize pid=0 as special case (kernel or pre-init sourced) and refrain from treating it in the general case. (cherry pick from commit df5aa61f05ccbef441cf8b024d4bbc1b717451f9) Bug: 17526159 Change-Id: I74796043ac34753c6dd10018719ebc0bcd94e012
* logd: LogStatistics leakMark Salyzyn2014-10-081-0/+4
| | | | | | | | | - uid = -1 in subtract operation to match add (cherry pick from commit f48ea7c8dcfbf2220ececccb1f4fb2f42df9048c) Bug: 15986335 Change-Id: I7d0b85b5334c5264fd04309cb78e0c9aec0ad261
* logd: Add control statistics enable/disable.Mark Salyzyn2014-10-085-14/+42
| | | | | | | | | | | | - ro.build.type=user turn off statistics - ro.config.low_ram=true turn off statistics - logd.statistics override (cherry pick from commit f5fc50958978fc039bc3207cbfcb140a277442eb) Bug: 17526159 Bug: 17526187 Change-Id: I74796043ac34753c6dd10018719ebc0bcd94e00f
* logd: cleanupMark Salyzyn2014-10-084-56/+56
| | | | | | | | | | | | | | - simplify access and control exposure to class list - indent - compile warning - Follow standard naming convention for variables and methods - merge common fragments - Side Effects: none (cherry pick from commit e72c6e43668c8c6e1af77e2e5038557581cbf148) Bug: 17526159 Change-Id: I74796043ac34753c6dd10018719ebc0bcd94e010
* logd: auditd: report facility LOG_AUTHMark Salyzyn2014-10-081-4/+15
| | | | | | (cherry pick from commit 7ee2aef8e0fd8aaa601c8c17e5429fa65b22e00d) Change-Id: Ie325e1b58f52b6c728d5cfd6f6b87287fcf32e10
* logd: auditd: kmsg priorityMark Salyzyn2014-10-081-9/+12
| | | | | | (cherry pick from commit 6bdeee0ce6898abd3873a758c47601efcdcc1b7c) Change-Id: I2016fe140e2daf6c69efbd10aef205fffb931aa1
* logd: in nonblocking read, sched_yield() synchronizationMark Salyzyn2014-09-291-0/+5
| | | | | | | | | | - sched_yield and lock synchronization in reader thread startup to give writer thread a chance to catch up (cherry picked from commit f669acb01880216b6c1d29fc226f2c3ec3a6368a) Bug: 17512203 Change-Id: I43cf0b4e2829b22b3ab4e537fa95ce13c76a869c
* Fix for parenthesis errorArseniy Antonov2014-09-041-1/+1
| | | | | | | | | | Added parentheses as it was suggested by compiler. error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses] (Cherry picked from commit c3ce224c622e064207d1aff03f2440ca19617b4a) Signed-off-by: Arseniy Antonov <arseniy.antonov@intel.com> Change-Id: Ic3746d9804488411d10d460ddfda11f1fad8efef
* logd: simplification, return NULL instead of threadexit NULLMark Salyzyn2014-09-011-5/+1
| | | | | Bug: 16822776 Change-Id: I12133226f1b48d8fdc378dea0aadd78a4aae3da8
* logd: persistent reader threadsMark Salyzyn2014-08-082-18/+19
| | | | | Bug: 16822776 Change-Id: I5bea468a41089b51108880044f32e2b2df1278e7
* Fix implicit declaration of function 'prctl' in logd.Elliott Hughes2014-07-181-2/+1
| | | | | | (cherry picked from commit e5a0f2064bcecbea2b0b1afd72033508e96c5c64) Change-Id: Iee202daf3c637271a30ba0271abe68e939b5a887
* logd: test: disable kernel LOGGERMark Salyzyn2014-07-101-5/+3
| | | | | Bug: 15384806 Change-Id: I3072d6dd0618fa9ebe151c78a85eb121327f9df3
* Merge "logd: Allow apps to clear their UID-specific data"Mark Salyzyn2014-06-173-9/+43
|\
| * logd: Allow apps to clear their UID-specific dataMark Salyzyn2014-06-133-9/+43
| | | | | | | | | | Bug: 13501501 Change-Id: Ia72e25fc19430ce63fb359cd9b3f0523d41f5aa8
* | logd: test: deal with spam filter turned offMark Salyzyn2014-06-181-14/+39
| | | | | | | | Change-Id: I759c65e869d0c7cd81063fa7993ba3d67ef9cd06
* | logd: test: modernizeMark Salyzyn2014-06-182-10/+11
|/ | | | | | | | - Correct default tense for kernel or user logger - harden code that parses the benchmark data - give more meaning to the spam filter test Change-Id: I97699037ca9d56718f53f08d22be79092fb431de
* logd: logcat unexpected EOF on slow consolesMark Salyzyn2014-06-061-0/+1
| | | | Change-Id: I3520aa05e080de85df352ef36ae16e0406311f3c
* logd: logcat: debuggerd: audit logs to events and mainMark Salyzyn2014-05-271-26/+81
| | | | | | | | | | | - auditd spawn log copy to events and main - logcat delete events as one of the default logs - debuggerd do not collect events. - squish multiple spaces - switch from strcpy to memmove for overlapping buffers BUG: 14626551 Change-Id: I89b30273ce931ed2b25a53ea9be48e77f4c1bbf4
* logd: used before set warningMark Salyzyn2014-05-231-1/+1
| | | | Change-Id: I30c078f8b22ebe4dcb48d57adf88b3e51b4fa202
* Merge "logd: logcat: debuggerd: auditd logs to events"Mark Salyzyn2014-05-163-33/+54
|\
| * logd: logcat: debuggerd: auditd logs to eventsMark Salyzyn2014-05-153-33/+54
| | | | | | | | | | | | | | | | | | | | | | - auditd switch to recording logs to events log id - logcat add events as one of the default logs - debuggerd collect events log as well. ToDo: debuggerd & bugreport collect intermixed logs. BUG: 14626551 Change-Id: I958f0e729b7596748be57488a38824db5645be7b
* | init: logd: Allow Developer settings to adjust logd sizeMark Salyzyn2014-05-132-9/+62
|/ | | | | | | | | | | | - AID_SYSTEM can set persist.logd.size - AID_SYSTEM can issue command to /dev/socket/logd to change the runtime global log sizes. - Add support for ro.logd.size.* as populated by BoardConfig.mk - Limit size to maximum ~3% of physical memory. Bug: 14563261 Bug: 14627052 Change-Id: I606420db2e9d9d032296e71149e4a5b20cbd1137
* logd: logcat: Add persist.logd.size group of propertiesMark Salyzyn2014-05-062-2/+54
| | | | | | | | | - logd Add persist.logd.size (global), persist.logd.size.<logid> - logcat report a more flexible multiplier in -g command. Bug: 14563261 Bug: 14469172 Change-Id: Ie389caa14ad3ae3d4a3a3cc463425bb9dbc5e483
* logd: default off by-UID spam filterMark Salyzyn2014-05-061-2/+2
| | | | | Bug: 14469172 Change-Id: I37c8dbcea0490afb994cbe6f033591fea1c58bc8
* logd: build breakage in git_master-nova @ 1151709Mark Salyzyn2014-05-021-1/+1
| | | | Change-Id: Ic7920d1b0930155c20a896720a79af62f8acacc1
* logd: turn on -WerrorMark Salyzyn2014-05-023-5/+2
| | | | | | - Deal with some -Wunused / -Wunused-variable issues Change-Id: Ic86cd7b0680868ad0536198b71a34cb19134fc21
* logd: 64-bit compile issueMark Salyzyn2014-05-021-3/+3
| | | | | | | - ULONG_MAX is used against an uint32 - Add tv_sec_max and tv_nsec_max constants to log_time Change-Id: Ic86cd7b0680868ad0536198b71a34cb19134fc22
* logd: oneline statistics does not report PID goneMark Salyzyn2014-05-012-10/+28
| | | | | | | - oneline, add check for gone - Add pidGone() method, which caches the gone status Change-Id: I8f03daeafb58583c2b08ec6b540486c05da0872d
* logd: add logd.auditd propertyMark Salyzyn2014-04-294-23/+41
| | | | | | | | - permit us a mechanism to disable auditd - standardize property boolean Bug: 14275676 Change-Id: I76f245c6aee511ed44274159e0ea55915b484dda
* logd: add thread setnameMark Salyzyn2014-04-295-0/+25
| | | | | | | - permits easier determination of logd thread at fault in a stack trace from debuggerd. Bug: 14275676 Change-Id: Iac2c523147e2bcce34ab7ddcecd02582c5fa7cc0
* logd: enable UID spam filter and testMark Salyzyn2014-04-252-3/+52
| | | | Change-Id: Ie9c7a744e341e6e64afa14973d4d095717c97933
* logd: Statistics improvementsMark Salyzyn2014-04-253-38/+108
| | | | | | | | - Drop in-place sorting. - Add fast-track for uid sizes and elements. - Add sort() for per-uid and per-pid statistics. Change-Id: Ib8655d4cc0b3bd4e87534522987bcc7fc7a5251a
* Merge "logd: liblog: ALOG silently drops excessively long messages"Mark Salyzyn2014-04-241-1/+1
|\
| * logd: liblog: ALOG silently drops excessively long messagesMark Salyzyn2014-04-241-1/+1
| | | | | | | | | | Bug: 14280914 Change-Id: Idddd29784625094e54144953c29f64692a88eee9
* | logd: Add README.propertyMark Salyzyn2014-04-241-0/+11
|/ | | | Change-Id: I89da10a73470b037f1811a9890d959cae186f257
* liblog: Statistics truncated to 16384 bytesMark Salyzyn2014-04-211-1/+20
| | | | | | | | | | | - if network read/write broken up, reassemble the pieces. - Use a 20ms poll to check if a new fragment has been sent by the other side. - fixup logd-unit-tests to take a (simplified) fragment from the liblog changes. Bug: 14164765 Change-Id: I98ff87888c119e1e8349717646d0f733e8971bc8
* Merge "logd: liblog: logcat: debuggerd: Add LOG_ID_CRASH"Mark Salyzyn2014-04-172-2/+2
|\
| * logd: liblog: logcat: debuggerd: Add LOG_ID_CRASHMark Salyzyn2014-04-162-2/+2
| | | | | | | | Change-Id: Iea453764a1a4fc1661f461f10c641c30150e4d20
* | logd: libsysutils: logd startup outside init environmentMark Salyzyn2014-04-176-3/+72
|/ | | | Change-Id: I3426b6c3eebdd0c8258e966dcaaaa2825d7a23d1
* logd: Add logd_testMark Salyzyn2014-04-153-0/+666
| | | | | | | | | | | | | | * Test statistics output, all four main log id types are checked to be present, and output is properly formatted with header (ascii new-line terminated byte count) and trailer (newline formfeed) frames. * On dev build test dgram_qlen, circumvent if liblog benchmarks executed first though. * Test if kernel and user space loggers are present, and if any content has leaked to both. * test benchmark and use it to verify worst UID pruning Change-Id: I890c89f64825956f40108de806ed750b0170ac6c
* logd: Statistics: Add up to 10 chattiest clientsMark Salyzyn2014-04-101-7/+108
| | | | | | | | | - embellish pid name - >1% of the logs - fix PID gone detection (EPERM) - some ? : cleanup Change-Id: Iba3b306e1fee43e53931165819a398693910514b
* Merge "logd: liblog: logcat: enable prune features for user"Mark Salyzyn2014-04-096-72/+7
|\
| * logd: liblog: logcat: enable prune features for userMark Salyzyn2014-04-026-72/+7
| | | | | | | | | | | | - Enable whitelist, blacklist and logsize tuneables for user Change-Id: Id0c283844c71c5263a8cfbebf2e550f7ac415858
* | Merge "logd: fix LogStatistics::format freeing wrong pointer"Greg Hackmann2014-04-071-1/+1
|\ \
| * | logd: fix LogStatistics::format freeing wrong pointerGreg Hackmann2014-04-071-1/+1
| |/ | | | | | | | | | | | | | | 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>
* | logd: Turn off default prune by worst UIDMark Salyzyn2014-04-071-1/+1
| | | | | | | | | | | | - Algorithm places too much weight on stack dumps Change-Id: Ibb31a59892870397b780965ec791f47a4ce87eaf
* | logd: auditd: add logd.auditd.dmesg propertyMark Salyzyn2014-04-073-7/+30
| | | | | | | | Change-Id: If4a579c2221eec99cf3f6acf59ead8c2d5230517
* | logd: selinux auditd initial commitWilliam Roberts2014-04-077-2/+639
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | logd: Add pidToUid helperMark Salyzyn2014-04-073-0/+19
| | | | | | | | Change-Id: I23ebae1957c027bff6cbc2573a227bf0c44c08a2
* | logd: Add pidToName helperMark Salyzyn2014-04-073-6/+69
| | | | | | | | Change-Id: Idd8e804ab65feb8dc432150ae701464de1ad5302