Commit graph

10381 commits

Author SHA1 Message Date
Narayan Kamath
491035ce1c am 8253cb04: am 0cc468dc: am fef9dffd: (-s ours) am 6c53de92: Follow up to change b638126ed DO NOT MERGE.
* commit '8253cb0436a09dcb325dbdecf4689b0a18b25644':
  Follow up to change b638126ed DO NOT MERGE.
2015-09-17 23:03:11 +00:00
Narayan Kamath
db7d8e963c am 68a78370: am 2e64e959: am a82d6dc3: (-s ours) resolved conflicts for b638126e to klp-modular-dev
* commit '68a7837088c40e367ebf16959adc9d20d06ef0ea':
  libutils: Fix integer overflows in VectorImpl. DO NOT MERGE
2015-09-17 23:03:10 +00:00
Narayan Kamath
cf676a8686 am 52edd8bd: am 419e6c3c: libutils: Fix integer overflows in VectorImpl.
* commit '52edd8bdf3e83f41f4df4bb5e9e44d0bc0c56a37':
  libutils: Fix integer overflows in VectorImpl.
2015-09-17 23:01:45 +00:00
Narayan Kamath
8253cb0436 am 0cc468dc: am fef9dffd: (-s ours) am 6c53de92: Follow up to change b638126ed DO NOT MERGE.
* commit '0cc468dc2a1420d5c9dac563cc6c5d11b862ff47':
  Follow up to change b638126ed DO NOT MERGE.
2015-09-12 09:46:19 +00:00
Narayan Kamath
68a7837088 am 2e64e959: am a82d6dc3: (-s ours) resolved conflicts for b638126e to klp-modular-dev
* commit '2e64e9590a36511eaaf655b24002d24afe927f04':
  libutils: Fix integer overflows in VectorImpl. DO NOT MERGE
2015-09-12 09:46:18 +00:00
Narayan Kamath
0cc468dc2a am fef9dffd: (-s ours) am 6c53de92: Follow up to change b638126ed DO NOT MERGE.
* commit 'fef9dffd96e8bc6f2283a57cd0b29df4be43eb46':
  Follow up to change b638126ed DO NOT MERGE.
2015-09-12 08:49:20 +00:00
Narayan Kamath
2e64e9590a am a82d6dc3: (-s ours) resolved conflicts for b638126e to klp-modular-dev
* commit 'a82d6dc3bf18b74aab4e8fb497b08e02f4a1ec8d':
  libutils: Fix integer overflows in VectorImpl. DO NOT MERGE
2015-09-12 08:49:15 +00:00
Narayan Kamath
52edd8bdf3 am 419e6c3c: libutils: Fix integer overflows in VectorImpl.
* commit '419e6c3c68413bd6dbb6872340b2ae0d69a0fd60':
  libutils: Fix integer overflows in VectorImpl.
2015-09-12 06:30:18 +00:00
Narayan Kamath
fef9dffd96 am 6c53de92: Follow up to change b638126ed DO NOT MERGE.
* commit '6c53de92cf7e759488538280788325fac6ccdea2':
  Follow up to change b638126ed DO NOT MERGE.
2015-09-11 09:50:09 +00:00
Narayan Kamath
a82d6dc3bf resolved conflicts for b638126e to klp-modular-dev
Change-Id: If5062b01afa95279ab25fe86aaafa89d4d74eaa1
2015-09-10 22:00:26 +01:00
Narayan Kamath
6c53de92cf Follow up to change b638126ed DO NOT MERGE.
Resolves delta between the kitkat and L version of this patch.
Fixes the molly build on klp-dev.

bug: 22953624
Change-Id: I696a506320f30d3d5cd95f6da35361244986cb36
2015-09-10 20:30:59 +00:00
Narayan Kamath
419e6c3c68 libutils: Fix integer overflows in VectorImpl.
Use external/safe-iop to check for overflows on arithmetic
operations.

Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.

Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.

bug: 22953624

(cherry picked from commit c609c31fb5)

Change-Id: I61644633db6b54fa230683615de9724f7fabf6fb
2015-09-09 12:05:06 +01:00
Narayan Kamath
b638126ed3 libutils: Fix integer overflows in VectorImpl. DO NOT MERGE
Use external/safe-iop to check for overflows on arithmetic
operations.

Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.

Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.

bug: 22953624

(cherry picked from commit c609c31fb5)

Change-Id: I673b7ab142bed4fcba9159a00a65cf6bca6b1f6c
2015-09-09 11:20:13 +01:00
Sergio Giro
7c327194fe am 1dda45c7: am 0cc9a6e6: libutils: fix overflow in SharedBuffer [DO NOT MERGE]
* commit '1dda45c7d7605be2601b2f95b90b5673d6bac78c':
  libutils: fix overflow in SharedBuffer [DO NOT MERGE]
2015-08-25 16:49:18 +00:00
Sergio Giro
1dda45c7d7 am 0cc9a6e6: libutils: fix overflow in SharedBuffer [DO NOT MERGE]
* commit '0cc9a6e6e1f8e675c1238e5e05418cabcc699b52':
  libutils: fix overflow in SharedBuffer [DO NOT MERGE]
2015-08-25 16:43:54 +00:00
Sergio Giro
bd7dd79e8c am 25592fbe: am ca15dfd0: am 3fe40514: (-s ours) am 66b6eb94: [DO NOT MERGE] libutils: fix overflow in SharedBuffer
* commit '25592fbea0f38ea369a225e0ef9708442fc9e918':
  [DO NOT MERGE] libutils: fix overflow in SharedBuffer
2015-08-25 16:26:30 +00:00
Sergio Giro
0cc9a6e6e1 libutils: fix overflow in SharedBuffer [DO NOT MERGE]
See
https://code.google.com/p/android/issues/detail?id=181910

Bug: 22952485
(cherry picked from commit 66b6eb9490)

Change-Id: Ic71dd0025b9a7588c4f3bb1c7be1bd13d2ff5105
2015-08-25 16:18:16 +01:00
Sergio Giro
25592fbea0 am ca15dfd0: am 3fe40514: (-s ours) am 66b6eb94: [DO NOT MERGE] libutils: fix overflow in SharedBuffer
* commit 'ca15dfd05cdeea7ed57578aa569831698324b2a0':
  [DO NOT MERGE] libutils: fix overflow in SharedBuffer
2015-08-25 14:19:08 +00:00
Sergio Giro
ca15dfd05c am 3fe40514: (-s ours) am 66b6eb94: [DO NOT MERGE] libutils: fix overflow in SharedBuffer
* commit '3fe4051430be1da4c1f119c165a4bb8b3a9dd499':
  [DO NOT MERGE] libutils: fix overflow in SharedBuffer
2015-08-25 14:11:49 +00:00
Sergio Giro
3fe4051430 am 66b6eb94: [DO NOT MERGE] libutils: fix overflow in SharedBuffer
* commit '66b6eb9490beeeabc804d790c1c4060ce047afd4':
  [DO NOT MERGE] libutils: fix overflow in SharedBuffer
2015-08-25 14:06:38 +00:00
Sergio Giro
66b6eb9490 [DO NOT MERGE] libutils: fix overflow in SharedBuffer
See
https://code.google.com/p/android/issues/detail?id=181910

Bug: 22952485
(cherry picked from commit 7987b83553)

Change-Id: I3cac87185f209dc79678ae702aa18afbdf4190df
2015-08-21 20:36:19 +01:00
Abhishek Arya
e45d96d6bf am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit '19398a712c53d27aaa2122cfae5d54168b8df0c9':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:36:01 +00:00
Abhishek Arya
19398a712c am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'd34846b70b7f6eb167722d45e0c717fa64116e90':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:29:00 +00:00
Abhishek Arya
d34846b70b am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'cd407a17fe326f3e18866ddddb1c747b06a45fc0':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:23:50 +00:00
Abhishek Arya
cd407a17fe am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'e0dce90b0de2b2b7c2baae8035f810a55526effb':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:18:47 +00:00
Abhishek Arya
e0dce90b0d Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
Bug: 23290056
Change-Id: If6e22b0159de6635a8ca5305895b7718f15becc7
2015-08-20 21:55:55 -07:00
Sergio Giro
e97682be06 am a1a22b57: am e67b5848: am 4956c0fe: am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
* commit 'a1a22b5736d5ad71531fd07d5c4103585e8e8977':
  libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:44:57 +00:00
Sergio Giro
a1a22b5736 am e67b5848: am 4956c0fe: am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
* commit 'e67b584869eea8d4e955e82de1e38ede080a2ed4':
  libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:38:33 +00:00
Sergio Giro
e67b584869 am 4956c0fe: am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
* commit '4956c0fe1e582a8497aff34a41aeb8bf4748eef0':
  libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:28:53 +00:00
Sergio Giro
4956c0fe1e am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
* commit '5b85b1d40d619c2064d321364f212ebfeb6ba185':
  libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:23:47 +00:00
Sergio Giro
5b85b1d40d libutils: fix overflow in String8::allocFromUTF8
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908

Bug: 23290056

(cherry picked from commit 4eeacbeec0)

Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b
(cherry picked from commit ebabef2752)
2015-08-18 20:52:25 +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
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
Iliyan Malchev
16092b7a48 Merge "fs_mgr: allow for zramsize to be specified as percentage of total memory" into lmp-mr1-dev 2015-05-12 23:25:51 +00:00
Iliyan Malchev
3ea902f252 fs_mgr: allow for zramsize to be specified as percentage of total memory
If the zramsize entry has a % size at the end, as in the following example:

	/dev/block/zram0 none swap defaults zramsize=25%

then we will set the value as that percentage of total RAM, as read by scanning
/proc/meminfo.

b/20760266 Seed common build allocated too much for zRAM-backed swap

Change-Id: I17c91d311ba99ae7adae112bfe1b38542ea69b80
Signed-off-by: Iliyan Malchev <malchev@google.com>
2015-05-01 23:04:04 -07:00
Chris Fries
79f3384652 fs_mgr: introduce fs_mgr_format to format wiped partitions
Move fastboot's format logic into fs_mgr, to consolidate the knowledge
about how to do this (and when to wipe metadata).

Try to format these formattable paritions if they are wiped.

If formatting fails, we will fall out to let recovery mode handle it.

Bug: 20082763
Change-Id: I397cc197550e78d932e8a154fd234695c46dbe7b
2015-04-10 15:01:16 -07:00
Paul Lawrence
317b4024a2 Revert "Make encryption configurable"
This reverts commit bda6272446.

The original fix seems to have led to boot failures in QA. Rather than
risk shipping, revert the change. Bug 18764230 reopened.

Requires change
    https://googleplex-android-review.git.corp.google.com/#/c/629764/

Bug: 19278390
Bug: 19199624

Change-Id: I8b6ab585666f2b0f585ffb2a5f61ac2e3462e06e
2015-02-06 17:32:09 +00:00
Paul Lawrence
bda6272446 Make encryption configurable
Delay mounting encryptable but unencrypted volumes until we can
check the ro.vold.forceencrypt flag, then optionally encrypt.

Requires matching vold change from
    https://googleplex-android-review.git.corp.google.com/#/c/615309/

Bug: 18764230
Change-Id: If22008be8de6a4f3216b349f81ace49be1730314
2015-01-21 10:03:29 -08:00
Dmitry Shmidt
70f6dea9d0 Merge "android_filesystem: Remove setuid bits from tcpdump" into lmp-mr1-dev 2015-01-15 20:45:06 +00:00
Dmitry Shmidt
33e4f4d81a android_filesystem: Remove setuid bits from tcpdump
Bug: 18669116

Change-Id: I25486f2fe0e994f569b788fc9f03ef6d383f54d4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2015-01-15 10:35:54 -08:00
Jean-Michel Trivi
c6c3c7d445 Merge "Remove explict use of ASCII encoding" into lmp-mr1-dev 2015-01-15 17:16:22 +00:00
Jean-Michel Trivi
6c555ea305 Merge "Return path including executable instead of without" into lmp-mr1-dev 2015-01-15 17:16:01 +00:00
Jean-Michel Trivi
1a65d5b351 Merge "Fix building on modern versions of Xcode and OS X." into lmp-mr1-dev 2015-01-15 17:15:33 +00:00
Narayan Kamath
0f86444b39 Merge "sdcard : inode numbers must be fully representable as uint32_t." into lmp-mr1-dev 2015-01-15 09:43:10 +00:00
Christopher Ferris
5f2ff6a910 Add timed versions of stack dumping functions.
Under some unknown circumstances, debuggerd could become unresponsive.
If you try and take a bugreport during this time, it will hang forever.
Adding functions that have a timeout will allow dumpstate to stop if
dumping is taking too long.

Bug: 18766581
Change-Id: I85053b8dcfe6224e2b64b4d8f7f2ef448b3cda34
2015-01-14 15:24:33 -08:00
Al Sutton
77262e7db2 Remove explict use of ASCII encoding
Replace the use of CFStringGetCString with kCFStringEncodingASCII specified
with CFStringGetFileSystemRepresentation which will ensure the correct
character encoding is used to conver the CFString into a NULL terminated
char array suitable for use with POSIX APIs.

(cherry picked from commit 2a4b5f9e80)

Change-Id: Ie6e2027e59b49ca634c7308bcda7bb492d372f46
2015-01-14 09:41:33 -08:00
Al Sutton
d5b4176788 Return path including executable instead of without
The previous implementation returned the path the executable was in instead
of returning the path including the executable (i.e. it returned ...bin
instead of ...bin/executable). This is not what the original methods did
and caused the process forking of adb to fail.

This patch corrects the implementation.

(cherry picked from commit 26b53bb75e)

Change-Id: Icad6870bbb0a88f611ca71d90fff30f7b576c367
2015-01-14 09:39:58 -08:00