Commit graph

489 commits

Author SHA1 Message Date
Nick Kralevich
2af9135b8a Merge "trace-dev.c: more O_CLOEXEC" am: a8d3fdf4c6
am: 2dda6ac98d

* commit '2dda6ac98d2e82adaebd443f468eff060961f1c6':
  trace-dev.c: more O_CLOEXEC
2015-12-16 14:20:39 -08:00
Nick Kralevich
2dda6ac98d Merge "trace-dev.c: more O_CLOEXEC"
am: a8d3fdf4c6

* commit 'a8d3fdf4c62b485073b439ed46b4814f1608f77a':
  trace-dev.c: more O_CLOEXEC
2015-12-16 21:50:01 +00:00
Nick Kralevich
dee1ef48a9 trace-dev.c: more O_CLOEXEC
Stop the file descriptors from leaking.

Change-Id: Ib5ca1c2e5031fbec8751bde9e86b32e51e10fcbc
2015-12-16 12:32:26 -08:00
Elliott Hughes
02903348f8 Merge "Make host ashmem_create_region more robust." am: ec2f506e74
am: 6ed33e5ada

* commit '6ed33e5ada7e7a1f7d4f0a0407850021169893d3':
  Make host ashmem_create_region more robust.
2015-12-16 18:44:31 +00:00
Elliott Hughes
6ed33e5ada Merge "Make host ashmem_create_region more robust."
am: ec2f506e74

* commit 'ec2f506e741bbc9252d25f0f2ba1c24b1aa0ab7d':
  Make host ashmem_create_region more robust.
2015-12-16 18:40:04 +00:00
Elliott Hughes
3918090252 Make host ashmem_create_region more robust.
Don't clobber errno if mkstemp failed, always unlink, and only count
mkstemp/ftruncate failures as real failures --- if only the unlink
fails, there's no point not using what we have.

Change-Id: I6bc788682c88651a50a6316b9ca07ba07e9fefa2
2015-12-16 08:33:52 -08:00
Erik Kline
f3501658af Merge "Listen on dualstack sockets." am: 1f7bcf3e93 am: f6df8fce6d
am: 4cb2c1fbb6

* commit '4cb2c1fbb60b5b4684bdd01c140eb82e1c397e3c':
  Listen on dualstack sockets.
2015-12-08 06:38:12 +00:00
Erik Kline
4cb2c1fbb6 Merge "Listen on dualstack sockets." am: 1f7bcf3e93
am: f6df8fce6d

* commit 'f6df8fce6d0bea7da34e2e16edc691881b92105a':
  Listen on dualstack sockets.
2015-12-07 22:35:10 -08:00
Todd Kennedy
088113f419 Merge "Create new ephemeral app directory" 2015-12-07 15:33:06 +00:00
Erik Kline
c40da92e5b Listen on dualstack sockets.
Change-Id: Id6eff59c65a7f7e190ab9aa93625e32a9806ae6c
2015-12-07 16:09:39 +09:00
Nick Kralevich
aa68a571b4 Merge "fs_config.c: Remove obsolete reference to /system/bin/pppd-ril" am: e08e4656db
am: 9efbfda576

* commit '9efbfda5764c8d2a1abb4a4e88caf0aa3c9c92ea':
  fs_config.c: Remove obsolete reference to /system/bin/pppd-ril
2015-11-30 18:49:28 +00:00
Nick Kralevich
cbbc66174c fs_config.c: Remove obsolete reference to /system/bin/pppd-ril
Codesearch finds no reference to this in the Android tree. It was
added in 2010 in commit bbf1c64527.

Change-Id: I8cd1153912b78b4b23b8f5ba2577a58c5c49e316
2015-11-30 09:17:18 -08:00
Nick Kralevich
cb2202f614 Merge "fs_config: remove setuid bit from librank" am: 0380d49024
am: dee5c24927

* commit 'dee5c24927754c7a3213a3118f53cb119f00ad85':
  fs_config: remove setuid bit from librank
2015-11-30 14:57:05 +00:00
Nick Kralevich
3e6356834f fs_config: remove setuid bit from librank
Anyone wanting to call /system/xbin/librank can execute "su"
beforehand. There's no need for it to be setuid root.

Bug: 25739721
Change-Id: Ie3d68701397d21e901bf1ec17b4b4a9f12128d2d
2015-11-27 18:08:22 -08:00
Josh Gao
d9a3f0b65f Merge changes I36b66fc5,I0561affb am: 166e716851
am: 8e82180c83

* commit '8e82180c83eb89069716fb790ed0f006e469be1c':
  libcutils: turn on -Werror on Win32, fix resulting build break.
  libcutils: add prefix to local variables in Android.mk.
2015-11-24 20:20:44 +00:00
Josh Gao
1175d0fdb0 libcutils: turn on -Werror on Win32, fix resulting build break.
Mingw doesn't provide strndup or strtok_r used in str_parms.c, resulting in
-Wimplicit-function-declaration being emitted for the Windows build.
None of the consumers of str_parms.c appear to be compiled for Windows,
so we can just remove it from the Windows build.

Change-Id: I36b66fc54ed261d38f5294bc8662ddb2db4fe64f
2015-11-24 09:35:45 -08:00
Josh Gao
9e86f8e036 libcutils: add prefix to local variables in Android.mk.
Change-Id: I0561affbcc306c20f8aa87beb2d9728a9bb79f5e
2015-11-24 08:45:07 -08:00
Todd Kennedy
0a2733582d Create new ephemeral app directory
Bug: 25119046
Change-Id: Ie005430700a73ef1ba492dae4101419a41da4071
2015-11-23 15:24:13 -08:00
Josh Gao
7454190acd Merge "Revert "libcutils: don\'t build for Windows."" am: 39a1b77381 am: 167b4bed93
am: 5153be7f94

* commit '5153be7f94046cf2e7e34060f9d5ae4866abb015':
  Revert "libcutils: don't build for Windows."
2015-11-18 19:17:54 +00:00
Josh Gao
b5d763b053 Merge changes Ice07f892,Ie1f082a0 am: 74a33fbcef am: 053eba0bc1
am: cb601eb981

* commit 'cb601eb981f70d395e9bac5c1bf39c7773141eca':
  libcutils: don't build for Windows.
  adb: don't link against libcutils on Windows.
2015-11-18 19:17:39 +00:00
Todd Kjos
88b5892d74 resolve merge conflicts of ed60788968 to mnc-dr2-dev-plus-aosp.
Change-Id: I9b07dd8dcb8fc74b658466b8dd47546cefffab1d
2015-11-18 08:31:03 -08:00
Josh Gao
cab716f101 Revert "libcutils: don't build for Windows."
This reverts commit bb3f9ce0aa.
2015-11-17 14:28:33 -08:00
Josh Gao
bb3f9ce0aa libcutils: don't build for Windows.
Change-Id: Ice07f892a346bbba2ed6bfdcddf7222799e76f9d
2015-11-16 16:21:22 -08:00
Todd Kjos
ba8a47531c Actively mangage EAS schedtune nodes
Move foreground tasks to /sys/fs/cgroup/stune/boost/tasks (boosted
weight in EAS scheduler). Move background tasks to
/sys/fs/cgroup/stune/tasks (default weight). For services started
with init, set "foreground" services to boosted.

Change-Id: I0e489fad9510727c13e6754dabaf311c2391f395
2015-11-16 14:57:47 -08:00
Todd Kjos
ed60788968 Actively mangage EAS schedtune nodes
Move foreground tasks to /sys/fs/cgroup/stune/boost/tasks (boosted
weight in EAS scheduler). Move background tasks to
/sys/fs/cgroup/stune/tasks (default weight). For services started
with init, set "foreground" services to boosted.

Change-Id: I0e489fad9510727c13e6754dabaf311c2391f395
2015-11-16 08:53:04 -08:00
Gilad Arnold
1bc7888104 Fix permissions for /data/nativetest{,64}/tests.txt.
This is not an executable so we have to specifically set its permissions
accordingly.

Bug: 25668833
Change-Id: I502f69bad75b4da4fdc29eb3ebaa42a19ae04d27
2015-11-14 18:25:31 -08:00
Gilad Arnold
47af47f4c1 Sane ownership/permissions for directories in /data/nativetest{,64}.
This makes native test directories 750 root:shell. This matches the
value for files within those directories, and results in a more usable
access paradigm when (say) unprivileged test tools need to discover
these test binaries.

Bug: 25668833
Change-Id: I9bd2081b2c211b4383b5873238aaf64597756714
2015-11-12 14:34:57 -08:00
Daniel Erat
5510c13991 libcutils: Make /data/nativetest{,64}/* executable.
Make test files under /data/nativetest{,64} 0750 root:shell
to avoid needing to manually chmod them.

Bug: 25340994
Change-Id: I174cc226195907c0effa99063a8aa0082f85722b
2015-11-02 09:45:04 -07:00
Christopher Ferris
634df89db6 Make allocations use unique_ptr.
Change-Id: I4b84b8106faeaeb61847f8f9d13fd6444f474efd
2015-10-14 14:03:29 -07:00
Nick Kralevich
e2b2996d96 fs_config.c: remove setuid from procrank
procrank only exists on userdebug/eng builds. For those builds,
procrank can be executed by running "su 0 procrank" instead of
relying on the binary being setuid root. This reduces the number
of setuid binaries on Android and allows for the deletion of
SELinux policy to support this.

Bug: 18342188
Change-Id: I982283f2e0f6fbe5efaffc08501c1ec175f65373
2015-10-07 16:41:47 -07:00
Jorge Lucangeli Obes
fd7a9f79f2 am 66d32c74: Merge "Use CAP_MASK_LONG for file capabilities."
* commit '66d32c7488e12545218e83195738c95c183760ef':
  Use CAP_MASK_LONG for file capabilities.
2015-09-03 15:55:32 +00:00
Jorge Lucangeli Obes
66d32c7488 Merge "Use CAP_MASK_LONG for file capabilities." 2015-09-03 15:48:01 +00:00
Dan Willemsen
a4b8f9f1c2 am bfe32228: Merge "Remove USE_MINGW/CYGWIN; Whitelist windows modules"
* commit 'bfe322285fdbe86fdc01fdc4c711e22e894bdaee':
  Remove USE_MINGW/CYGWIN; Whitelist windows modules
2015-09-03 00:39:19 +00:00
Jorge Lucangeli Obes
e920c46e7d Use CAP_MASK_LONG for file capabilities.
Extract the |1ULL << $CAP_NAME| construct to a macro, to avoid
repeating it.

Change-Id: I9312c27130d7e6c5b6ab3b4cc5c70a6b98378b98
2015-09-02 17:18:44 -07:00
Dan Willemsen
87a419c8b1 Remove USE_MINGW/CYGWIN; Whitelist windows modules
CYGWIN is not supported, USE_MINGW and HOST_OS==windows are being
replaced with LOCAL_..._windows variables.

Bug: 23566667
Change-Id: I3e4a1e4097dc994cf5abdce6939e83a91758fd75
2015-09-02 17:10:35 -07:00
Nick Kralevich
eb45890579 am f4355868: Merge "android_memset.c: Use sanitized shifts"
* commit 'f4355868cbce0713331bbb04b063515d6de4c795':
  android_memset.c: Use sanitized shifts
2015-08-27 23:24:35 +00:00
Duane Sand
c348a88376 android_memset.c: Use sanitized shifts
Avoid checks and traps on msb=1 unsigned shifts.

Change-Id: I5203a4290296b5557c0420ce0debad3b60d48233
2015-08-27 14:32:17 -07:00
Nick Kralevich
b7699c6550 am e6d3cf39: Merge "android_memset.c: Use __attribute__((no_sanitize("integer")))"
* commit 'e6d3cf393749556d6bb6b8ea51bb1252cfb061f3':
  android_memset.c: Use __attribute__((no_sanitize("integer")))
2015-08-27 20:44:40 +00:00
Nick Kralevich
d9eda62875 android_memset.c: Use __attribute__((no_sanitize("integer")))
Turn off integer sanitization on android_memset. memset()ing is
expected to be a fast operation.

Avoid the use of the "while (size--) { }" construct, which harmlessly
underflows.

Change-Id: Ia61ff2323c759bf52df7e70b8be2fae0b0366dda
2015-08-27 13:14:36 -07:00
Nick Kralevich
212e4f1fe1 am d34f4198: Merge "strdup16to8.c: fix benign integer underflow."
* commit 'd34f419826e74640dfe88c50d171a0cd8580eeda':
  strdup16to8.c: fix benign integer underflow.
2015-08-27 18:01:44 +00:00
Nick Kralevich
2b98a9eec0 strdup16to8.c: fix benign integer underflow.
A size_t value is not allowed to go below zero.

Change-Id: Ic888c6605d911e0b5dbee1a2fe1daf41e616e106
2015-08-27 10:30:50 -07:00
Nick Kralevich
3192689b21 am 63141512: am 53f11b62: Merge "libcutils: enable LOCAL_SANITIZE := integer"
* commit '631415129c51a24cd5c9843694bd5283fe3b9345':
  libcutils: enable LOCAL_SANITIZE := integer
2015-08-26 18:51:02 +00:00
Nick Kralevich
78d632a01d am 38f4a139: am 532e6cde: Merge "libcutils: cleanups for -fsanitize=integer"
* commit '38f4a1391e499c2392cd8136061153cc35438eb3':
  libcutils: cleanups for -fsanitize=integer
2015-08-26 18:51:00 +00:00
Nick Kralevich
fc82dd9179 libcutils: enable LOCAL_SANITIZE := integer
Call abort() on undefined or sketchy integer behavior.
Protects against integer overflow attacks.

Tested on Nexus 5 and Nexus 9 with no obvious problems.

Change-Id: I6cb28b4a0f5feed69ea472dfac8804fb0bf99719
2015-08-26 11:32:31 -07:00
Nick Kralevich
7390478f19 libcutils: cleanups for -fsanitize=integer
Hash functions rely on overflow behavior, so whitelist them.

ATRACE_TAG_NOT_READY: use an unsigned constant when shifting bits.
Otherwise, the value overflows on shift. The users of this constant
assign it to a uint64_t variable.

Change-Id: I21c437ce2083525e906c3ead3259ec34a1ef4b66
2015-08-26 10:40:00 -07:00
Elliott Hughes
145afc2cc4 am fb1ecbc5: am e6e71608: Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS."
* commit 'fb1ecbc55e7edeafb138eb2a60ca89ba9a7b1f0f':
  Use __ANDROID__ instead of HAVE_ANDROID_OS.
2015-07-30 16:50:15 +00:00
Elliott Hughes
e6e71608bd Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS." 2015-07-30 16:34:47 +00:00
Elliott Hughes
9b828adfad Use __ANDROID__ instead of HAVE_ANDROID_OS.
Change-Id: I9967f3fd758c2a5b40be5b60ae72be7e2fb75136
2015-07-30 09:33:43 -07:00
Elliott Hughes
c6dbc85845 am 42dbc4b1: am 44443bea: Merge "Use _WIN32 rather than HAVE_WINSOCK."
* commit '42dbc4b1859fe4de16b19e9b74324b345c5fcb9d':
  Use _WIN32 rather than HAVE_WINSOCK.
2015-07-30 15:17:07 +00:00
Elliott Hughes
adbf442a51 Use _WIN32 rather than HAVE_WINSOCK.
Change-Id: I9855b6fe72e2f2f3a8360c0993a67cb988024ee4
2015-07-29 17:45:24 -07:00