Commit Graph

253725 Commits

Author SHA1 Message Date
Narayan Kamath
4407f375a0 Merge "Backport changes to whitelist sockets opened by the zygote." into nyc-dev
am: 15ab539368

Change-Id: I38d078326cae81c96e240b8a6c03f4a1289e94ea
2016-09-08 07:47:20 +00:00
Narayan Kamath
94e09df49b Backport changes to whitelist sockets opened by the zygote.
am: a1252ccbdb

Change-Id: I9f784675eae1aa7879848d397bb03226012e3d26
2016-09-08 07:41:43 +00:00
Narayan Kamath
15ab539368 Merge "Backport changes to whitelist sockets opened by the zygote." into nyc-dev 2016-09-08 07:30:46 +00:00
Andrew Solovay
31dc8fdccf Merge "docs: Added item to Support Library revision history" into nyc-dev
am: bdbed7857b

Change-Id: I7779d2bf4a1677330debd37740bcfba8b85b1b90
2016-09-07 23:53:26 +00:00
Andrew Solovay
ea55012efd docs: Added item to Support Library revision history
am: 89e77eb55c

Change-Id: I0dc851f894ea806de74029a117760c7f49013052
2016-09-07 23:53:12 +00:00
Scott Main
a4afe006b1 Merge "revisions to the Building Your First app class with feedback from mpawlan (thank you!)" into nyc-dev
am: 9635756473

Change-Id: I23b309642a1c7585031ea2853fa7e99bddffb83a
2016-09-07 23:46:09 +00:00
smain@google.com
4c3f1ada4f revisions to the Building Your First app class with feedback from mpawlan (thank you!)
am: 14f51a724e

Change-Id: Ia4f3094843947f7e0b92bb4430265ff884a05a9c
2016-09-07 23:46:05 +00:00
TreeHugger Robot
bdbed7857b Merge "docs: Added item to Support Library revision history" into nyc-dev 2016-09-07 23:45:39 +00:00
Scott Main
9635756473 Merge "revisions to the Building Your First app class with feedback from mpawlan (thank you!)" into nyc-dev 2016-09-07 23:39:52 +00:00
Mark Lu
9bf1f1e766 Merge "docs: fix grammar mistake in TextureView" into nyc-dev
am: 2b05f12911

Change-Id: I4317e54d15d3c0125f83a9d6b4e28f40823f15b0
2016-09-07 23:29:37 +00:00
Mark Lu
4ff96480b3 docs: fix grammar mistake in TextureView
am: e8691d19cb

Change-Id: I06b70cf94595bbb1b3903b1d17d201ac86f169a0
2016-09-07 23:29:26 +00:00
Mark Lu
2b05f12911 Merge "docs: fix grammar mistake in TextureView" into nyc-dev 2016-09-07 23:24:11 +00:00
Robin Lee
3485e31072 Merge "DO NOT MERGE Stop work challenge freeform bypass" into nyc-dev
am: fb2cdce7c2

Change-Id: Ib97afbd6e74bc4b35cd6a5014815c3f801078413
2016-09-07 22:15:27 +00:00
Robin Lee
2450fb3d59 DO NOT MERGE Stop work challenge freeform bypass
am: 0737c2b4c2

Change-Id: Ib613296306978c0bfbf1ea6e1dcdb7a72b867a55
2016-09-07 22:15:22 +00:00
TreeHugger Robot
fb2cdce7c2 Merge "DO NOT MERGE Stop work challenge freeform bypass" into nyc-dev 2016-09-07 22:07:21 +00:00
Andrew Solovay
89e77eb55c docs: Added item to Support Library revision history
See first comment for doc stage location.

bug: 30622244
Change-Id: I7cfdf2107d57d72565bcc4cc503242741f2452ff
2016-09-07 15:00:33 -07:00
Roshan Pius
4898225abc Merge "WifiManager: Remove unused methods" am: efb7bec56a
am: 718c90daf1

Change-Id: I8f2ead6f404dd3bdb1106d22f2fde756daef4cc8
2016-09-07 21:57:25 +00:00
Roshan Pius
718c90daf1 Merge "WifiManager: Remove unused methods"
am: efb7bec56a

Change-Id: I68d2ee571f04136a7c4babbdfa097d5449cc5ac3
2016-09-07 21:51:18 +00:00
Treehugger Robot
efb7bec56a Merge "WifiManager: Remove unused methods" 2016-09-07 21:43:20 +00:00
smain@google.com
14f51a724e revisions to the Building Your First app class with feedback from mpawlan (thank you!)
stage: https://android-dot-devsite.googleplex.com/training/basics/firstapp/creating-project.html

Change-Id: I40ce201553226fa36477e54b82721bc6cc85b88b
2016-09-07 21:09:27 +00:00
Alan Viverette
8bb074c737 Merge "Support library 24.2.0 API diff" into nyc-dev
am: 9d25bf73a4

Change-Id: I52810f4fc94086fd23b00bd381c82c71ee5fbfd7
2016-09-07 20:58:34 +00:00
Alan Viverette
f1a9168e91 Support library 24.2.0 API diff
am: ae3fecc1a9

Change-Id: Id53c9b41740e22ee7d14f6d037de63b000a7baff
2016-09-07 20:58:27 +00:00
Alan Viverette
9d25bf73a4 Merge "Support library 24.2.0 API diff" into nyc-dev 2016-09-07 20:54:07 +00:00
Narayan Kamath
cb948fc3fa Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc -s ours am: 9802fcfa2b am: 2acf9f7e3c am: 36b90a1934 am: 5febcdd210 am: ebcc7aeda9
am: f52b30cf8d

Change-Id: I9b47f64c25964c2ca1e91451f0a47002b5d01593
2016-09-07 20:37:01 +00:00
Narayan Kamath
f52b30cf8d Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc -s ours am: 9802fcfa2b am: 2acf9f7e3c am: 36b90a1934 am: 5febcdd210
am: ebcc7aeda9

Change-Id: Ie2e2292bbb8c6d274109d64f7dd3ed00fca0ba0f
2016-09-07 20:32:17 +00:00
Andrew Solovay
99ff24d0eb Merge "docs: Fixing redirect file" into nyc-dev
am: 33831c02b5

Change-Id: I581a03e4ae3bff311f1ae17dbaf2281d0389947b
2016-09-07 20:25:47 +00:00
Andrew Solovay
70b2481c87 docs: Fixing redirect file
am: 5bf2ea6670

Change-Id: I52063f29a2adee8e11c528c3268b26a0120c2afc
2016-09-07 20:25:43 +00:00
Narayan Kamath
ebcc7aeda9 Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc -s ours am: 9802fcfa2b am: 2acf9f7e3c am: 36b90a1934
am: 5febcdd210

Change-Id: Ib7e40acc4682e4198dcaab78c57de02acfe89c94
2016-09-07 20:23:28 +00:00
TreeHugger Robot
33831c02b5 Merge "docs: Fixing redirect file" into nyc-dev 2016-09-07 20:19:09 +00:00
Narayan Kamath
5febcdd210 Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc -s ours am: 9802fcfa2b am: 2acf9f7e3c
am: 36b90a1934

Change-Id: Iec55904ecb004d3bf89bf3a065e5811afae798d6
2016-09-07 20:17:02 +00:00
Narayan Kamath
36b90a1934 Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc -s ours am: 9802fcfa2b
am: 2acf9f7e3c

Change-Id: Ideae7875e299ec0292054aad85fe8aa92b6aba9b
2016-09-07 20:12:43 +00:00
Narayan Kamath
2acf9f7e3c Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc -s ours
am: 9802fcfa2b

Change-Id: Iabeefa7d07d78002c124ce62dc210111b83a99b7
2016-09-07 20:07:58 +00:00
Narayan Kamath
9802fcfa2b Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87
am: 9a409265fc  -s ours

Change-Id: Idf4dcc5ab7e8b0510848cbd2f220fe7a8e4b3e04
2016-09-07 20:01:56 +00:00
Narayan Kamath
a1252ccbdb Backport changes to whitelist sockets opened by the zygote.
This is the backport of the following commits :

Reopen whitelisted zygote file descriptors after a fork.

We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384

(cherry picked from commit c5f27a7cb2)

Fix clang build breakage (-Werror -Wformat).

Use %zd for size_t. Note that this will break only on (-plus-)aosp because
clang is disabled on the N development branches.

bug: 30963384

(cherry picked from commit b334c33d65)

Add a whitelist of sockets on fork.

Maintain a whitelist of AF_UNIX sockets that are permitted
to exist at the time of forking. If an open socket does not belong
to the whitelist (or is not AF_UNIX), the process will abort. If an
open socket is whitelisted, it will be redirected to /dev/null after
a sucessful fork. This allows us to unify our handling of the special
zygote sockets (/dev/socket/zygote[_secondary]) with the existing
whitelist of non socket file descriptors.

This change also removes non-fatal ALOGW messages since they have the
side effect of reopening the logging socket.

bug: 30963384

(cherry picked from commit 3764a260f0)

fd_utils: Remove whitelist for "/dev/pmsg0".

We're now calling __android_log_close prior to a fork, so this file
shouldn't need to be open.

bug: 31243313
bug: 30963384

(cherry picked from commit 8dee054190)

fd_utils: Fix broken usage of iterators.

There were two separate issues here :
- RestatInternal was using an iterator after a call to erase(). This
  will not work because it will be invalidated.
- The "standard" for loop idiom for iterating over a map while making
  structural changes to it is broken. Switch to a while loop and treat
  cases where elements are erased differently from cases where they
  aren't.

bug: 31092930
bug: 30963384

(cherry picked from commit 0b76d6a28e)

add dri device to zygote whitelisted FDs

The driver can be used just like /dev/ion for graphic buffers.

(cherry picked from commit 8977e424ee)
2016-09-07 20:54:17 +01:00
Andrew Solovay
64143cedfe Merge "docs: Added note about CustomTabsIntent.setAlwaysUseBrowserUI" into nyc-dev
am: 4dc743ac67

Change-Id: Ia0fa62280c8409ce774a5f3ffb90f71eb081e7e1
2016-09-07 19:07:49 +00:00
Andrew Solovay
9c6607a714 docs: Added note about CustomTabsIntent.setAlwaysUseBrowserUI
am: 7cfe9f83ac

Change-Id: Id52ee115f9aa58f87e9965dad972c9faa3e72fd6
2016-09-07 19:07:39 +00:00
TreeHugger Robot
4dc743ac67 Merge "docs: Added note about CustomTabsIntent.setAlwaysUseBrowserUI" into nyc-dev 2016-09-07 19:02:37 +00:00
Narayan Kamath
9a409265fc Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54
am: f7b9f84f87

Change-Id: I317cecff389f30c5d47e4adee1afafbde8d9d23d
2016-09-07 18:58:41 +00:00
Narayan Kamath
f7b9f84f87 Backport changes to whitelist sockets opened by the zygote.
am: 7ec85f9d54

Change-Id: I6db56b5b06636201382f6d908297644183253c0b
2016-09-07 18:53:40 +00:00
Andrew Solovay
5bf2ea6670 docs: Fixing redirect file
Devsite handles "redirect this directory tree" differently than DAC
did; as a result, a bunch of redirects were broken. (On Devsite, a
redirect ending in a slash redirects *only* paths that match it;
to redirect that directory and all its contents, end with /...)

Also deleted one redirect that wouldn't work (trying to redirect
foo.html#bar , which wouldn't work--the anchors are ignored on
devsite and there was a separate redirect for just foo.html).

When a redirect pointed *to* a path ending in slash -- but was clearly
meant to point to the directory itself (i.e. the /index.html file) --
I removed the trailing slash.

Redirects staged to https://android-dot-devsite.googleplex.com , so
they should all work there.

bug: 30748799
Change-Id: I6d090de5e6efa6ddb2bbe3e99fdbfb0ae02b88d5
2016-09-07 11:51:19 -07:00
Iliyan Malchev
be5d93b9d5 Merge changes from topic 'fix-nyc-dev-plus-aosp' into nyc-dev-plus-aosp
* changes:
  Move Status to libhidl
  Adds framework support for hidl-gen Java backend. (to support structs)
  Add Bool* APIs to HwParcel
  Link against libhidl for HidlSupport/svcmgr
  Support one-way methods in java support for hardware binder
  Initial commit of Java support for hardware binder
2016-09-07 18:22:47 +00:00
Narayan Kamath
7ec85f9d54 Backport changes to whitelist sockets opened by the zygote.
This is the backport of the following commits :

Commit c5f27a7cb2:
-----------------------------------------------

Reopen whitelisted zygote file descriptors after a fork.

We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384

Commit 3764a260f0:
-----------------------------------------------

Add a whitelist of sockets on fork.

Maintain a whitelist of AF_UNIX sockets that are permitted
to exist at the time of forking. If an open socket does not belong
to the whitelist (or is not AF_UNIX), the process will abort. If an
open socket is whitelisted, it will be redirected to /dev/null after
a sucessful fork. This allows us to unify our handling of the special
zygote sockets (/dev/socket/zygote[_secondary]) with the existing
whitelist of non socket file descriptors.

This change also removes non-fatal ALOGW messages since they have the
side effect of reopening the logging socket.

bug: 30963384

Commit 0b76d6a28e:
-----------------------------------------------
fd_utils: Fix broken usage of iterators.

There were two separate issues here :
- RestatInternal was using an iterator after a call to erase(). This
  will not work because it will be invalidated.
- The "standard" for loop idiom for iterating over a map while making
  structural changes to it is broken. Switch to a while loop and treat
  cases where elements are erased differently from cases where they
  aren't.

bug: 31092930
bug: 30963384

Plus additional changes:
-----------------------------------------------
- change std::unordered_map to std::tr1::unordered_map.
- add /dev/alarm and /dev/__properties__ to the whitelist.
- map.erase(iterator) returns void prior to C++11, so need the kludge
  of calling erase(it++).

Change-Id: I694ff66d5f227239b0190ffc2287882b16e336fa
2016-09-07 18:48:48 +01:00
Roshan Pius
32f3a3f940 Merge "WifiEnterpriseConfig: Refactor set/get field values" am: c4856bd73c
am: 655ae32d57

Change-Id: I2c5652450f774ed7841763898be7e3850af111a9
2016-09-07 16:00:36 +00:00
Roshan Pius
655ae32d57 Merge "WifiEnterpriseConfig: Refactor set/get field values"
am: c4856bd73c

Change-Id: Id78dd9286f755f4cd1a9057f42972b8bfdc5caa9
2016-09-07 15:55:32 +00:00
Roshan Pius
c4856bd73c Merge "WifiEnterpriseConfig: Refactor set/get field values" 2016-09-07 15:47:40 +00:00
Martijn Coenen
22fbcb49da Move Status to libhidl
Bug: 31226252

Change-Id: Ieb0adcf1fa71d6859324c2d83841685d1e1a22f8
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-07 15:10:55 +02:00
Andreas Huber
50546a98ed Adds framework support for hidl-gen Java backend. (to support structs)
Bug: 30575790
Change-Id: Ida30d8fe7a1b210e98f1a0ea5d429a0112f9ef3f
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-07 15:10:50 +02:00
Andreas Huber
e1eb45d8d6 Add Bool* APIs to HwParcel
Bug: 31045584
Change-Id: I202c4aa7caf92a4cd7e3a45ef6784638e41facc8
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-07 15:10:45 +02:00
Martijn Coenen
5f9e4f86e8 Link against libhidl for HidlSupport/svcmgr
Bug: 30839546
Change-Id: I52609576aa7f10da608725ef4ea78b778f127eef
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-07 15:10:39 +02:00
Andreas Huber
281ac40c97 Support one-way methods in java support for hardware binder
Bug: 30922538
Change-Id: I5ff93126a29f6bff42dee3f9868fa794ca7c077f
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-07 15:10:35 +02:00