Commit Graph

8472 Commits

Author SHA1 Message Date
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 499809ab6c am c2dd26d1: am 113efaae: am d1d2c15d: Merge "logd: transitory reader thread create should be detached"
* commit 'c2dd26d1b33d74c5b7774850dd7dbc2f6882cb87':
  logd: transitory reader thread create should be detached
2014-04-04 20:57:52 +00: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
Paul Lawrence 2e5ae0a4f9 Add force_encrypt flag to fstab to force encryption on appropriate devices
forceencrypt= will encrypt the drive at boot if it is not encrypted. This change
will not have an impact until we set this flag in appropirate fstabs.

Bug: 11985952

Change-Id: I6c65eda7f109e4936aa160da50f871703aefb351
2014-04-04 11:07:27 -07:00
Christopher Ferris 7962e4acc7 am 6a8c3164: am e35cba9a: am a97798af: Merge "Create an UnwindMapLocal object."
* commit '6a8c316438032c72ffdd2988cc1eb2717f477254':
  Create an UnwindMapLocal object.
2014-04-04 03:19:39 +00: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 0693c5848d am 4fe18615: am 56d57e88: am 5f130216: Merge "Handle errno properly to avoid corrupt str_parms"
* commit '4fe186159386a75ce17ca0b7ba6ace4294187cb2':
  Handle errno properly to avoid corrupt str_parms
2014-04-04 01:53:51 +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
Geremy Condra ed31529f2f Merge "fs_mgr: disable verified partitions on debuggable devices." 2014-04-03 18:51:43 +00: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
Geremy Condra cd642fc0b5 fs_mgr: disable verified partitions on debuggable devices.
This checks ro.debuggable to determine whether a device is in the
debuggable state or not, disabling verification if it is.

Eventually we'd like to narrow this down to only devices which
need to disable it, but we aren't there yet.

Change-Id: I06a329fe5449deab6bae595877dbb1f200850241
2014-04-02 18:07:22 -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 9b26aecdc4 am f84b61b3: am b5e13749: am 223fc42b: Merge "Add CleanSpec for zygote changes."
* commit 'f84b61b377c0acf2ad97fdb132b24762cb599bd8':
  Add CleanSpec for zygote changes.
2014-04-02 16:30:54 +00: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
Wonsik Kim 94404eef65 Merge "Clarify ownership for NativeHandle::mHandle" 2014-04-02 06:13:59 +00:00
Mark Salyzyn 136317b131 am 990cdb14: am eb69b9a5: am 075828b8: Merge "logd: build breakage in user"
* commit '990cdb149e39e5b4fbac40680ea60cf18beae1a2':
  logd: build breakage in user
2014-04-02 00:27:48 +00: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
Mark Salyzyn 075828b83b Merge "logd: build breakage in user" 2014-04-02 00:11:13 +00:00
Igor Murashkin f15b45a7db am cb6daaaf: am 9d379a1e: am dfdbb64f: Merge "Fix stack trace logging in RefBase."
* commit 'cb6daaafa45c81c3c304eac947d2e2fca15f3171':
  Fix stack trace logging in RefBase.
2014-04-02 00:03:31 +00:00
Mark Salyzyn d89c68e217 am 022fa5cc: am 7f92f390: am 5b0ad963: Merge "init: unused paramter warning messages"
* commit '022fa5cc85f80f828c203f344617365d867b9137':
  init: unused paramter warning messages
2014-04-02 00:03:25 +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 cb6daaafa4 am 9d379a1e: am dfdbb64f: Merge "Fix stack trace logging in RefBase."
* commit '9d379a1e02f25cbc06db55952d981b0dbba75b5c':
  Fix stack trace logging in RefBase.
2014-04-01 23:00:08 +00:00
Igor Murashkin 9d379a1e02 am dfdbb64f: Merge "Fix stack trace logging in RefBase."
* commit 'dfdbb64ff79df937e939f78ff70d5501f17e57d3':
  Fix stack trace logging in RefBase.
2014-04-01 22:55:48 +00:00
Igor Murashkin dfdbb64ff7 Merge "Fix stack trace logging in RefBase." 2014-04-01 22:52:03 +00:00
Mark Salyzyn 022fa5cc85 am 7f92f390: am 5b0ad963: Merge "init: unused paramter warning messages"
* commit '7f92f390039227cabac45c8ea1de6ff9d4ee7dde':
  init: unused paramter warning messages
2014-04-01 22:51:10 +00:00
Mark Salyzyn 7f92f39003 am 5b0ad963: Merge "init: unused paramter warning messages"
* commit '5b0ad96351dfda6ed09fefed1ab24e514be27012':
  init: unused paramter warning messages
2014-04-01 22:44:59 +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
Mark Salyzyn 0ecf6a842a am b3d94f0a: am c76e38ba: am e7f3cce7: Merge "logd: Add minimum time bucket statistics"
* commit 'b3d94f0ab88aa22d8eec60fe979670674251df13':
  logd: Add minimum time bucket statistics
2014-04-01 22:03:17 +00: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 b3d94f0ab8 am c76e38ba: am e7f3cce7: Merge "logd: Add minimum time bucket statistics"
* commit 'c76e38bafacb63f7b13606de940079499f2d5fdd':
  logd: Add minimum time bucket statistics
2014-04-01 21:59:49 +00:00
Mark Salyzyn c76e38bafa am e7f3cce7: Merge "logd: Add minimum time bucket statistics"
* commit 'e7f3cce7aa1e51f904f80df02d8d0fe5fe85e14e':
  logd: Add minimum time bucket statistics
2014-04-01 21:53:59 +00: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 dc9af896f0 resolved conflicts for merge of 6a949b45 to master
Change-Id: Ie123b4fff76ef43e2b1c0583731e88997504320e
2014-04-01 17:40:45 +01:00