Commit Graph

14466 Commits

Author SHA1 Message Date
Mark Salyzyn 473a50f168 rootdir: init.trace.rc too early
(cherry pick from commit 89357d23a1)

debugfs is mounted on boot

Bug: 21566233
Change-Id: I2ba106fbb1e8164ff3d8b2d5b16a16d7926c2732
2015-06-02 14:40:10 -07:00
Andres Morales c6d5cd18f8 Merge "[gatekeeperd] verify a password after enrolling successfully" into mnc-dev 2015-06-02 17:44:17 +00:00
Andres Morales 531e3e83c2 [gatekeeperd] verify a password after enrolling successfully
Bug: 20918106
Change-Id: Ia3cb6d1375d9ee2a6e543ee97d37b7c4f0459447
2015-06-02 10:43:21 -07:00
Svetoslav 23d8407465 Improve adb install help.
Bug: 21365060
Change-Id: I0a4ea5cf3a2f37a82161b30f7eec5781d175aa8f
2015-06-01 23:59:20 +00:00
Mark Salyzyn 42ac34f740 logd: test modernization
(cherry pick from commit 62d6a2a921)

Bug: 19603976
Change-Id: Ie920c128e7e6a436fea7a96c7d68bc39e13a2ad4
2015-06-01 14:27:02 -07:00
Mark Salyzyn 222f8c3ac7 logd: whitelist should not preserve expire messages
(cherry pick from commit c5bf3b8304)

Change-Id: I56275c73191b96aa21e7b4049d401e1f44211f9b
2015-06-01 14:27:02 -07:00
Mark Salyzyn fbf96b55d9 logd: KISS & fix preserve a day
(cherry pick from commit 5921276a16)

Code in 833a9b1e38 was borken,
simpler approach is to simply check last entry (to save a
syscall) minus EXPIRE_HOUR_THRESHOLD. This does make longer logs
less likely to call upon the spam detection than the algorithm
being replaced, but sadly we ended up with a log entry in the
future at the beginning of the logs confounding the previous
algorithm.

Bug: 21555259
Change-Id: I04fad67e95c8496521dbabb73b5f32c19d6a16c2
2015-06-01 14:27:02 -07:00
Mark Salyzyn d4bdb7df9b logd: deal with sloppy leading expire messages
(cherry pick from commit 5392aac95d)

The odds of chatty content also leading the logs is pretty high eg:

 1799 12017 I logd: uid=10007 chatty comm=Binder_B, expire 4 lines
 1799  1829 I logd: uid=10007 chatty comm=Binder_2, expire 4 lines
 1919 20637 I logd: uid=10007 chatty comm=m.sersistent, expire 1 line
 1919 20638 I logd: uid=10007 chatty comm=s.persistent, expire 1 line
 1919  2316 I logd: uid=10007 chatty comm=UlrDispatch, expire 4 lines
19379 20634 I logd: uid=10045 chatty, expire 14 lines
19379 19388 I logd: uid=10045 chatty comm=lizerDaemon, expire 4 lines
  591  4396 I logd: uid=1000 chatty comm=Thread-220, expire 5 lines
  591  1377 I logd: uid=1000 chatty comm=Thread-92, expire 4 lines
 1919  2267 I logd: uid=10007 chatty comm=WifiScanner, expire 4 lines
  591  4397 I logd: uid=1000 chatty comm=DhcpClient, expire 4 lines
  591  4398 I logd: uid=1000 chatty comm=Thread-222, expire 4 lines
  226   580 D CommandListener: Setting iface cfg

Change-Id: I5ab24bc7bf5d2690bae7e789831b07f23ff8bcc6
2015-06-01 14:27:02 -07:00
Christopher Ferris 7e2cb84e9c Modify the code to avoid potential deadlocks.
If the signal to dump a thread is never delivered, then it's
possible for a deadlock. The signal handler is responsible for
unlocking and deleting the ThreadEntry created for the pid/tid
combination. This means if the signal is lost, the ThreadEntry
gets stuck locked and never deleted. If a second attempt to get
a backtrace of this thread occurs, there is a deadlock.

Also, decrease the timeout from 10 seconds to 5 seconds. The original
10 seconds was because the unwind was actually done in the signal
handler. Now the signal handler does nothing but copy the ucontext
structure and let the caller do the unwind.

Bug: 21086132
(cherry picked from commit 2d09171758)

Change-Id: I414c500eb08983a5017caf3fce4f499465575a9d
2015-06-01 14:10:17 -07:00
Andreas Gampe e2452b4bf3 LibNativeBridge: Version 2
Add a callback function to retrieve "signal handler" from the bridge,
if the bridge wants it to be managed by the runtime. The signal handler
will be invoked after the runtime's own one, and before any other
chained handler.

Add a callback function to check compatibility of the bridge with the
library.

Add a function to expose the native bridge version. Add a test for this
function.

Bug: 20217701

(cherry picked from commit a6ac9ce98b)

Change-Id: Ic23a60b949f119c7d8b0e7cb27a61e6c16532a23
2015-05-31 16:58:24 -07:00
Jeff Brown 20432c237c Merge "Work around spurious epoll notifications." into mnc-dev 2015-05-30 00:43:10 +00:00
Jeff Brown 18a574f715 Work around spurious epoll notifications.
Sometimes it seems like we can get into a situation where we are
unable to remove an fd from the epoll set but it keeps sending us
events anyhow.  Defensively rebuild the epoll set in this case
to prevent us from spinning forever.

Bug: 21271428
Change-Id: I5607e565f2e12460d7113a1f62a70d38d334e271
2015-05-29 17:40:25 -07:00
Paul Lawrence 0a423d994a DO NOT MERGE Securely encrypt the master key
(chery-picked from commit 806d10be23)

Move all key management into vold
Reuse vold's existing key management through the crypto footer
to manage the device wide keys.

Use ro.crypto.type flag to determine crypto type, which prevents
any issues when running in block encrypted mode, as well as speeding
up boot in block or no encryption.

This is one of four changes to enable this functionality:
  https://android-review.googlesource.com/#/c/148586/
  https://android-review.googlesource.com/#/c/148604/
  https://android-review.googlesource.com/#/c/148606/
  https://android-review.googlesource.com/#/c/148607/

Bug: 18151196

Change-Id: I6a8a18f43ae837e330e2785bd26c2c306ae1816b
2015-05-29 17:39:16 +00:00
Vineeta Srivastava 0aab798312 Merge "fastboot: Add support for fastboot flashing commands" into mnc-dev 2015-05-28 23:54:41 +00:00
Jim Miller 53d181dcb4 Merge "Fix 64-bit build error" into mnc-dev 2015-05-28 23:10:16 +00:00
Jim Miller c59a6819af Fix 64-bit build error
Fixes bug 21491366

Change-Id: Ifd45ed8a0c5188c5fa2be1a9dac45b97c339685a
2015-05-28 15:47:16 -07:00
Tao Bao 6484f3d1cb Merge "Change pre-recovery into two services" into mnc-dev 2015-05-28 21:48:16 +00:00
Badhri Jagan Sridharan a873e1dc02 fastboot: Add support for fastboot flashing commands
Commands added:
fastboot flashing lock
      - Prevents flashing partitions
fastboot flashing unlock
      - Enable user to flashing partitions
fastboot flashing lock_critical
      - Prevents flashing bootloader related
        paritions
fastboot flashing unlock_critical
      - Enables user to flash bootloader
        related partitions
fastboot flashing get_unlock_ability
      - Query bootloader to check if device is
        locked.

(cherry picked from commit bf11095f92)
Change-Id: Id6db16ba32f7a2b1c3f041a76bd3bdf2d3ab471e
2015-05-28 19:15:27 +00:00
Christopher Ferris 0c3f1ae66b Refactor dump_memory function.
- Add dumping memory around registers for x86/x86_64.
- Add unit tests for new dump_memory function.
- Cleanup all of the machine.cpp files.
- Increase the high address check for 32 bit, and decrease the high
  address allowed for 64 bit slightly to match mips64.

Bug: 21206576
(cherry picked from commit e8bc77eb84)

Change-Id: I49ec237e30076a232f084da1072bf9aba15dc0cd
2015-05-28 11:45:34 -07:00
Than McIntosh b37c45e90a Move perfprofd to late_start class.
Bug: http://b/19483574
Change-Id: I88649b50b95cbddb7d0671a5499232cbef156c48
(cherry picked from commit e8efd0d6bf)
2015-05-28 11:58:31 -04:00
Lorenzo Colitti 0983a6d54c Merge "Document the -g option to adb install." into mnc-dev 2015-05-28 03:34:46 +00:00
Lorenzo Colitti 0b3baac512 Document the -g option to adb install.
Change-Id: I012165df343c24953f1c1cfcdce379bf1b67c624
2015-05-28 12:03:44 +09:00
Adam Lesinski 7f5c818149 am 87b02f23: am 4e830641: am 1def25a2: Merge commit \'7ac60686\' into manualmerge
* commit '87b02f23c0996ab487ef15794bf862b3cd3e5137':
  Prevent integer overflow when allocating native_handle_t
2015-05-28 01:33:18 +00:00
Adam Lesinski 87b02f23c0 am 4e830641: am 1def25a2: Merge commit \'7ac60686\' into manualmerge
* commit '4e8306419073c93f07c7ac69955d990ffa315d96':
  Prevent integer overflow when allocating native_handle_t
2015-05-28 01:23:09 +00:00
Adam Lesinski 4e83064190 am 1def25a2: Merge commit \'7ac60686\' into manualmerge
* commit '1def25a210ca502a97020efb732775d5c2df2d9a':
  Prevent integer overflow when allocating native_handle_t
2015-05-28 01:03:55 +00:00
Adam Lesinski 1def25a210 Merge commit '7ac60686' into manualmerge
Change-Id: I671a57d906ca6826722fb892627d235b14b822eb
2015-05-27 17:09:14 -07:00
Adam Lesinski 7ac6068636 am 058ad0b6: am e8582d65: am 9bd7afc0: Prevent integer overflow when allocating native_handle_t
* commit '058ad0b6612457c54c7ad6e3b5d5a618d94ae966':
  Prevent integer overflow when allocating native_handle_t
2015-05-27 23:40:35 +00:00
Adam Lesinski 058ad0b661 am e8582d65: am 9bd7afc0: Prevent integer overflow when allocating native_handle_t
* commit 'e8582d65ea03a91b5cdc2c374ec9a420f809138f':
  Prevent integer overflow when allocating native_handle_t
2015-05-27 23:23:19 +00:00
Adam Lesinski e8582d65ea am 9bd7afc0: Prevent integer overflow when allocating native_handle_t
* commit '9bd7afc0a1de9589c13355178b6edc709bd0bddf':
  Prevent integer overflow when allocating native_handle_t
2015-05-27 23:13:06 +00:00
Elliott Hughes 9fc8343772 Don't use TEMP_FAILURE_RETRY on close in system/core.
Bug: http://b/20501816
Change-Id: I1839b48ee4f891b8431ecb809e37a4566a5b3e50
(cherry picked from commit 47b0134ec2)
2015-05-27 13:27:06 -07:00
Andres Morales 93f6cba3ea Merge "[gatekeeperd] return brute-force throttling information" into mnc-dev 2015-05-27 18:37:38 +00:00
Eino-Ville Talvala 0ca24ff56b Merge "Graphics depth formats: Add confidence values" into mnc-dev 2015-05-27 17:40:25 +00:00
Michael Lentine 338142aa81 Merge "Adding a build id check to blob cache." into mnc-dev 2015-05-27 17:39:23 +00:00
Adam Lesinski 9bd7afc0a1 Prevent integer overflow when allocating native_handle_t
User specified values of numInts and numFds can overflow
and cause malloc to allocate less than we expect, causing
heap corruption in subsequent operations on the allocation.

Bug: 19334482
Change-Id: I43c75f536ea4c08f14ca12ca6288660fd2d1ec55
2015-05-27 10:20:03 -07:00
Andres Morales ae242929da [gatekeeperd] return brute-force throttling information
Bug: 21118563
Change-Id: I13c6a44f61668be8b4c1fde8c84dcfebab84517c
2015-05-27 07:45:22 -07:00
Eino-Ville Talvala 20651b5c7d Graphics depth formats: Add confidence values
Supplement the dense and sparse depth image formats with
confidence values.

For {HAL_PIXEL_FORMAT_Y_16, HAL_DATASPACE_DEPTH}, use the 3 MSBs
for confidence.

For {HAL_PIXEL_FORMAT_BLOB, HAL_DATASPACE_DEPTH}, add a 4th float
value for confidence.

Bug: 20123879
Change-Id: Idc27081efec682a712ce77ccfec59328f298b944
2015-05-26 14:50:48 -07:00
Nick Kralevich 4b7ddd6105 Merge "Don't use TEMP_FAILURE_RETRY on close()" into mnc-dev 2015-05-23 16:04:00 +00:00
Nick Kralevich 12c67f4dfe Don't use TEMP_FAILURE_RETRY on close()
See https://lkml.org/lkml/2005/9/10/129 for details.

(cherry-picked from commit 95db36e128)

Bug: 20501816
Change-Id: I38bf5052f44034c6f866d10d7d07187f0053a7a1
2015-05-23 16:03:06 +00:00
Thierry Strudel 91cf41cf43 init: wait_for_file use smaller time resolution
As 1s timeout can be requested, using second resolution time to check
for timeout prevent from being accurate on the actual time we wait.
Use available gettime_ns instead.

Bug: 21374269
Change-Id: I8be1b69e02beacc7196427f97855e036addf54d1
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2015-05-22 16:03:12 -07:00
Jim Miller a552f07f7e Remove unused include
Fixes bug 21370426

Change-Id: I693dc6d741d4ede0a0e44d6b75ade7459ef9a3ed
2015-05-21 13:47:33 -07:00
Jim Miller 62de207fcd Merge "Move from native FingerprintService implementation to fingerprintd" into mnc-dev 2015-05-21 00:57:40 +00:00
Jim Miller a34dc46c36 Move from native FingerprintService implementation to fingerprintd
This adds a new service, fingerprintd, that manages fingerprint
hardware from a separate process.  It provides a binder interface that
FingerprintManager uses to talk to the fingerprint HAL.

Change-Id: I64b92589f4d75743ebe96894f07bec515945c61e
2015-05-20 14:55:31 -07:00
Mark Salyzyn 94a811ab19 logd: worst-UID only to preserve a day
(cherry pick from commit 833a9b1e38)

Do not invoke worst-UID pruning in the face of other
UIDs logs that are more than a day old, switch to
pruning oldest only.

Change-Id: Icf988b8d5458400a660d0f8e9d2df3f9d9a4c2d9
2015-05-20 10:03:11 -07:00
Nick Kralevich 7eb3abdb3b klog: don't unconditionally call mknod()
If /dev/kmsg already exists, it's unnecessary for klog_init()
to create it's own copy. This avoids needing to grant the mknod
permission to everyone who uses kmsg. Typically the only time
/dev/kmsg doesn't exist is before ueventd starts.

(cherrypicked from commit 4d32a486fe)

Bug: 21242418
Change-Id: I0c88d80feca6899fcdbc8c9f2f99448ee0a3422d
2015-05-19 15:19:25 -07:00
Tao Bao e48aed0f0a Change pre-recovery into two services
/system/bin/uncrypt needs to be triggered to prepare the OTA package
before rebooting into the recovery. Separate pre-recovery (uncrypt)
into two services: uncrypt that does the uncryption work and
pre-recovery that actually reboots the device into recovery.

Also create /cache/recovery on post-fs in case it doesn't exist.

Bug: 20012567
Bug: 20949086
Change-Id: If67fe1e9ee6279593d2788452febcd3f0fe714c2
2015-05-19 10:04:56 -07:00
Adam Lesinski 0ebd13f063 Merge "Prevent integer overflow when allocating native_handle_t" into mnc-dev 2015-05-19 00:30:24 +00:00
Jeff Brown ac9131b30c Merge "Add TEMP_FAILURE_RETRY to libsuspend." into mnc-dev 2015-05-18 23:02:52 +00:00
Jeff Brown 0446e16f53 Add TEMP_FAILURE_RETRY to libsuspend.
In testing, I observed one instance of a call failing due to a signal
sent to the process.  This could happen at various times so it's better
to be safe than sorry.

Bug: 20534809
Change-Id: I42242087300d8b840a50aec34aa6b2e1507cab50
2015-05-18 15:53:56 -07:00
Michael Lentine 6078805023 Adding a build id check to blob cache.
Add a build id field to the header structure in blob cache. Add build
id support with reading and writing the cache. When the cache gets
written it writes the build id at the end of the header. When read it
checks to see if there is a match between the current version and the
version in the cache. If not, it invalidates the cache which would
typically only occur during an ota update.  Also remove blob cache
from the host build.

bug: 18262905

Change-Id: I753b1de1986703a4c1c8691b9d2bb533b2546143
2015-05-18 13:14:32 -07:00
Elliott Hughes 4652fc6f08 Revert "Switch to toybox ls."
This reverts commit 9c94aa9982.

Change-Id: Ie2479ee4a0614e285ce8d57c727200a0381904e2
(cherry picked from commit 88f0f4b2b4)
2015-05-15 23:31:08 -07:00