Commit graph

7146 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
075828b83b Merge "logd: build breakage in user" 2014-04-02 00:11:13 +00:00
Mark Salyzyn
ca4c63d799 logd: build breakage in user
build breakage in branch: git_klp-dev-gpl @ 1101951

Change-Id: I4c9681bf4c97368ec19f5a79fef134aba937f337
2014-04-01 16:57:29 -07:00
Igor Murashkin
dfdbb64ff7 Merge "Fix stack trace logging in RefBase." 2014-04-01 22:52:03 +00:00
Mark Salyzyn
5b0ad96351 Merge "init: unused paramter warning messages" 2014-04-01 22:38:58 +00:00
Mark Salyzyn
322445ce6d init: unused paramter warning messages
Change-Id: I1667371106be4b230ac3850e9819e4549eea2973
2014-04-01 15:35:14 -07:00
Ian McKellar
55e0f1c8bd Fix stack trace logging in RefBase.
This was broken about 5 months ago in change I78435ed49aa196a0efb45bf9b2d58b62c41737d3.
See: https://goto.google.com/jhtss

Change-Id: Icc32993552efed3015bc1b79a7bd872d7510e020
2014-04-01 15:02:57 -07:00
Mark Salyzyn
e7f3cce7aa Merge "logd: Add minimum time bucket statistics" 2014-04-01 21:49:35 +00:00
Mark Salyzyn
e457b74ce6 logd: Add minimum time bucket statistics
* Only enabled for dev builds because halves performance.
- Used to establish if /proc/sys/net/unix/max_dgram_qlen
  is appropriate for the platform
  (see logd/LogStatistics.cpp comments)
- enabled if logd.dgram_qlen.statistics is not zero/empty

Change-Id: Ib8ecfeb75b6f0f954c099a6b1032b8afb5efcbd4
2014-04-01 14:38:52 -07:00
Narayan Kamath
5da2dbbc93 Merge "Move zygote init config to its own file." 2014-04-01 16:22:02 +00:00
Greg Hackmann
a740b3bb40 Merge "rootdir: reduce permissions on /dev/rtc0" 2014-03-31 20:13:52 +00:00
Narayan Kamath
4456a55ce6 Move zygote init config to its own file.
This allows us to choose different configs depending on
whether or not the target is 64 capable, and what its preferred
default is.

bug: 13647418
Change-Id: Ie1ce4245a3add7544c87d27c635ee390f4062523
2014-03-31 12:31:11 +01:00
Greg Hackmann
b34fed34af rootdir: reduce permissions on /dev/rtc0
Remove world-readable, reduce group permissions to readable by system
daemons

Change-Id: I6c7d7d78b8d8281960659bb8490a01cf7fde28b4
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-03-27 15:52:01 -07:00
Colin Cross
47770b7396 Merge "debuggerd: use LOCAL_MULTILIB" 2014-03-27 18:09:04 +00:00
Mark Salyzyn
e644664f1c Merge "liblog: deal with restart of logd" 2014-03-26 23:24:22 +00:00
Colin Cross
87a6b1d799 debuggerd: use LOCAL_MULTILIB
Use LOCAL_MULTILIB to build multiple versions of executables
instead of manually creating two build rules.

Change-Id: I1a993ff7b5f527a88735f46eec9822bb97d16490
2014-03-26 15:16:23 -07:00
Colin Cross
6940bc08e2 Merge "adb: Add USB vendor ID for Intermec Technologies Corp." 2014-03-26 18:16:48 +00:00
Mark Salyzyn
7ce5c714f1 Merge "logcat: test arbitrary time to tail" 2014-03-26 17:58:50 +00:00
Mark Salyzyn
62f624b697 Merge "liblog: test for LOGGER_ENTRY_MAX_PAYLOAD compliance" 2014-03-26 17:58:42 +00:00
Mark Salyzyn
ef7c411ac3 logcat: test arbitrary time to tail
- Add tail_time
- Use EXPECT instead of ASSERT to provide more coverage
- Use EXPECT_TRUE/ASSERT_TRUE when comparing NULL
- Itemize order complaints in sorted_order test

Change-Id: I55a7543fa3300c0a9524fac70111e680c2877eea
2014-03-26 10:52:21 -07:00
Mark Salyzyn
8196be3032 liblog: test for LOGGER_ENTRY_MAX_PAYLOAD compliance
- Add max_payload test
- Add dual_reader test
- Switch to EXPECT from ASSERT to increase test coverage

Bug: 13514601
Change-Id: I0e1c273e0ec430c0461e424731dbf166f2a3ce1b
2014-03-26 10:49:46 -07:00
Mark Salyzyn
8245af1ffd liblog: deal with restart of logd
- API change, return -errno on failure for log writing
- ENOTCONN results in a reconnection and a retry of the write

Change-Id: Ib0a90b730edeaa7e3a3c9797e4e1b0c81b6adb0a
2014-03-26 09:20:22 -07:00
DanielMo
2b6612ff96 adb: Add USB vendor ID for Intermec Technologies Corp.
Change-Id: I6429bca087523829a13f905ae9dfa5f43b7abf8b
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
2014-03-26 15:33:23 +08:00
Mark Salyzyn
c66607a8aa Merge "logd: compile warning message" 2014-03-24 21:56:34 +00:00
Colin Cross
c388b9f241 Merge "DO NOT MERGE: Revert "delete libnl_2"" 2014-03-24 21:06:49 +00:00
Mark Salyzyn
bd0962c2d3 Merge "logcat: timed tests fail under load" 2014-03-24 20:22:09 +00:00
Mark Salyzyn
5fef7b6e31 logcat: timed tests fail under load
Change-Id: Ic1cdf0509617720eef7a3ad0b17a3b6f88c9d87e
2014-03-24 13:19:17 -07:00
Mark Salyzyn
e148b7ebd0 Merge "logcat: white and blacklist failure" 2014-03-24 19:38:07 +00:00
Colin Cross
a63a9ec808 DO NOT MERGE: Revert "delete libnl_2"
This reverts commit 7097f052d9.

libnl_2 needs to stay in AOSP for now for compatibility with
GPL test builds.
2014-03-21 17:05:29 -07:00