Commit Graph

41224 Commits

Author SHA1 Message Date
Tom Cherry ca731d29e9 [automerger skipped] Merge "init: allow entering of network namespaces" into pi-dev
am: 9ad11c0eee  -s ours

Change-Id: Ia8702489ed92bcb13259f6e7d3c8cfbb0a31f257
2018-05-22 10:29:04 -07:00
Tom Cherry 9ad11c0eee Merge "init: allow entering of network namespaces" into pi-dev 2018-05-22 17:13:41 +00:00
Christopher Ferris a81967ea15 [automerger skipped] Merge "Fix bug when doing signal handler lookup." into pi-dev
am: 1ddef8852a  -s ours

Change-Id: I62382ee276436975d61883e1e21ef3a566b1ce8e
2018-05-22 09:33:44 -07:00
Christopher Ferris 1ddef8852a Merge "Fix bug when doing signal handler lookup." into pi-dev 2018-05-22 16:24:45 +00:00
Tom Cherry 6532c78536 Merge "init: separate out epoll into a class" am: c5fbf494e7
am: aaab7d69b5

Change-Id: I2c3b9eef33128e8a3e91ae1d2dda988f15080a06
2018-05-22 08:13:36 -07:00
Tom Cherry aaab7d69b5 Merge "init: separate out epoll into a class"
am: c5fbf494e7

Change-Id: Ie92d8daa09eb60cf0a1a297a5546be54e7f9b2c3
2018-05-22 08:09:06 -07:00
Tom Cherry c5fbf494e7 Merge "init: separate out epoll into a class" 2018-05-22 15:01:08 +00:00
Jiyong Park dfe433db47 Merge "Mark as recovery_available: true" am: 9f6f8bf0dc
am: d7fece5d91

Change-Id: Id59445da13aeef13784f04daebc8a96a7d506cbb
2018-05-21 22:32:36 -07:00
Logan Chien 49d9162832 Merge "Add files to CleanSpec.mk" into pi-dev
am: 93d48fe0b6

Change-Id: I2a1954820be0c4fe94b6a2c0bb0fe8e3bc485f85
2018-05-21 22:30:54 -07:00
TreeHugger Robot 93d48fe0b6 Merge "Add files to CleanSpec.mk" into pi-dev 2018-05-22 05:26:16 +00:00
Jiyong Park d7fece5d91 Merge "Mark as recovery_available: true"
am: 9f6f8bf0dc

Change-Id: I6f45b13fcfe21c55ba5e513383bd69b9a1fc185c
2018-05-21 22:24:54 -07:00
Treehugger Robot 9f6f8bf0dc Merge "Mark as recovery_available: true" 2018-05-22 05:16:20 +00:00
TreeHugger Robot bbda5b6092 Merge "resolve merge conflicts of 20686f061e to pi-dev-plus-aosp" into pi-dev-plus-aosp 2018-05-22 04:57:53 +00:00
Logan Chien 26689d22d5 Merge "Always use versioned VNDK directory" am: dda4678a11
am: 3abbb4cb00

Change-Id: Ifa93610f944f66ef510790266b8a210562bbbd7d
2018-05-21 21:16:35 -07:00
Logan Chien 3abbb4cb00 Merge "Always use versioned VNDK directory"
am: dda4678a11

Change-Id: Ie4624b1be1f3ff2c3f82362e6a4e0da6c553c666
2018-05-21 21:09:39 -07:00
Logan Chien dda4678a11 Merge "Always use versioned VNDK directory" 2018-05-22 04:04:07 +00:00
Suren Baghdasaryan 3862dd3685 resolve merge conflicts of 20686f061e to pi-dev-plus-aosp
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I02b5973366351604bf46df7ad4e2235b1dda014a
2018-05-21 19:48:47 -07:00
Bowgo Tsai fead00c7d8 [automerger skipped] Merge changes from topic "generic_by_name" into pi-dev
am: 34de3c84fe  -s ours

Change-Id: I4bbcfafd21370d14d796fff341d5bf83b91fff95
2018-05-21 16:28:16 -07:00
Suren Baghdasaryan 20686f061e lmkd: Do not set soft_limit_in_bytes on high-end devices
Setting memory.soft_limit_in_bytes on high-end devices with large memory
reserves affects performance of memory-hungry applications that have
large workingsets and keep thrashing because of the memory limits imposed.
Limit the usage of memory.soft_limit_in_bytes to low-memory devices only.
Add debug messages for future troubleshooting to capture cases when
vmpressure events are being ignored.

Bug: 78916015
Test: collect vmstat while running a heavy app
Change-Id: Ib4434b96d2be802ef89960b573486eae8d12f198
Merged-In: Ib4434b96d2be802ef89960b573486eae8d12f198
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-05-21 23:17:46 +00:00
TreeHugger Robot 34de3c84fe Merge changes from topic "generic_by_name" into pi-dev
* changes:
  Adds /dev/block/by-name/<partition> symlinks
  Removing block device by-num symlinks
2018-05-21 23:14:38 +00:00
Luis Hector Chavez c52d7d387e Merge changes I4d6da40d,I91c7ced5,I7b9f6d18 am: 2fa9770c3a
am: 2571b1f0a7

Change-Id: If8e98b0f9aca81245ecb15a1e1e65dcbd1f3b87d
2018-05-21 15:55:32 -07:00
Luis Hector Chavez 2571b1f0a7 Merge changes I4d6da40d,I91c7ced5,I7b9f6d18
am: 2fa9770c3a

Change-Id: I945e8858089139b77986efe3400da7825690d3f7
2018-05-21 15:51:00 -07:00
Treehugger Robot 2fa9770c3a Merge changes I4d6da40d,I91c7ced5,I7b9f6d18
* changes:
  adb: Add a test for emulator connection
  adb: Improve test_adb a bit more
  adb: Add a way to reconnect TCP transports
2018-05-21 22:37:21 +00:00
Mark Salyzyn 6c6ec7240c init: separate out epoll into a class
Test: init_tests
Bug: 64114943
Change-Id: I5f03314773b02b9e30e8e21895b6bdcfd4909e88
2018-05-21 14:58:03 -07:00
Jordan Liu 2f51c3ec25 Merge "Add a new directory to store downloaded apns" am: e0a52774b4
am: c25eeeca52

Change-Id: I0e4fc27f07aea7a050ed06d7206256319d4204bc
2018-05-21 14:49:10 -07:00
Christopher Ferris d299a7ab58 Fix bug when doing signal handler lookup.
The new lld linker uses all non-zero offset executable maps. There was
a bug when trying to find if the stack is in a signal handler that caused
the code to read the wrong place in the elf. Fixed by not adding the elf
offset to the relative pc.

Also fixed the unwind_for_offline tool to dump multiple stacks if necessary.

Added new offline unit test that would have failed with the old code.

Bug: 79936827

Test: Ran unit tests and libbacktrace unit tests.
Test: Dumped backtraces of system pids.
Test: Ran 137-cfi art test.
Change-Id: Iaca8c18c2a314902e64c3f72831234297e8dcb1b
Merged-In: Iaca8c18c2a314902e64c3f72831234297e8dcb1b
(cherry picked from commit 239425b9fa)
2018-05-21 21:33:02 +00:00
Jordan Liu c25eeeca52 Merge "Add a new directory to store downloaded apns"
am: e0a52774b4

Change-Id: I6c4c9df2b380e633aa11b7fa42ccdf19a6d39e52
2018-05-21 14:21:01 -07:00
Jordan Liu e0a52774b4 Merge "Add a new directory to store downloaded apns" 2018-05-21 19:06:54 +00:00
Paul Crowley 36bd69f826 Add option to create metadata mount point
am: fe305ab286

Change-Id: If035ab553e75afd4ac6e07ee1c97d6218c3ce397
2018-05-21 10:46:33 -07:00
Niklas Lindgren fd66538ef3 Add a new directory to store downloaded apns
downloaded apns-conf.xml will be stored in the folder
/data/misc/apns/ to make sure TelephonyProvider gets
access.

Bug: 79948106
Test: Manual
Change-Id: I4ba0596fa6523c0eb96328dbe46ead02587bd9b8
2018-05-21 18:48:28 +02:00
Tom Cherry 2fa7451e9b init: allow entering of network namespaces
Add the ability to enter a network namespace when launching a service.
Typical usage of this would be something similar to the below:

on fs
  exec ip netns add namespace_name

service vendor_something /vendor/...
  capabilities <lower than root>
  user not_root
  enter_namespace net /mnt/.../namespace_name

Note changes to the `ip` tool are needed to create the namespace in
the correct directory.

Bug: 73334854
Test: auto team verified
Merged-In: Ifa91c873d36d69db399bb9c04ff2362518a0b07d
Change-Id: Ifa91c873d36d69db399bb9c04ff2362518a0b07d
(cherry picked from commit aead51b418)
2018-05-21 15:52:13 +00:00
Josh Gao dfb5b4b1ad Merge "debuggerd: fix CrasherTest.seccomp_crash_oom." am: 74bf81443f
am: 10537510a8

Change-Id: I1266f8c5763032719f2f445d5eb6e764ca21a899
2018-05-18 19:24:27 -07:00
Josh Gao 10537510a8 Merge "debuggerd: fix CrasherTest.seccomp_crash_oom."
am: 74bf81443f

Change-Id: I6fda76a0e7c0a5f699d590949dda3855fdb56128
2018-05-18 19:19:49 -07:00
Treehugger Robot 74bf81443f Merge "debuggerd: fix CrasherTest.seccomp_crash_oom." 2018-05-19 02:14:33 +00:00
Bowgo Tsai b1b8dac123 Merge "Adds /dev/block/by-name/<partition> symlinks" am: 98214c81d1
am: d91d5ecd8b

Change-Id: Id5e75503a0fcc0df1e823d02fefb6e05db5de154
2018-05-18 19:02:55 -07:00
Bowgo Tsai d91d5ecd8b Merge "Adds /dev/block/by-name/<partition> symlinks"
am: 98214c81d1

Change-Id: Ie6d1520782e47a194a4a001407b25fcaa0765425
2018-05-18 18:55:48 -07:00
Treehugger Robot 98214c81d1 Merge "Adds /dev/block/by-name/<partition> symlinks" 2018-05-19 01:45:21 +00:00
Bowgo Tsai 5ee7dae840 Adds /dev/block/by-name/<partition> symlinks
During uevent processing, some "by-name" symlinks will be created.
    /dev/block/<type>/<device>/by-name/<partition>

<type> can be: platform, pci or vbd.
<device> might be: soc.0/f9824900.sdhci, soc.0/f9824900.sdhci, etc.
<partition> might be: system, vendor, system_a, system_b, etc.

e.g., on a non-A/B device:
    /dev/block/platform/soc.0/f9824900.sdhci/by-name/system
    /dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor

On a A/B device:
    /dev/block/platform/soc/1da4000.ufshc/by-name/system_a
    /dev/block/platform/soc/1da4000.ufshc/by-name/system_b
    /dev/block/platform/soc/1da4000.ufshc/by-name/vendor_a
    /dev/block/platform/soc/1da4000.ufshc/by-name/vendor_b

However, those symlinks are "device-specific".

This change adds the "generic" symlinks in ueventd, in addition to
the existing symlinks, when the possible "boot devices" are specified
in device tree. e.g.,

    &firmware_android {
	compatible = "android,firmware";
	boot_devices ="soc/1da4000.ufshc,soc.0/f9824900.sdhci";
    }

The following symlinks will then be created on the aforementioned non-A/B
and A/B devices, respectively.

    /dev/block/by-name/system
    /dev/block/by-name/vendor

    /dev/block/by-name/system_a
    /dev/block/by-name/system_b
    /dev/block/by-name/vendor_a
    /dev/block/by-name/vendor_b

Note that both <type> and <device> are skipped in the newly create symlinks.
It assumes there is no more than one devices with the same <partition>,
which is the assumption of current first stage mount flow.

Finally, when 'boot_devices' in DT is absent, it fallbacks to extract
'boot_devices' from fstab settings. e.g., using 'soc/1da4000.ufshc',
'soc.0/f9824900.sdhci' for a fstab with the following content:

   /dev/block/platform/soc/1da4000.ufshc/by-name/system
   /dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor

Bug: 78613232
Test: adb shell ls /dev/block/by-name
Change-Id: Iec920b5a72409b6a2bdbeeb290f0a3acd2046b5d
Merged-In: Iec920b5a72409b6a2bdbeeb290f0a3acd2046b5d
(cherry picked from commit 8eec38f4e4)
2018-05-19 09:31:35 +08:00
Bowgo Tsai ff17cc31e5 Removing block device by-num symlinks
The uevent.partition_num easily collides between partitions, for
example:

  Both /dev/block/sda3 and /dev/block/sdd3 will generate the same symlink:
    /dev/block/platform/soc/1da4000.ufshc/by-num/p3

This change remove those by-num symlinks as there seems no effective
user of it.

Bug: 78613232
Test: m init_tests && \
      adb push $OUT/data/nativetest64/init_tests/init_tests /data/. && \
      adb shell /data/init_tests

Change-Id: I8dfa8dc1a2f9fc9296aa30f33e905bf158b501de
Merged-In: I8dfa8dc1a2f9fc9296aa30f33e905bf158b501de
(cherry picked from commit 95591bd00e)
2018-05-19 09:28:42 +08:00
Tom Cherry 4be0c5a21a Merge "init: allow entering of network namespaces" am: 4bfbd8e9a5
am: e2f95984ba

Change-Id: I72f49a3dcd0175fa4a2f0cf363a99846bdacc4b2
2018-05-18 17:36:56 -07:00
Tom Cherry e2f95984ba Merge "init: allow entering of network namespaces"
am: 4bfbd8e9a5

Change-Id: Ifb6e3af2f7658b7dafb852e3e84ad8132d2e6de1
2018-05-18 17:31:35 -07:00
Tom Cherry 4bfbd8e9a5 Merge "init: allow entering of network namespaces" 2018-05-19 00:22:58 +00:00
Tom Cherry aead51b418 init: allow entering of network namespaces
Add the ability to enter a network namespace when launching a service.
Typical usage of this would be something similar to the below:

on fs
  exec ip netns add namespace_name

service vendor_something /vendor/...
  capabilities <lower than root>
  user not_root
  enter_namespace net /mnt/.../namespace_name

Note changes to the `ip` tool are needed to create the namespace in
the correct directory.

Bug: 73334854
Test: not yet
Change-Id: Ifa91c873d36d69db399bb9c04ff2362518a0b07d
2018-05-18 17:19:36 -07:00
Bowgo Tsai 8eec38f4e4 Adds /dev/block/by-name/<partition> symlinks
During uevent processing, some "by-name" symlinks will be created.
    /dev/block/<type>/<device>/by-name/<partition>

<type> can be: platform, pci or vbd.
<device> might be: soc.0/f9824900.sdhci, soc.0/f9824900.sdhci, etc.
<partition> might be: system, vendor, system_a, system_b, etc.

e.g., on a non-A/B device:
    /dev/block/platform/soc.0/f9824900.sdhci/by-name/system
    /dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor

On a A/B device:
    /dev/block/platform/soc/1da4000.ufshc/by-name/system_a
    /dev/block/platform/soc/1da4000.ufshc/by-name/system_b
    /dev/block/platform/soc/1da4000.ufshc/by-name/vendor_a
    /dev/block/platform/soc/1da4000.ufshc/by-name/vendor_b

However, those symlinks are "device-specific".

This change adds the "generic" symlinks in ueventd, in addition to
the existing symlinks, when the possible "boot devices" are specified
in device tree. e.g.,

    &firmware_android {
	compatible = "android,firmware";
	boot_devices ="soc/1da4000.ufshc,soc.0/f9824900.sdhci";
    }

The following symlinks will then be created on the aforementioned non-A/B
and A/B devices, respectively.

    /dev/block/by-name/system
    /dev/block/by-name/vendor

    /dev/block/by-name/system_a
    /dev/block/by-name/system_b
    /dev/block/by-name/vendor_a
    /dev/block/by-name/vendor_b

Note that both <type> and <device> are skipped in the newly create symlinks.
It assumes there is no more than one devices with the same <partition>,
which is the assumption of current first stage mount flow.

Finally, when 'boot_devices' in DT is absent, it fallbacks to extract
'boot_devices' from fstab settings. e.g., using 'soc/1da4000.ufshc',
'soc.0/f9824900.sdhci' for a fstab with the following content:

   /dev/block/platform/soc/1da4000.ufshc/by-name/system
   /dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor

Bug: 78613232
Test: adb shell ls /dev/block/by-name
Change-Id: Iec920b5a72409b6a2bdbeeb290f0a3acd2046b5d
2018-05-19 07:57:35 +08:00
Paul Crowley fe305ab286 Add option to create metadata mount point
Test: booted metadata-encrypted device
Bug: 79781913
Change-Id: Ie922db20314c04409c98700bfb1aff3d111275f0
2018-05-18 14:10:56 -07:00
Christopher Ferris a64c28db02 Merge "Fix bug when doing signal handler lookup." am: 9e1514f1d7
am: d2262c4724

Change-Id: Iad85625eb06b7f413ecf26fcb575f32efbc0ea2d
2018-05-18 13:16:35 -07:00
Christopher Ferris d2262c4724 Merge "Fix bug when doing signal handler lookup."
am: 9e1514f1d7

Change-Id: Iae0e730a86a4e46d1289e8a91ac2bb7a1a42f677
2018-05-18 13:13:28 -07:00
Christopher Ferris 9e1514f1d7 Merge "Fix bug when doing signal handler lookup." 2018-05-18 20:04:15 +00:00
Colin Cross 884f589864 Merge "Document using libmemunreachable on an app" am: 60fab88ecc
am: fe7aa8f7b1

Change-Id: I375bc6d89ab9904326144632b34b7288c051bae1
2018-05-17 19:40:12 -07:00
Colin Cross fe7aa8f7b1 Merge "Document using libmemunreachable on an app"
am: 60fab88ecc

Change-Id: Ie19a3980fc0f75150af75a713d96b74c0e9d5dd1
2018-05-17 19:33:40 -07:00