Commit Graph

251037 Commits

Author SHA1 Message Date
Narayan Kamath
beade90fe3 Backport changes to whitelist sockets opened by the zygote. am: 41ca1bce01 am: 49d992fdb0 am: 67c4adb5c1 -s ours
am: bf16d345a6

Change-Id: Iedb9a7c7428cd8a5dc5aabaf9f1f88d96c8f022a
2016-09-08 08:49:59 +00:00
Narayan Kamath
bf16d345a6 Backport changes to whitelist sockets opened by the zygote. am: 41ca1bce01 am: 49d992fdb0
am: 67c4adb5c1  -s ours

Change-Id: I2af50f6d32be035f491df4a0b83489ba7da186e7
2016-09-08 08:44:31 +00:00
Narayan Kamath
67c4adb5c1 Backport changes to whitelist sockets opened by the zygote. am: 41ca1bce01
am: 49d992fdb0

Change-Id: I0560d831235bd7ba3ea764b23e64b4e08110d7e5
2016-09-08 08:34:58 +00:00
Narayan Kamath
49d992fdb0 Backport changes to whitelist sockets opened by the zygote.
am: 41ca1bce01

Change-Id: Id08676457fa3fa022d607e5de754f49b9c396261
2016-09-08 08:24:47 +00:00
Narayan Kamath
d18881d4f8 Merge "Backport changes to whitelist sockets opened by the zygote." into nyc-dev
am: 15ab539368

Change-Id: I88c0fde563218de25fb0fa9a6bd29abf0df44212
2016-09-08 07:47:24 +00:00
Narayan Kamath
abd5b05190 Backport changes to whitelist sockets opened by the zygote.
am: a1252ccbdb

Change-Id: Idd41ba2068102de067a66080da0563cf75b1e433
2016-09-08 07:41:44 +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
139ded758a Merge "docs: Added item to Support Library revision history" into nyc-dev
am: bdbed7857b

Change-Id: I9f7fe6847bb36d197174869ba6224d3db1581c0e
2016-09-08 00:04:52 +00:00
Andrew Solovay
e63f82734e docs: Added item to Support Library revision history
am: 89e77eb55c

Change-Id: Ia649f9e8f28697014153a2f29762426303292aa2
2016-09-08 00:04:48 +00:00
Scott Main
16fe510e03 Merge "revisions to the Building Your First app class with feedback from mpawlan (thank you!)" into nyc-dev
am: 9635756473

Change-Id: Ieae6cd0439d75e8858a16b44393fd248ddffcaa3
2016-09-07 23:51:47 +00:00
smain@google.com
78622206ce revisions to the Building Your First app class with feedback from mpawlan (thank you!)
am: 14f51a724e

Change-Id: I1a0d719e4aac12155cf0889069b8efd10084fe67
2016-09-07 23:51:44 +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
4e61df6258 Merge "docs: fix grammar mistake in TextureView" into nyc-dev
am: 2b05f12911

Change-Id: Ia4944106365d6c6c85b3cf2dc47250b160a5424b
2016-09-07 23:29:27 +00:00
Mark Lu
c657eed270 docs: fix grammar mistake in TextureView
am: e8691d19cb

Change-Id: I857deef5cf08c9cdaf0d6e8e99449e688bec5ba5
2016-09-07 23:29:20 +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
a28de3b8c5 Merge "DO NOT MERGE Stop work challenge freeform bypass" into nyc-dev
am: fb2cdce7c2

Change-Id: I50be838e9f0f9e794389f6d24a5e699d7f163caf
2016-09-07 22:15:30 +00:00
Robin Lee
ec5ceae174 DO NOT MERGE Stop work challenge freeform bypass
am: 0737c2b4c2

Change-Id: Ia76391f710e42e9634010bd211a0370230b318e3
2016-09-07 22:15:28 +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
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
75136ac15b Merge "Support library 24.2.0 API diff" into nyc-dev
am: 9d25bf73a4

Change-Id: I0f691281d86562c96ed0768efb69d6df77d29456
2016-09-07 20:59:53 +00:00
Alan Viverette
56477c1fcb Support library 24.2.0 API diff
am: ae3fecc1a9

Change-Id: Ie9a007ad44ae0293ef4c4138888da0e78d61b322
2016-09-07 20:59:49 +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
a2112ae2a0 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: I99751b55fb10e0fcd2703d59d8925744a73bcfd0
2016-09-07 20:36:47 +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
733e368097 Merge "docs: Fixing redirect file" into nyc-dev
am: 33831c02b5

Change-Id: I22a2c26b77c0ce27499ee1a9ba3567e6c337cf02
2016-09-07 20:25:45 +00:00
Andrew Solovay
7771476630 docs: Fixing redirect file
am: 5bf2ea6670

Change-Id: I8d1ea69862b543eb13c96398d967979e2040914a
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
d4c903e233 Merge "docs: Added note about CustomTabsIntent.setAlwaysUseBrowserUI" into nyc-dev
am: 4dc743ac67

Change-Id: Id0057e57b226cddb1411aa9c864143d704565013
2016-09-07 19:07:52 +00:00
Andrew Solovay
f2752e8f51 docs: Added note about CustomTabsIntent.setAlwaysUseBrowserUI
am: 7cfe9f83ac

Change-Id: Ia16702066a3760311eac69e4b2a8923380e77fde
2016-09-07 19:07:47 +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
Narayan Kamath
41ca1bce01 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:
-----------------------------------------------
- add /dev/__properties__ to the whitelist.

Change-Id: I709a7f4913e807a8fec8a58c81e98fe5b5222820
2016-09-07 19:06:04 +01: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
Sreevani Sreejith
bbc189dd96 Merge "docs: Added functional and UI quality criteria for Wear 2.0 apps. Bug:30951238" into nyc-dev
am: d2273e433c

Change-Id: I76ced02277404117c008fcea76ffafbd8ec39e82
2016-09-06 21:32:22 +00:00
sreevanis
bc59fba7d5 docs: Added functional and UI quality criteria for Wear 2.0 apps. Bug:30951238
am: 1e4bc15f31

Change-Id: I72bb425f9d40e73a9562312f990555673553bcc4
2016-09-06 21:32:17 +00:00
Sreevani Sreejith
d2273e433c Merge "docs: Added functional and UI quality criteria for Wear 2.0 apps. Bug:30951238" into nyc-dev 2016-09-06 21:24:34 +00:00
Amanda Kassay
efae2d7dd6 Update #jd-content to #body-content for DevSite layout changes.
am: b5887e68c3

Change-Id: I105828c530bb57aa367d8ae937a194cd1181ff0e
2016-09-06 19:11:56 +00:00
sreevanis
1e4bc15f31 docs: Added functional and UI quality criteria for Wear 2.0 apps.
Bug:30951238

Change-Id: I5cbfac60716415d87f049ae2313fed7bfa214e28
2016-09-06 10:37:04 -07:00
Amanda Kassay
b5887e68c3 Update #jd-content to #body-content for DevSite layout changes.
Change-Id: I57c43a9b05a2bd072c54bf53e8428015edf0a90e
2016-09-06 13:33:09 -04:00
Dirk Dougherty
87b4fcfd90 Doc change: remove useUpdatedTemplates script and sections using old templates.
am: 9ac575abc3

Change-Id: I7a9d976f300b516bc7f38dacb0c89be95f1b3ef4
2016-09-06 14:22:30 +00:00