Commit graph

49861 commits

Author SHA1 Message Date
Bernie Innocenti
ba394579cb Merge "Disallow operator!() on unique_fd" am: 0a887aa14c
am: c730327691

Change-Id: I6c3a19d5b9bd559d84e90aeaa7264a6c5c472e9d
2019-03-28 21:15:11 -07:00
Bernie Innocenti
c730327691 Merge "Disallow operator!() on unique_fd"
am: 0a887aa14c

Change-Id: I76c4bf585d1082e08cd01ba59b6b25b26c16ddad
2019-03-28 21:09:00 -07:00
Treehugger Robot
0a887aa14c Merge "Disallow operator!() on unique_fd" 2019-03-29 03:52:46 +00:00
Steven Moreland
e6132be529 libutils/libcutils: make host more like device
Having shared host libraries allows libraries depending on these to use
'shared_libs' for these. This simplifies configurations since these
libraries don't have to specify 'shared_libs' on all non-host targets.

Bug: 124524556
Test: build only

Change-Id: I09fb4a4fb66ea0a87cb76b1e6f400c537a11f082
2019-03-28 18:44:32 -07:00
Josh Gao
3705b346b9 adb: make adb reconnect perform a USB reset.
Bug: http://b/128941083
Test: manual
Change-Id: Iaf46d2c46cc82b590768004486d119244591c8e2
2019-03-28 15:47:44 -07:00
Tim Murray
1504cb5b6e Set /proc/pressure/memory file permissions
Change access mode and ownership for /proc/pressure/memory file
to allow system components access memory pressure information.

Bug: 129476847
Change-Id: I25b6bc9d47aee857936f050b66e7bee6363b53be
Signed-off-by: Tim Murray <timmurray@google.com>
2019-03-28 22:12:06 +00:00
Elliott Hughes
720c1ecc90 BSD grep: sync with upstream.
No significant changes, but this does get rid of our local modifications.

Bug: http://b/129089665
Test: builds
Change-Id: Ie6e3cc2198c302fc998fe6fcf027661e5dca88f0
2019-03-28 14:29:00 -07:00
Nick Kralevich
8f1e95e03e Merge "zip_writer.cc: update powerof2 and use it unconditionally" am: b86e248e8b am: 0fd9adf747
am: 707d0b6da5

Change-Id: Iac67cf33d1bd51920cd06741f9e39ab3ccabf3b8
2019-03-28 14:04:15 -07:00
Josh Gao
2a1fb09335 Merge "adbd: wait for FUNCTIONFS_BIND for up to a second, then retry." am: bfcb981b32 am: 80268fd592
am: 51ca488977

Change-Id: Ia4a29eedde07ea29b0a7650179330386ecf19af1
2019-03-28 14:02:31 -07:00
Nick Kralevich
707d0b6da5 Merge "zip_writer.cc: update powerof2 and use it unconditionally" am: b86e248e8b
am: 0fd9adf747

Change-Id: Id31eb3c2b8ae67dbe6c8d255879a6cc0543a5abe
2019-03-28 13:52:24 -07:00
Josh Gao
51ca488977 Merge "adbd: wait for FUNCTIONFS_BIND for up to a second, then retry." am: bfcb981b32
am: 80268fd592

Change-Id: I07a15442445e76d59cd1b6dff23ff5019eac0d45
2019-03-28 13:50:57 -07:00
Nick Kralevich
0fd9adf747 Merge "zip_writer.cc: update powerof2 and use it unconditionally"
am: b86e248e8b

Change-Id: I182bab95eb26b06d8d7a8f173519edae270660b2
2019-03-28 13:38:44 -07:00
Josh Gao
80268fd592 Merge "adbd: wait for FUNCTIONFS_BIND for up to a second, then retry."
am: bfcb981b32

Change-Id: I159c162a34246eca5196d5b41b7d7c46aa71c1ef
2019-03-28 13:37:41 -07:00
Nick Kralevich
b86e248e8b Merge "zip_writer.cc: update powerof2 and use it unconditionally" 2019-03-28 20:23:00 +00:00
Josh Gao
bfcb981b32 Merge "adbd: wait for FUNCTIONFS_BIND for up to a second, then retry." 2019-03-28 19:53:29 +00:00
Mark Salyzyn
0fef28fbd1 Merge "init: mount_handler: system-as-root (legacy)" am: a896e2aee5 am: 7bf190aa32
am: 6ecebbf94f

Change-Id: Ibe9647f702883eba8cfdb6135baf664b67c6968e
2019-03-28 12:03:14 -07:00
Mark Salyzyn
6ecebbf94f Merge "init: mount_handler: system-as-root (legacy)" am: a896e2aee5
am: 7bf190aa32

Change-Id: Idbd93068f8ab339a56bc790336e6130161e7eaa5
2019-03-28 11:45:38 -07:00
Mark Salyzyn
7bf190aa32 Merge "init: mount_handler: system-as-root (legacy)"
am: a896e2aee5

Change-Id: I884b45fbdf1d821db563174bbb9abb894b98f912
2019-03-28 11:37:20 -07:00
Treehugger Robot
a896e2aee5 Merge "init: mount_handler: system-as-root (legacy)" 2019-03-28 18:25:27 +00:00
Suren Baghdasaryan
9294e989b4 Merge "libprocessgroup: restrict SetupCgroups to one-time usage and only by init" am: 81cfeb54fc am: f5b778131b
am: bb07f38278

Change-Id: Id82e8ba93ba63e1fc0eb281531e062f32743f63e
2019-03-28 10:36:52 -07:00
Suren Baghdasaryan
bb07f38278 Merge "libprocessgroup: restrict SetupCgroups to one-time usage and only by init" am: 81cfeb54fc
am: f5b778131b

Change-Id: I9261786a87b46525c3642d33157e0a0863580d5d
2019-03-28 10:30:11 -07:00
Suren Baghdasaryan
f5b778131b Merge "libprocessgroup: restrict SetupCgroups to one-time usage and only by init"
am: 81cfeb54fc

Change-Id: I3b6f30348624462212d17655df6dde9aff71de15
2019-03-28 10:25:25 -07:00
Julien Desprez
61dea3d154 Add the basic config to run through atest
Add basic config that can run through atest the remount
script.
Very first step before being able to run in infra.

Test: atest adb-remount-sh
Bug: 117670584
Change-Id: I399f79fb7d7cd1b8a832be23efb3b625be693f7e
2019-03-28 10:21:02 -07:00
Suren Baghdasaryan
81cfeb54fc Merge "libprocessgroup: restrict SetupCgroups to one-time usage and only by init" 2019-03-28 17:13:09 +00:00
Martin Stjernholm
d2c8014b13 Merge "Apply the standard system linker config to all of /data." am: 60de348654 am: 0ec4836b71
am: e7540ff272

Change-Id: I928e2d7f4e274d753a23c7a10b647abefa6096b7
2019-03-28 05:59:01 -07:00
Martin Stjernholm
e7540ff272 Merge "Apply the standard system linker config to all of /data." am: 60de348654
am: 0ec4836b71

Change-Id: I10a4012575ad5f9be3c5dd3d116c5745124ae2e6
2019-03-28 05:54:18 -07:00
Martin Stjernholm
0ec4836b71 Merge "Apply the standard system linker config to all of /data."
am: 60de348654

Change-Id: I72caf5af3d65b695e0f240b0e55538d40d3b0c5b
2019-03-28 05:50:11 -07:00
Martin Stjernholm
60de348654 Merge "Apply the standard system linker config to all of /data." 2019-03-28 12:37:29 +00:00
David Anderson
4b519dc9ba Merge "init: Support booting off GSIs installed to non-userdata block devices." am: 5aa37dc3dc am: 34a9f9e204
am: f8fad9d9c9

Change-Id: I66eb282c44f03acf8abcb63f815acd4104160d0a
2019-03-28 03:21:46 -07:00
David Anderson
f8fad9d9c9 Merge "init: Support booting off GSIs installed to non-userdata block devices." am: 5aa37dc3dc
am: 34a9f9e204

Change-Id: I340913a23a717db7b2276fe319b01076a57bed79
2019-03-28 03:08:27 -07:00
David Anderson
34a9f9e204 Merge "init: Support booting off GSIs installed to non-userdata block devices."
am: 5aa37dc3dc

Change-Id: Ic9f9a6ea6e44dec0c7abe4d9ae19cb6ca67f8a0b
2019-03-28 02:59:43 -07:00
David Anderson
5aa37dc3dc Merge "init: Support booting off GSIs installed to non-userdata block devices." 2019-03-28 09:46:44 +00:00
Dimitry Ivanov
f6fd41c423 Merge "Add dependency on libdl_android" 2019-03-28 09:05:53 +00:00
Bernie Innocenti
7cb72c96b4 Disallow operator!() on unique_fd
This catches a common mistake where client code checks for errors using
the common idiom that works for std::iostream and other file-like
classes:

  unique_fd fd = open(...);
  if (!fd) {
  }

Test: atest libbase_test
Test: m droid
Change-Id: I9629a7795537ecb3b57be9c741c06f80967e4cc2
2019-03-28 15:56:07 +09:00
Suren Baghdasaryan
5b53573671 libprocessgroup: restrict SetupCgroups to one-time usage and only by init
SetupCgroups is called by init process during early-init stage and is not
supposed to be called again by anyone else. Ensure that the caller is the
init process, make sure cgroup.rc file is written only one time, keep the
file descriptor to cgroup.rc file open by the init process to ensure all
its further mappings stay valid even if the file is deleted.

Bug: 124774415
Test: build, run, verify no errors or warning in the logcat

Change-Id: Ib8822cf0112db7744e28d442182d54dcf06f46f2
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-28 01:25:22 +00:00
Victor Hsieh
c4430f3489 Merge "Initialize fs-verity keys in shell script" am: 7f43e9fa40 am: ef787edd24
am: 98d7696248

Change-Id: Ie144188d08d295b1c34b1593772f74fed96a4197
2019-03-27 13:51:14 -07:00
Mark Salyzyn
793f4b503e init: mount_handler: system-as-root (legacy)
On marlin, dev.mnt.blk.root is empty.  Issue is shared for all
devices that are system-as-root.

/dev/root /proc/mounts entry exists before the associated block device
is instantiated by ueventd.  As a result when the device shows up the
root mount is updated late when the next mount inotify trigger occurs,
delay which we will accept.  But the property entries are added before
removed in the loop which causes the ultimate property entry for root
to report empty. Add /dev/block/dm-0, remove /dev/root, for property
dev.mnt.blk.root.

Fix is to change to Remove before Adding.  Remove /dev/root, then add
/dev/block/dm-0.

On system-as-root as well, can not just use fstab.  Determine if a
dm-verity reference is wrapped around system and use that instead.

Add some additional filtration of loop and APEX mounts to reduce
property noise.

Fix issue with creating the std:string line holder from getline(3).

Test: manual on marlin
Bug: 124072565
Change-Id: Ief2e1a6f559cbcbc87273fc2db35c675bb972f43
2019-03-27 20:50:39 +00:00
Victor Hsieh
98d7696248 Merge "Initialize fs-verity keys in shell script" am: 7f43e9fa40
am: ef787edd24

Change-Id: Id4a6ad1f890e79acfff50c32b57c920f19518bd9
2019-03-27 13:47:01 -07:00
Victor Hsieh
ef787edd24 Merge "Initialize fs-verity keys in shell script"
am: 7f43e9fa40

Change-Id: Ie27114211fdea57171b92ad081517f897c8f5c56
2019-03-27 13:40:10 -07:00
Treehugger Robot
7f43e9fa40 Merge "Initialize fs-verity keys in shell script" 2019-03-27 20:31:19 +00:00
Yifan Hong
d9c1711a77 Merge "charger: android_get_control_file on last_kmsg" am: ee9ba3efe7 am: d8209aa315
am: 0f905a7977

Change-Id: I0f23d287fa2ba0da00a3b9ad5b42fe6c8e7157d6
2019-03-27 12:41:32 -07:00
Yifan Hong
0f905a7977 Merge "charger: android_get_control_file on last_kmsg" am: ee9ba3efe7
am: d8209aa315

Change-Id: I61f5e7dcca97aa5cf2d1e170d2e6a2e77eaf3dd9
2019-03-27 12:20:46 -07:00
Yifan Hong
d8209aa315 Merge "charger: android_get_control_file on last_kmsg"
am: ee9ba3efe7

Change-Id: I8fd2f518e0592c18f507de01df232deac492a4bf
2019-03-27 12:10:27 -07:00
Yifan Hong
ee9ba3efe7 Merge "charger: android_get_control_file on last_kmsg" 2019-03-27 19:01:07 +00:00
Josh Gao
19dc296305 adbd: wait for FUNCTIONFS_BIND for up to a second, then retry.
Occasionally, after we open the functionfs endpoint and write our
descriptors to it, we end up in a state where we never receive any
events from ep0, presumably due to a race against some other part of
the system, since adding sleeps reduces the likelihood. Add an
(arbitrarily chosen) timeout for the initial FUNCTIONFS_BIND we read,
and retry on failure.

Bug: http://b/128679787
Test: unplug and replug a blueline 14,000 times with a usb switch board
Change-Id: I4b3d5d552179ee7f3fefcc15f9575f793926f784
2019-03-27 18:04:45 +00:00
Martin Stjernholm
6ba5d996d7 Merge "Remove links to libart(d).so in the runtime." am: fdf70f1ba8 am: fd7f92372d
am: 0c0deebf98

Change-Id: If5fcd8b69ac72c436141140f155ad1c4d99524a4
2019-03-27 10:43:21 -07:00
Martin Stjernholm
0c0deebf98 Merge "Remove links to libart(d).so in the runtime." am: fdf70f1ba8
am: fd7f92372d

Change-Id: I98a351494d6cd9e4f79245bdb9b20fde3dccfe66
2019-03-27 10:35:54 -07:00
Martin Stjernholm
fd7f92372d Merge "Remove links to libart(d).so in the runtime."
am: fdf70f1ba8

Change-Id: Ife679137b14d56c18c34552d4babff3ccb083376
2019-03-27 10:25:45 -07:00
Nick Kralevich
6d3c80b85a zip_writer.cc: update powerof2 and use it unconditionally
Update the powerof2 macro to one that is integer overflow safe.
This definition is the same one used by bionic, but cleaned up using
clang_format.

Unconditionally use this powerof2 macro, to ensure consistency across
all the build environments.

Test: compiles and boots
Change-Id: I21bfaf2360d1f77caf96365e20490b1deadfdfe0
2019-03-27 10:24:44 -07:00
Treehugger Robot
fdf70f1ba8 Merge "Remove links to libart(d).so in the runtime." 2019-03-27 17:12:27 +00:00