Commit graph

7628 commits

Author SHA1 Message Date
Greg Hackmann
7b6a8cbae9 am 679e2c25: am 9101878d: Merge "logd: fix LogStatistics::format freeing wrong pointer"
* commit '679e2c252274a7072c65471d6799a962261e1883':
  logd: fix LogStatistics::format freeing wrong pointer
2014-04-07 23:32:00 +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
8f2a205f34 am 1a09a804: am 47d374ec: Merge "Move date off the non-portable bionic32 \'strtotimeval\'."
* commit '1a09a804ba0c96182e8193cb5e96090893ad9a7c':
  Move date off the non-portable bionic32 'strtotimeval'.
2014-04-07 22:36:43 +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
1f87d3ab8c am 83fd6375: am 31631861: Merge "Add guards to prevent typedefs when C++11 is available."
* commit '83fd6375f6d9016afe9bb03453d39b8c41cda548':
  Add guards to prevent typedefs when C++11 is available.
2014-04-07 22:06:38 +00: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
Mark Salyzyn
7af3b47d24 am 21ad8b4b: am 6b91fefd: Merge "logd: Turn off default prune by worst UID"
* commit '21ad8b4b2c2eb4efa9b1ad0f86b6bed989c64438':
  logd: Turn off default prune by worst UID
2014-04-07 19:51:49 +00: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
ce2a0ecf29 am ffd72150: am 3e73a99f: Merge "logd: auditd: add logd.auditd.dmesg property"
* commit 'ffd721502e00e787ea0f89d6d537de52d4fc4542':
  logd: auditd: add logd.auditd.dmesg property
2014-04-07 18:04:17 +00:00
Mark Salyzyn
219ed7079a am 4336d13c: am 85010465: Merge "logd: selinux auditd initial commit"
* commit '4336d13cb12a8e779d4c56c45dc6d7a47c0b7898':
  logd: selinux auditd initial commit
2014-04-07 18:04:17 +00:00
Mark Salyzyn
c367923388 am 236d6a81: am 44853351: Merge "logd: Add pidToUid helper"
* commit '236d6a814396e2678f17487c761f30f7481e5f3b':
  logd: Add pidToUid helper
2014-04-07 18:04:16 +00:00
Mark Salyzyn
b1e678d98f am cfb2f579: am ebdf9778: Merge "logd: Add pidToName helper"
* commit 'cfb2f57916818701097e0d08b2b6193ba43d2274':
  logd: Add pidToName helper
2014-04-07 18:04:15 +00: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
c2dd26d1b3 am 113efaae: am d1d2c15d: Merge "logd: transitory reader thread create should be detached"
* commit '113efaaeec1b0197d43cce64a73cbc1a5b5cbc94':
  logd: transitory reader thread create should be detached
2014-04-04 20:54:34 +00: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
6a8c316438 am e35cba9a: am a97798af: Merge "Create an UnwindMapLocal object."
* commit 'e35cba9af02004d30033826638e00ba5fdcdd013':
  Create an UnwindMapLocal object.
2014-04-04 02:04:39 +00: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
Elliott Hughes
4fe1861593 am 56d57e88: am 5f130216: Merge "Handle errno properly to avoid corrupt str_parms"
* commit '56d57e88c6ccda0043e879b1a56a7445af8a886f':
  Handle errno properly to avoid corrupt str_parms
2014-04-04 00:08:15 +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
Narayan Kamath
f84b61b377 am b5e13749: am 223fc42b: Merge "Add CleanSpec for zygote changes."
* commit 'b5e137493998de960313c62d1824dfc581fb5327':
  Add CleanSpec for zygote changes.
2014-04-02 16:24:07 +00: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
Narayan Kamath
346ccaf6d7 Add CleanSpec for zygote changes.
default.prop is generated out of several makefile variables,
and it isn't possible to neatly express a dependency on those
variables (except perhaps by adding every possible makefile that
could define them to the deps list).

Change-Id: I93ea45c956aa22922f2389f735c058700621f674
2014-04-02 12:49:09 +01:00
Mark Salyzyn
990cdb149e am eb69b9a5: am 075828b8: Merge "logd: build breakage in user"
* commit 'eb69b9a5020b15e97b448245b63cfa7a6171cd2b':
  logd: build breakage in user
2014-04-02 00:21:46 +00:00
Mark Salyzyn
eb69b9a502 am 075828b8: Merge "logd: build breakage in user"
* commit '075828b83bd903465442dc5021004266d56e075c':
  logd: build breakage in user
2014-04-02 00:17:05 +00:00