Commit Graph

22207 Commits

Author SHA1 Message Date
Sergio Giro 207717bde6 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 2806397d1e am: 8c9d02551c am: 28f28ce635 -s ours
am: f611765aaf

Change-Id: I236fac995374280f948759f44e673aff98b53447
2016-07-14 18:24:13 +00:00
Sergio Giro 062c13e997 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 3411dd4457 am: 01dbd1da64
am: 7c516d7080

Change-Id: Ieaea49b0baa026dd0666b884a1c64a303d19baf1
2016-07-14 18:23:56 +00:00
Mark Salyzyn 3ad493d961 Merge "liblog: reset pid and uid cache after a vfork()" into nyc-mr1-dev 2016-07-14 18:20:37 +00:00
Sergio Giro 7c516d7080 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 3411dd4457
am: 01dbd1da64

Change-Id: Id0ecb8e252b43cc5c77644310e4f8a2968876a37
2016-07-14 18:15:36 +00:00
Sergio Giro e05a4d0d19 Merge \"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\" into nyc-dev
am: 757f4ef340

Change-Id: I6c6b8514011925bd737eac34d0e62049eaef08c9
2016-07-14 18:08:08 +00:00
Sergio Giro 01dbd1da64 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
am: 3411dd4457

Change-Id: I34322210bd7ab90c1986d55f9b444292e76c646a
2016-07-14 18:07:28 +00:00
Sergio Giro 72bad95df5 Merge \\\\"DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\" into lmp-dev am: 8d2d6cedbb -s ours am: 71da8e7537 am: 5e03ed1dab
am: b00e3603ef  -s ours

Change-Id: Id73880ce44c4a1cb14c04b6e533e888ac28e1ae0
2016-07-14 18:03:17 +00:00
Sergio Giro f611765aaf DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 2806397d1e am: 8c9d02551c
am: 28f28ce635  -s ours

Change-Id: I2ef3ab0e4e3c64c9b5c17454ab738f3d5bdb5dd3
2016-07-14 18:03:14 +00:00
Sergio Giro b00e3603ef Merge \\\"DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\" into lmp-dev am: 8d2d6cedbb -s ours am: 71da8e7537
am: 5e03ed1dab

Change-Id: I69b9c166dcd1f76cfe6555cae0580366f79258cc
2016-07-14 18:00:50 +00:00
Sergio Giro 28f28ce635 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 2806397d1e
am: 8c9d02551c

Change-Id: Ia8754c27d2d2a639280235c2dbf9043f3442421e
2016-07-14 17:59:56 +00:00
Sergio Giro 5e03ed1dab Merge \\"DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\" into lmp-dev am: 8d2d6cedbb -s ours
am: 71da8e7537

Change-Id: I1c9b5abdf550bb2e6f294c7f0920ff72e6bcfc0e
2016-07-14 17:59:48 +00:00
Sergio Giro 8c9d02551c DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
am: 2806397d1e

Change-Id: I28785c3aa9d2b11b045c53fea557c0d74bd65181
2016-07-14 17:52:06 +00:00
Sergio Giro 71da8e7537 Merge \"DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\" into lmp-dev
am: 8d2d6cedbb  -s ours

Change-Id: Id0e0d5176560cf883da2e5507ba9106ecc624536
2016-07-14 17:52:05 +00:00
Sergio Giro 8d2d6cedbb Merge "DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8" into lmp-dev 2016-07-14 17:36:23 +00:00
Sergio Giro 757f4ef340 Merge "libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8" into nyc-dev 2016-07-14 17:33:28 +00:00
Sergio Giro 2806397d1e DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

(cherry picked from commit c4966a363e)

Change-Id: Idfb0eb29b305678608586d25c2f372146569ad39
Bug: 29250543
2016-07-14 17:25:27 +00:00
Sergio Giro 98933455b5 Merge "libutils/Unicode.cpp: remove SafetyNet logging" into nyc-mr1-dev 2016-07-14 15:55:26 +00:00
Sergio Giro 3411dd4457 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

Test: ran libutils_tests
Bug: 29250543
Change-Id: I6115e3357141ed245c63c6eb25fc0fd0a9a7a2bb
(cherry picked from commit c4966a363e)
2016-07-14 16:49:50 +01:00
Mark Salyzyn ad3fdd3407 liblog: reset pid and uid cache after a vfork()
(cherry pick from commit ec4f5c776d)

Bionic getuid() and getpid() calls cache to reduce the need to
perform a syscall, and also reset their own cache after a vfork().
No more need for liblog to be performing this flawed cache operation.

Bug: 30085794
Change-Id: I70feed8bff0ddd919c2885a348ba67b14ddc0e0d
2016-07-14 08:49:02 -07:00
Sergio Giro b022447a3a DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

(cherry picked from commit c4966a363e)

Change-Id: Idfb0eb29b305678608586d25c2f372146569ad39
Bug: 29250543
2016-07-14 14:47:59 +00:00
Sergio Giro deb0b40f1f DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21 am: 3841c92912 -s ours am: 247ac63c69 -s ours am: 6179f1a56e am: 451f4b3d04 am: 3c85e4e5e7 -s ours am: baac6666fe am: 2858362ffe am: 7a0c6bf505 am: f96271187f -s ours
am: 53d529a585

Change-Id: Ia49dd230eb055a8dba4306ecbdf7dc10098acccb
2016-07-14 14:05:46 +00:00
Sergio Giro 53d529a585 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21 am: 3841c92912 -s ours am: 247ac63c69 -s ours am: 6179f1a56e am: 451f4b3d04 am: 3c85e4e5e7 -s ours am: baac6666fe am: 2858362ffe am: 7a0c6bf505
am: f96271187f  -s ours

Change-Id: Ib04042a57e4b5d55eca95cbbea272446c499c07e
2016-07-14 13:59:29 +00:00
Sergio Giro f96271187f DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21 am: 3841c92912 -s ours am: 247ac63c69 -s ours am: 6179f1a56e am: 451f4b3d04 am: 3c85e4e5e7 -s ours am: baac6666fe am: 2858362ffe
am: 7a0c6bf505

Change-Id: Iea9431a42775b8aa6c89d7b5aaf407692f9e46b4
2016-07-14 13:53:15 +00:00
Sergio Giro 7a0c6bf505 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21 am: 3841c92912 -s ours am: 247ac63c69 -s ours am: 6179f1a56e am: 451f4b3d04 am: 3c85e4e5e7 -s ours am: baac6666fe
am: 2858362ffe

Change-Id: Ie933e2f7903dfc653c3dc0a6499e52cc73d2eefd
2016-07-14 13:46:28 +00:00
Sergio Giro 2858362ffe DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21 am: 3841c92912 -s ours am: 247ac63c69 -s ours am: 6179f1a56e am: 451f4b3d04 am: 3c85e4e5e7 -s ours
am: baac6666fe

Change-Id: I78b737a0a19a9ae692fd94f1b3ca8d0870291c96
2016-07-14 13:40:49 +00:00
Sergio Giro 570dbfb8b8 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

Test: ran libutils_tests
Bug: 29250543
Change-Id: I6115e3357141ed245c63c6eb25fc0fd0a9a7a2bb
(cherry picked from commit c4966a363e)
2016-07-14 13:40:43 +00:00
Sergio Giro baac6666fe DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21 am: 3841c92912 -s ours am: 247ac63c69 -s ours am: 6179f1a56e am: 451f4b3d04
am: 3c85e4e5e7  -s ours

Change-Id: I2a4bdacfce15e656f487ad24508df3d4066ca8b7
2016-07-14 13:34:44 +00:00
Sergio Giro 3c85e4e5e7 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21 am: 3841c92912 -s ours am: 247ac63c69 -s ours am: 6179f1a56e
am: 451f4b3d04

Change-Id: I1781e52845996557f9f6a7e8b359e1d698e38e45
2016-07-14 13:28:27 +00:00
Sergio Giro 451f4b3d04 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21 am: 3841c92912 -s ours am: 247ac63c69 -s ours
am: 6179f1a56e

Change-Id: I1622017cea3f29fc17e8f75f0cfa77c786a08937
2016-07-14 13:16:45 +00:00
Sergio Giro 6179f1a56e DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21 am: 3841c92912 -s ours
am: 247ac63c69  -s ours

Change-Id: Ia8ee4d393bc8cf9cde7ada6af9f79eeee3100f80
2016-07-14 13:08:26 +00:00
Sergio Giro 247ac63c69 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21
am: 3841c92912  -s ours

Change-Id: Ia555a7e1a9eaf3f00dfa91ceb8afe85c48e4b7d5
2016-07-14 13:01:44 +00:00
Sergio Giro 3841c92912 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6
am: d0ad14ca21

Change-Id: Id0901a86ea469d664badfee75db32948c88e72f7
2016-07-14 12:55:58 +00:00
Sergio Giro d0ad14ca21 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
am: 5fce0542b6

Change-Id: I348b457decce08d6d08819a16d618b0bc194aa91
2016-07-14 12:49:59 +00:00
Sergio Giro 5fce0542b6 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

(cherry picked from commit c4966a363e)

Bug: 29250543
Change-Id: Ia2d6a550f5594280505fb0835c752e53898700ed
2016-07-14 12:34:30 +00:00
Sergio Giro c6a3e7c590 libutils/Unicode.cpp: remove SafetyNet logging
Bug: 29250543
Change-Id: Ia4018d036862aa42923cbe5980c3c0c2dde01d9f
2016-07-14 13:20:33 +01:00
Christopher Tate 2bcdda8e5d Ensure the target sees a proper EOD marker during restore
Malformed or corrupt archives may be missing their in-band EOD
content, so make sure that the target sees one regardless rather
than continuing to block on read, expecting in-band signaling.

Bug 28056941

Change-Id: Ic39966d3448787a8c511783d39172032ed9589c3
2016-07-13 17:58:27 -07:00
Mark Salyzyn 109d7d23c5 init: Add support for ${x.y:-default} expansion
commit 00ede7d262 (init: do
expand_props before calling the builtins) broke logpersist

Bug: 28120456
Bug: 22654233
Bug: 28788401
Change-Id: Ib4d8231665b26ac083b02243177493fab41c8978
2016-07-13 23:55:34 +00:00
Tom Cherry b79e076e5e init: expand arguments of services when they start
Arguments of commands are expanded based on properties if they contain
${property.name}, however this is not currently done for arguments of
services.

This patch makes it that arguments of services are expanded each time
that the service starts at the point immediately before execve().

Bug: 28788401
Change-Id: Iba581a8377e25a6478d4d2ec2e8b29e181d8640c
2016-07-13 23:54:42 +00:00
Mark Salyzyn 515f091f5e logpersist: incorporate size and buffer tunables
- Add hidden -n and -b flags that propagate to the underlying
  logcat command. Publish aliases in help as --size and --buffer.
- Add --clear for start command so it clears before starting
- shell script bloating up to deal with option validation and
  provide ERROR: and WARNING: advice.

ToDo:

- Deprecate shell script and replace with Eng and Userdebug
  only Developer Options, before it becomes too powerful
  or bloated to force us to rewrite an expendable like this
  into C++.

Bug: 28120456
Bug: 28788401
Change-Id: I0dff8acaa1e5c929454760cfa2801924956bc25d
2016-07-13 23:53:54 +00:00
Thierry Strudel aa3a56539d Revert "logd: logcat -L takes longer causing vold to timeout."
This reverts commit c1b26acae2.

Bug: 28788401
Change-Id: I415530deb7587d1068f42971762b418b0524663c
2016-07-13 23:53:10 +00:00
Josh Gao 4a875ce6ff debuggerd: verify that traced threads belong to the right process.
Fix two races in debuggerd's PTRACE_ATTACH logic:
  1. The target thread in a crash dump request could exit between the
     /proc/<pid>/task/<tid> check and the PTRACE_ATTACH.
  2. Sibling threads could exit between listing /proc/<pid>/task and the
     PTRACE_ATTACH.

Bug: http://b/29555636
Change-Id: I4dfe1ea30e2c211d2389321bd66e3684dd757591
2016-07-13 16:49:02 -07:00
Sergio Giro 83df11fe0d Revert \\\\\\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7 am: e059f5e325 am: 85d694cd0d am: 9b169f8baf am: fd900142f5 -s ours
am: 01799f4381

Change-Id: I083677a4d84985dc671f7f35544aa5d2dbceb59c
2016-07-13 13:27:26 +00:00
Sergio Giro 01799f4381 Revert \\\\\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7 am: e059f5e325 am: 85d694cd0d am: 9b169f8baf
am: fd900142f5  -s ours

Change-Id: Ib057bbfd06a34eaad78dfca4cb30847db2443353
2016-07-13 13:23:54 +00:00
Sergio Giro fd900142f5 Revert \\\\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7 am: e059f5e325 am: 85d694cd0d
am: 9b169f8baf

Change-Id: Iad77367b59a282acfb5649dfe2ef561515709d0e
2016-07-13 13:16:47 +00:00
Sergio Giro 9b169f8baf Revert \\\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7 am: e059f5e325
am: 85d694cd0d

Change-Id: I83a0ee22957bd7f003196e138905264d6606c07e
2016-07-13 13:13:01 +00:00
Sergio Giro 85d694cd0d Revert \\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7
am: e059f5e325

Change-Id: I5682a9b927fb31cb3d888b7f430d8ad62fcaeef3
2016-07-13 13:05:57 +00:00
Sergio Giro e059f5e325 Revert \\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33
am: c06d338ad7

Change-Id: I4ee28f7eb936464eeee476b9fedb19aa7fb96ac0
2016-07-13 13:01:47 +00:00
Sergio Giro c06d338ad7 Revert \\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613
am: 80473d5d33

Change-Id: Ia5cb6e89924e69df568d633472656dd4b0c12a76
2016-07-13 12:58:09 +00:00
Sergio Giro 80473d5d33 Revert \\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373
am: 37826f5613

Change-Id: I3bc2854586879b2a7d7678516a99b7f767a3d4cb
2016-07-13 12:54:32 +00:00
Sergio Giro 37826f5613 Revert \\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d
am: 605de74373

Change-Id: Ib58bd045e59fcfcf449b346861b5427d07fba9c6
2016-07-13 12:51:06 +00:00