Commit graph

49861 commits

Author SHA1 Message Date
David Anderson
0664f31dd0 Create /metadata/password_slots during boot.
This directory is used to store the Weaver/GateKeeper slot map so GSIs
do not overwrite host keys in secure storage.

Bug: 123716647
Test: /metadata/password_slots exists after boot
Change-Id: Ib0ca13edec38e68cba1fc2124465571feedc4be7
2019-03-05 22:18:14 -08:00
David Anderson
96296d5053 Merge "Use distinct GateKeeper userids when running a GSI." am: 5a465412b1 am: e4c58c492c
am: 8d6eff4fb5

Change-Id: If7a86010194cf7650b1fc6c8be70ac209bf958b2
2019-03-05 20:22:15 -08:00
Matthew Maurer
d44bd6ab5c Merge "Clang-format before updating storage proxy" am: 2d85880b49 am: 71e96ea355
am: 7c9ef814b1

Change-Id: I6fbbfbe767859f011bac81d2a56445b3c8651280
2019-03-05 19:39:51 -08:00
David Anderson
f0173d96d2 Merge "Support FiemapWriters that extend across multiple files." am: 925c78b7e8 am: 461c245b2e
am: a7a8e3c3cf

Change-Id: Id2ac5f42b980a6ebf65813702e5ae8cd346d00f9
2019-03-05 19:37:25 -08:00
David Anderson
8d6eff4fb5 Merge "Use distinct GateKeeper userids when running a GSI." am: 5a465412b1
am: e4c58c492c

Change-Id: I7f0515095e883a4a42f5fa738388c85fa4e81951
2019-03-05 19:37:22 -08:00
David Anderson
dd00737e15 Merge "Add more filesystem support to libfiemap_writer." am: 79a43cf135 am: 90c7e99998
am: 35bf6c9a82

Change-Id: Ifb00977cf5fd243f890972cb35dc13d052c7471e
2019-03-05 19:26:24 -08:00
David Anderson
e4c58c492c Merge "Use distinct GateKeeper userids when running a GSI."
am: 5a465412b1

Change-Id: Ic4e18aa3253a6b5d00e441a47b025e1a2b09cf24
2019-03-05 19:22:10 -08:00
David Anderson
5a465412b1 Merge "Use distinct GateKeeper userids when running a GSI." 2019-03-06 02:40:03 +00:00
Matthew Maurer
7c9ef814b1 Merge "Clang-format before updating storage proxy" am: 2d85880b49
am: 71e96ea355

Change-Id: Iac10899a94dc084eecab080cd1f45c17d2975212
2019-03-05 18:20:27 -08:00
David Anderson
a7a8e3c3cf Merge "Support FiemapWriters that extend across multiple files." am: 925c78b7e8
am: 461c245b2e

Change-Id: I033fa0548bcbf3fd7e64336c8bdd04463abbb5e5
2019-03-05 18:18:19 -08:00
David Anderson
35bf6c9a82 Merge "Add more filesystem support to libfiemap_writer." am: 79a43cf135
am: 90c7e99998

Change-Id: I15c3870f7d6c8c705daec0465c94c069e5df4351
2019-03-05 18:09:49 -08:00
Matthew Maurer
57ba8c58fc Add support for RPMB over VirtIO Serial
In order to test Trusty gatekeeper automatically, the storage proxy
needs to be active inside the emulator. This patch allows storageproxyd
to speak a length-framed RPMB to an external RPMB daemon.

For a concrete example of a daemon speaking this protocol, see rpmb_dev
in the Trusty tree.

Bug: 124277696
Test: Launch storageproxyd with -t virt, use Trusty test infra
Change-Id: I391d4768976f0eb1f3b8df58eefd58fc3a9409cd
2019-03-05 17:25:57 -08:00
Matthew Maurer
71e96ea355 Merge "Clang-format before updating storage proxy"
am: 2d85880b49

Change-Id: I4326644ebc3f14c72c97c9fdb279026d97aee0ac
2019-03-05 17:25:11 -08:00
Treehugger Robot
2d85880b49 Merge "Clang-format before updating storage proxy" 2019-03-06 00:53:25 +00:00
David Anderson
461c245b2e Merge "Support FiemapWriters that extend across multiple files."
am: 925c78b7e8

Change-Id: I669d3955b3fd704ad14d6cb276120d0f3d0c8f11
2019-03-05 16:38:06 -08:00
David Anderson
90c7e99998 Merge "Add more filesystem support to libfiemap_writer."
am: 79a43cf135

Change-Id: Ib3c6d2515ae45aaf28db18a1bc1729bf0a074a66
2019-03-05 16:29:45 -08:00
Suren Baghdasaryan
3f6e291c6b Merge "Add min_score_adj into LmkKillOccurred event" am: a953ae0546 am: efcab54b55
am: a4bd8777d3

Change-Id: I1c55bd0e3ab771e20cd77250ade6ee20f9e50cce
2019-03-05 16:23:28 -08:00
Jim Blackler
3122649ed7 [automerger skipped] Add start time to LmkKillOccurred
am: e7a9fabd64 -s ours
am skip reason: change_id I4ef6433391c8758626334731d2b5de038e4468ae with SHA1 1417cdbddb is in history

Change-Id: I0b6eb14568d480b13fd0cea14863a9ad4c14c0cd
2019-03-05 16:15:29 -08:00
Suren Baghdasaryan
a4bd8777d3 Merge "Add min_score_adj into LmkKillOccurred event" am: a953ae0546
am: efcab54b55

Change-Id: I0c1f8f60ef70181e4d3e1399eae45723040174f5
2019-03-05 16:14:07 -08:00
Rajeev Kumar
053a4cb64d [automerger skipped] Read memory stats from /proc/pid/stat file.
am: e7cfa67a05 -s ours
am skip reason: change_id Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd with SHA1 fe31bef940 is in history

Change-Id: I3c357f360da2969e1850f32419e4b074bbe17e21
2019-03-05 16:10:57 -08:00
Jim Blackler
ad7e273363 [automerger skipped] Add start time to LmkKillOccurred am: 962e0442d1 -s ours
am: b68fe506e0 -s ours
am skip reason: change_id I4ef6433391c8758626334731d2b5de038e4468ae with SHA1 34c3cb84a0 is in history

Change-Id: I2521241013c39d3cc16f45b1df996135f92a053f
2019-03-05 15:48:51 -08:00
Rajeev Kumar
452f0ca26c [automerger skipped] Read memory stats from /proc/pid/stat file. am: 2bc24f88ca -s ours
am: 9eee2302ee -s ours
am skip reason: change_id Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd with SHA1 4dbc24d393 is in history

Change-Id: I42d2080003936bcf99fec6917fe5e52366855c07
2019-03-05 15:48:03 -08:00
Jim Blackler
e7a9fabd64 Add start time to LmkKillOccurred
This is to measure an application's behavior with respect to being LMKed
(the longer an app lives before being LMKed, the better).

Bug: 119854389
Test: Manual
Change-Id: I4ef6433391c8758626334731d2b5de038e4468ae
Merged-In: I4ef6433391c8758626334731d2b5de038e4468ae
(cherry picked from I4ef6433391c8758626334731d2b5de038e4468ae)
2019-03-05 15:47:56 -08:00
Rajeev Kumar
e7cfa67a05 Read memory stats from /proc/pid/stat file.
(cherry pick from commit 0301683e49)
Bug: 117333340
Test: Manual testing using alloc-stress tool
Merged-In: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd

Change-Id: I8ab08606dba7de2f65711204453067dbfbdcbdd8
2019-03-05 15:46:07 -08:00
Jim Blackler
b68fe506e0 [automerger skipped] Add start time to LmkKillOccurred
am: 962e0442d1 -s ours
am skip reason: change_id I4ef6433391c8758626334731d2b5de038e4468ae with SHA1 1417cdbddb is in history

Change-Id: I56f76418a5c6a3435dec766d731068f60bd4b642
2019-03-05 15:27:13 -08:00
Rajeev Kumar
9eee2302ee [automerger skipped] Read memory stats from /proc/pid/stat file.
am: 2bc24f88ca -s ours
am skip reason: change_id Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd with SHA1 4dbc24d393 is in history

Change-Id: I5676596b2ee9f7448faa0b0274ac9425c7525fb0
2019-03-05 15:26:28 -08:00
Suren Baghdasaryan
efcab54b55 Merge "Add min_score_adj into LmkKillOccurred event"
am: a953ae0546

Change-Id: Ib1a35290221974736f86eda9db57e27e831a4813
2019-03-05 15:11:38 -08:00
David Anderson
925c78b7e8 Merge "Support FiemapWriters that extend across multiple files." 2019-03-05 23:06:19 +00:00
Sudheer Shanka
cabc52646a Allow callers to pass a flag to not link obb dirs of multiple users.
Bug: 110960295
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Change-Id: I738e7e6365fb4917f1172c578281e1835a5012c2
2019-03-05 14:41:54 -08:00
Jim Blackler
962e0442d1 Add start time to LmkKillOccurred
This is to measure an application's behavior with respect to being LMKed
(the longer an app lives before being LMKed, the better).

Bug: 119854389
Test: Manual
Change-Id: I4ef6433391c8758626334731d2b5de038e4468ae
Merged-In: I4ef6433391c8758626334731d2b5de038e4468ae
(cherry picked from I4ef6433391c8758626334731d2b5de038e4468ae)
2019-03-05 11:53:17 -08:00
Rajeev Kumar
2bc24f88ca Read memory stats from /proc/pid/stat file.
(cherry pick from commit 0301683e49)
Bug: 117333340
Test: Manual testing using alloc-stress tool
Merged-In: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd

Change-Id: I8ab08606dba7de2f65711204453067dbfbdcbdd8
2019-03-05 11:53:14 -08:00
Mark Salyzyn
55f7ad53de Merge "fs_mgr: remount: add partition argument list" am: 4c46285e2e am: 14fea4f7a2
am: b6f63c5f1e

Change-Id: Ibc0bf49626dd4c8990f991e40239c9326ce50b8a
2019-03-05 10:29:49 -08:00
Mark Salyzyn
b6f63c5f1e Merge "fs_mgr: remount: add partition argument list" am: 4c46285e2e
am: 14fea4f7a2

Change-Id: I065001cbfb323245c9513d129f6e2e682a3b93de
2019-03-05 10:24:30 -08:00
Mark Salyzyn
14fea4f7a2 Merge "fs_mgr: remount: add partition argument list"
am: 4c46285e2e

Change-Id: I343332051ac7a99822d940e5e3d69af12d541c0b
2019-03-05 10:20:12 -08:00
David Anderson
79a43cf135 Merge "Add more filesystem support to libfiemap_writer." 2019-03-05 18:14:53 +00:00
Suren Baghdasaryan
a953ae0546 Merge "Add min_score_adj into LmkKillOccurred event" 2019-03-05 18:06:46 +00:00
Mark Salyzyn
4c46285e2e Merge "fs_mgr: remount: add partition argument list" 2019-03-05 17:49:30 +00:00
Florian Mayer
3d67d347f5 Fix copy / move behaviour of Maps object.
Currently, moving or copying a Maps object leads to double free of MapInfo.

Even moving a Maps object  did not prevent this, as after a move
the object only has to be in an "unspecified but valid state", which can
be the original state for a vector of raw pointers (but not for a vector
of unique_ptrs).

Changing to unique_ptrs is the most failsafe way to make sure we never
accidentally destruct MapInfo.

Test: atest libuwindstack_test
      Failed LocalUnwinderTest#unwind_after_dlopen which also fails at master.

Change-Id: Id1c9739b334da5c1ba532fd55366e115940a66d3
2019-03-05 13:05:36 +00:00
Suren Baghdasaryan
ec5e4c6eb1 Add min_score_adj into LmkKillOccurred event
Log min_score_adj when lmkd kills a process to determine the oom_score
levels that lmkd considers during the kill.

Bug: 123024834
Change-Id: I986ae8f2808199b1654bc8d2a32dd88046c79aa3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-05 09:51:06 +00:00
Jiyong Park
8502ed308d Access apex sysprops via the generated API
Bug: 125549215
Test: m
Change-Id: Ie9b0aa5eec5931da3512d77613b034e5bd760f3e
2019-03-05 16:22:55 +09:00
Jiyong Park
b537934ab7 Merge changes from topic "apex_earlymount_base" am: c676cca4f6 am: a192ff7ad3
am: 7e933b1e07

Change-Id: I038cfec65219659dbd0ae6a886476be7aeb25d5b
2019-03-04 23:14:51 -08:00
Jiyong Park
27e93c1f11 mount /apex during first_stage init am: 4ba548d845 am: 854c5bc218
am: 5675349df0

Change-Id: Ic97ed52ae158225945542bc810a4ac5295c05f39
2019-03-04 23:14:03 -08:00
Jiyong Park
7e933b1e07 Merge changes from topic "apex_earlymount_base" am: c676cca4f6
am: a192ff7ad3

Change-Id: I5c3603ace0237ce810f820b456a7d3b9b4c113ff
2019-03-04 23:10:28 -08:00
Jiyong Park
5675349df0 mount /apex during first_stage init am: 4ba548d845
am: 854c5bc218

Change-Id: Ib7e3399d826c82874dea21b6e416c937693a5420
2019-03-04 23:09:48 -08:00
Jiyong Park
a192ff7ad3 Merge changes from topic "apex_earlymount_base"
am: c676cca4f6

Change-Id: I417eb7fffbaa2c495b8dc1c1c10e5683ebafcc84
2019-03-04 23:03:13 -08:00
Jiyong Park
854c5bc218 mount /apex during first_stage init
am: 4ba548d845

Change-Id: I2f86489449b0a81c4173981a8ffe1bcb945df129
2019-03-04 23:02:24 -08:00
Treehugger Robot
c676cca4f6 Merge changes from topic "apex_earlymount_base"
* changes:
  Activate system APEXes early
  mount /apex during first_stage init
2019-03-05 06:49:02 +00:00
Jiyong Park
dcbaf9f41b Activate system APEXes early
Summary: Boot sequence around apexd is changed to make it possible for
pre-apexd processes to use libraries from APEXes. They no longer need to
wait for the apexd to finish activating APEXes, which again can be
done only after /data/ is mounted. This improves overall boot
performance.

Detail: This change fixes the problem that processes that are started
before apexd (so called pre-apexd processes) can't access libraries
that are provided only by the APEXes but are not found in the system
partition (e.g. libdexfile_external.so, etc.). Main idea is to activate
system APEXes (/system/apex/*.apex) before /data is mounted and then
activate the updated APEXes (/data/apex/*.apex) after the /data mount.

Detailed boot sequence is as follows.

1) init prepares the bootstrap and default mount namespaces. A tmpfs is
mounted on /apex and the propagation type of the mountpoint is set to
private.

2) before any other process is started, apexd is started in bootstrap
mode. When executed in the mode, apexd only activates APEXes under
/system/apex. Note that APEXes activated in this phase are mounted in
the bootstrap mount namespace only.

3) other pre-apexd processes are started. They are in the bootstrap
mount namespace and thus are provided with the libraries from the system
APEXes.

4) /data is mounted. init switches into the default mount namespace and
starts apexd as a daemon as usual.

5) apexd scans both /data/apex and /system/apex, and activate latest
APEXes from the directories. Note that APEXes activated in this phase
are mounted in the default namespaces only and thus are not visible to
the pre-apexd processes.

Bug: 125549215
Test: m; device boots
Change-Id: I21c60d0ebe188fa4f24d6e6861f85ca204843069
2019-03-05 09:47:49 +09:00
Mark Salyzyn
2085759c6d Merge "adb: use /system/bin/remount command" am: d458066bc7 am: bc0887add7
am: be17923ece

Change-Id: Iaf7574caa4b4ee23acc864d7eeaf3a095394c215
2019-03-04 14:51:39 -08:00
Mark Salyzyn
be17923ece Merge "adb: use /system/bin/remount command" am: d458066bc7
am: bc0887add7

Change-Id: I3f6725ac4cbb181210f1f91b159cd31674f1b690
2019-03-04 14:46:35 -08:00