Commit Graph

9723 Commits

Author SHA1 Message Date
Ruchi Kandoi c603720aed ueventd: UEVENT_MSG_LEN changed to 2048 from 1048 in compliance with the
BUFFER_LEN in the kobject_uevent in kernel.

Change-Id: Ib98626f20a7c26e7718bbe4d5ec4513a1ae5d9b7
2014-06-23 11:22:09 -07:00
Lorenzo Colitti 25af09e16d Merge "Support parsing netlink route messages." 2014-06-19 22:58:18 +00:00
Lorenzo Colitti d7ff7ea652 Support parsing netlink route messages.
Bug: 9180552
Change-Id: I4a36d869ac692647fb226d0912285bdf2ffcb1fa
2014-06-21 10:55:07 +09:00
Lorenzo Colitti 9b34293566 Improvements to netlink event parsing.
1. Accept that parseNetlinkMessage can only parse one netlink
   message, because its way of returning output is to modify its
   member variables (mAction, mParams, etc.). Currently, it
   loops through all the messages it finds, updating its member
   variables as it goes along, and always returns true at the end
   of the buffer. This has the following problems:

   1. Since the function always returns true even when no
      messages were parsed, the caller has no way to know if
      parsing succeeded, and we get lots of "No subsystem found
      in netlink event" logs if the buffer did not contain any
      valid messages we were interested in.
   2. If there are multiple messages in the buffer, all but the
      last message will be silently ignored.
   3. If there are multiple messages and previous messages have
      more parameters than the last one, the resulting event will
      have a mixture of parameters from multiple messages.

   Instead of doing all this, change the contract to "parse the
   first valid message of interest in the buffer and return true,
   or return false if there were no such messages", and update
   the code and the comments accordingly.

2. Modify the caller (NetlinkListener) so it doesn't log an
   error when parseBinaryNetlinkMessage returns false, because
   this can now simply mean that we weren't interested in that
   particular message. parseBinaryNetlinkMessage already logs
   more informative errors.

3. Provide utility functions to check received message lengths and
   to convert message types to message names.

4. Simplify logging duplicate attributes.

5. Use the appropriate IFLA_xxx macros instead of rolling our own
   code to parse link state messages.

6. Move all the parsing code out to per-message-type parsing
   functions to order to simplify parseBinaryNetlinkMessage.

Bug: 9180552
Change-Id: I6bbc2f7a104f618674dde2369c1fd5e93ea49430
2014-06-21 10:54:43 +09:00
Lorenzo Colitti 4937431a4b Merge "Improvements to netlink event parsing." 2014-06-19 22:58:18 +00:00
Riley Andrews 409cd572ec am ab2a7dce: am 5ff6da8c: am dbb93515: Merge "libcutils: Fix warnings in properties.c when verbose logging is enabled"
* commit 'ab2a7dcef3ecfe45f9906d318b1c10a82b8c61a8':
  libcutils: Fix warnings in properties.c when verbose logging is enabled
2014-06-21 00:34:45 +00:00
Riley Andrews 51329ff20a am 72f66d98: (-s ours) am 1fe97b3d: am 5bd578e1: Merge "cutils: Add property_get_bool, _get_int32, _get_int64"
* commit '72f66d982af8a76cc61b9bfffba07bafa88dca26':
  cutils: Add property_get_bool, _get_int32, _get_int64
2014-06-21 00:34:40 +00:00
Colin Cross c7ee12d7ed am 105ecf71: am 72d9c0b1: am 56b1d74e: Merge "init/ueventd: adds wildcard matching for ueventd rules"
* commit '105ecf71c2a7f683d34995dc290a4bf50413cf15':
  init/ueventd: adds wildcard matching for ueventd rules
2014-06-21 00:28:53 +00:00
Ruchi Kandoi 91cdb4cb94 resolved conflicts for merge of de7bdc94 to master
Change-Id: Ib329587d47b21e680dbbf45d797543720ce8d688
2014-06-20 17:20:13 -07:00
Rom Lemarchand 07ce7cab72 adb: use oom_score_adj instead of oom_adj
Change-Id: I76c6ce83d7d400c8b84bfece5d30189640cb2505
2014-06-20 23:40:18 +00:00
Narayan Kamath 4c3d9be594 am 8975f302: Add a zygote 64/32 bit config.
* commit '8975f302ee2eaff93ab5a7723d7afdedc660230c':
  Add a zygote 64/32 bit config.
2014-06-20 23:27:22 +00:00
Riley Andrews ab2a7dcef3 am 5ff6da8c: am dbb93515: Merge "libcutils: Fix warnings in properties.c when verbose logging is enabled"
* commit '5ff6da8c6f1a9e3f2e1dbee080fb0fbc4b547ec4':
  libcutils: Fix warnings in properties.c when verbose logging is enabled
2014-06-20 23:25:30 +00:00
Riley Andrews 5ff6da8c6f am dbb93515: Merge "libcutils: Fix warnings in properties.c when verbose logging is enabled"
* commit 'dbb93515c9a1a60a6e824e789920f43d625a8c2a':
  libcutils: Fix warnings in properties.c when verbose logging is enabled
2014-06-20 23:23:21 +00:00
Riley Andrews 72f66d982a am 1fe97b3d: am 5bd578e1: Merge "cutils: Add property_get_bool, _get_int32, _get_int64"
* commit '1fe97b3d0f6dbc6376a0ebe1f66725e9f73b4442':
  cutils: Add property_get_bool, _get_int32, _get_int64
2014-06-20 22:40:40 +00:00
Colin Cross 105ecf71c2 am 72d9c0b1: am 56b1d74e: Merge "init/ueventd: adds wildcard matching for ueventd rules"
* commit '72d9c0b18ed6162b769ee07a7cd61b01cb3a2e74':
  init/ueventd: adds wildcard matching for ueventd rules
2014-06-20 22:40:37 +00:00
Riley Andrews 1fe97b3d0f am 5bd578e1: Merge "cutils: Add property_get_bool, _get_int32, _get_int64"
* commit '5bd578e10dc417e9c8d98705366456cc613b6152':
  cutils: Add property_get_bool, _get_int32, _get_int64
2014-06-20 22:05:55 +00:00
Colin Cross 72d9c0b18e am 56b1d74e: Merge "init/ueventd: adds wildcard matching for ueventd rules"
* commit '56b1d74e27772b7e1fa759a252ffecd9a7b03dc9':
  init/ueventd: adds wildcard matching for ueventd rules
2014-06-20 21:24:40 +00:00
Riley Andrews 5bd578e10d Merge "cutils: Add property_get_bool, _get_int32, _get_int64" 2014-06-20 20:43:43 +00:00
Colin Cross 56b1d74e27 Merge "init/ueventd: adds wildcard matching for ueventd rules" 2014-06-20 20:43:43 +00:00
Igor Murashkin d8f2a8d34a cutils: Add property_get_bool, _get_int32, _get_int64
* Read out system properties with same syntax as SystemProperties.java
* Also adds unit test suite to validate correctness of properties
* Also fixes buffer overrun in property_get

(cherry picked from commit d4507e9246)

Change-Id: Ifd42911f93e17da09e6ff1298e8875e02f3b6608
2014-06-20 20:01:49 +00:00
Ruchi Kandoi 4614f5097c resolved conflicts for merge of de7bdc94 to master
Change-Id: I6dc10c8220c0984b31a05534b576ca25afdf5383
2014-06-20 11:46:40 -07:00
Elliott Hughes 545b127a78 am d3ef8f41: am 2520f1eb: am 37d7fdbb: Merge "Maps output now marks the fault address location."
* commit 'd3ef8f416b9cd9609a0002e186fb2ab45a0a312d':
  Maps output now marks the fault address location.
2014-06-20 18:19:44 +00:00
Ruchi Kandoi de7bdc9424 am 1a57b1d6: am c40b9f00: Merge "healthd: UEVENT_MSG_LEN is changed from 1048 to 2048 in compliance with BUFFER_LEN in the kobject_uevent in kernel."
* commit '1a57b1d6cb65ac496f1877d41ed6a69b79056e2a':
  healthd: UEVENT_MSG_LEN is changed from 1048 to 2048 in compliance with BUFFER_LEN in the kobject_uevent in kernel.
2014-06-20 17:10:57 +00:00
Ruchi Kandoi 1a57b1d6cb am c40b9f00: Merge "healthd: UEVENT_MSG_LEN is changed from 1048 to 2048 in compliance with BUFFER_LEN in the kobject_uevent in kernel."
* commit 'c40b9f0021c159cc12119c6f92d8fe664ac677f8':
  healthd: UEVENT_MSG_LEN is changed from 1048 to 2048 in compliance with BUFFER_LEN in the kobject_uevent in kernel.
2014-06-20 17:08:34 +00:00
Elliott Hughes d3ef8f416b am 2520f1eb: am 37d7fdbb: Merge "Maps output now marks the fault address location."
* commit '2520f1eb9323ba2129c001cf5658c9e7912ae2a1':
  Maps output now marks the fault address location.
2014-06-20 16:45:04 +00:00
Elliott Hughes 2520f1eb93 am 37d7fdbb: Merge "Maps output now marks the fault address location."
* commit '37d7fdbb7491aa91b56035285cb56c0630dd5909':
  Maps output now marks the fault address location.
2014-06-20 16:42:06 +00:00
Daniel Leung c0c1ffea58 init/ueventd: adds wildcard matching for ueventd rules
The sysfs nodes can change from devices to devices for
a particular class of peripheral. Some of them even change
after suspend/resume, e.g. rfkill for USB bluetooth adapters.

This patch adds to the way how ueventd rules with wildcard are
handled. In addition to matching the prefix with a trailing
wildcard, now rules can have wildcard anywhere in the rule.
The wildcard matching is implemented using fnmatch(), where
its matching is simliar to shell pathname expansion. It suits
this particular usage model well. To avoid abuse, the number of
slashes has to match between path name and the rule.

For example, instead of creating a rule to match:

  /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/bluetooth/hci0/rfkill*

, this would suffice:

  /sys/devices/pci0000:00/0000:00:1d.0/*/*/*/*/bluetooth/hci0/rfkill*

The prefix matching behavior is retained, such that those
rules do not have to pay for processing penalty with fnmatch().

Change-Id: I3ae6a39c838f6d12801cb71958e481b016f731f5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2014-06-20 09:28:37 -07:00
Narayan Kamath 8975f302ee Add a zygote 64/32 bit config.
64 bit zygote is the "primary" and the system server is run
as a 64 bit process.

(cherry picked from commit 7cdbbcabda)

Change-Id: I56363e08b546dead14c2ee46b0069235cc4597e8
2014-06-20 14:05:23 +01:00
JP Abgrall 2181407511 Merge "[HACK]fs_mgr: force recovery+wipe if data looks wiped" 2014-06-20 02:15:46 +00:00
JP Abgrall 4bb7bba118 [HACK]fs_mgr: force recovery+wipe if data looks wiped
We do the recovery+wipe if
 - the mount fails and
 - the partition is forceencrypt
 - the partition seems wiped (== the 1st 4KB are all 0x00 or 0xFF).

This is a hack until we get the flashstation up and running with f2fs.
Bug: 15731906

The alternative would be for the user to manually enter
recovery and wipe his device.

Bug: 15747366
Change-Id: Ic8f3ef59f3d7d01d5d93d8e4c01502080f422157
Signed-off-by: JP Abgrall <jpa@google.com>
2014-06-19 22:12:20 -07:00
Riley Andrews dbb93515c9 Merge "libcutils: Fix warnings in properties.c when verbose logging is enabled" 2014-06-20 02:09:57 +00:00
Igor Murashkin 1f7f70a629 libcutils: Fix warnings in properties.c when verbose logging is enabled
Change-Id: I07c5eb59b9395734ad3fc25eba753564c0f096a0
2014-06-20 15:57:09 -07:00
Ruchi Kandoi c40b9f0021 Merge "healthd: UEVENT_MSG_LEN is changed from 1048 to 2048 in compliance with BUFFER_LEN in the kobject_uevent in kernel." 2014-06-20 02:04:52 +00:00
Elliott Hughes 37d7fdbb74 Merge "Maps output now marks the fault address location." 2014-06-20 02:04:52 +00:00
Brigid Smith 2e8290463e Maps output now marks the fault address location.
If the fault address is not within a mapped region, it logs an error
message after the output.  Otherwise, it prefixes the location of the
fault address with "--->" to make it easier to locate.

Change-Id: I330adaade4402ffeb09f1a6d34a944c2f054d06d
2014-06-20 09:30:16 -07:00
Riley Andrews 53f24c2f94 am aab0d57d: am 94fa2005: am 4f5392cb: Merge "Make indentation sane in init.rc"
* commit 'aab0d57d18b202d059fec57c832d6443faff6ee3':
  Make indentation sane in init.rc
2014-06-20 01:39:27 +00:00
Riley Andrews aab0d57d18 am 94fa2005: am 4f5392cb: Merge "Make indentation sane in init.rc"
* commit '94fa20058fbd0e4f7e3c6d1381cdb9718dd90cde':
  Make indentation sane in init.rc
2014-06-20 01:35:47 +00:00
Riley Andrews 94fa20058f am 4f5392cb: Merge "Make indentation sane in init.rc"
* commit '4f5392cb6c09618b968a4c86bbde079bef57afd1':
  Make indentation sane in init.rc
2014-06-20 01:32:24 +00:00
Riley Andrews 4f5392cb6c Merge "Make indentation sane in init.rc" 2014-06-20 00:06:24 +00:00
Riley Andrews 6dfdc7cd0c Make indentation sane in init.rc
Change-Id: Ic632fbe1423eeef7ec958877d74db7b87fc385c6
2014-06-19 17:13:30 -07:00
JP Abgrall 188fdd1c0f Merge "fastboot: Allow searching for needed dynamic libs in '.' (F2FS)" 2014-06-19 20:37:59 +00:00
JP Abgrall 436abebf8c fastboot: Allow searching for needed dynamic libs in '.' (F2FS)
Currently the default rpath includes $ORIGIN/../lib
So we throw in '.' which should help distributions of fastboot.

readelf -d $(which fastboot)|grep RPATH
 0x0000000f (RPATH) Library rpath: [$ORIGIN/../lib:.]

Bug: 15731906
Change-Id: I2f4345d178e5b3c87f6f159faf105ae30f3b52eb
Signed-off-by: JP Abgrall <jpa@google.com>
2014-06-19 14:47:19 -07:00
Ying Wang a3098b9ada Merge "Store libf2fs_fmt_host_dyn on the build server." 2014-06-19 20:37:59 +00:00
Ying Wang 6b048ce839 Store libf2fs_fmt_host_dyn on the build server.
It will be dynamically loaded by fastboot.

Bug: 15731906
Change-Id: Iff6f2b745b4ffd2c5fe343160b3efb8dcd5702fa
2014-06-19 14:44:23 -07:00
Elliott Hughes ec249c84ba am f0a4855c: am c28e3c31: am a4fb975e: Merge "Fix debuggerd "format \'%p\'" build breakage."
* commit 'f0a4855c2f6331690bee33db9b5a83de816921bb':
  Fix debuggerd "format '%p'" build breakage.
2014-06-19 20:21:01 +00:00
Elliott Hughes 9363b2668e am e8b65473: am dc0261f9: am 030ba83c: Merge "Updated non-ARM archs to reflect logging changes."
* commit 'e8b654733931eaf5c63d816ae41f7d38ac146e36':
  Updated non-ARM archs to reflect logging changes.
2014-06-19 20:21:00 +00:00
Ruchi Kandoi 04db8a55b8 healthd: UEVENT_MSG_LEN is changed from 1048 to 2048 in compliance with
BUFFER_LEN in the kobject_uevent in kernel.

Change-Id: Ia9f4b520847d40fe4e032875dfb79bd063bc723d
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2014-06-19 13:16:50 -07:00
Elliott Hughes 787a2a697e Fix debuggerd "format '%p'" build breakage.
Change-Id: I589d44485e55c23d1f1a6edfa8310a90cac2429e
2014-06-19 12:42:01 -07:00
Elliott Hughes f0a4855c2f am c28e3c31: am a4fb975e: Merge "Fix debuggerd "format \'%p\'" build breakage."
* commit 'c28e3c310c3815dbf1ebdcde82b1971984aeeb7f':
  Fix debuggerd "format '%p'" build breakage.
2014-06-19 18:57:06 +00:00
Elliott Hughes c28e3c310c am a4fb975e: Merge "Fix debuggerd "format \'%p\'" build breakage."
* commit 'a4fb975e3d85b7668aa6f564c6a0d4d85f550f2e':
  Fix debuggerd "format '%p'" build breakage.
2014-06-19 18:53:10 +00:00