<feed xmlns='http://www.w3.org/2005/Atom'>
<title>replicant/core/init, branch master</title>
<subtitle>Patches not merged yet, used for building and testing them
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/'/>
<entry>
<title>init: increase thermal shutdown timeout to 3s</title>
<updated>2018-10-26T20:08:57+00:00</updated>
<author>
<name>Wei Wang</name>
<email>wvw@google.com</email>
</author>
<published>2018-10-09T19:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=98a6ae31e5de97b38d9cd68ab4c9fda01f12b710'/>
<id>98a6ae31e5de97b38d9cd68ab4c9fda01f12b710</id>
<content type='text'>
1) increase thermal shutdown timeout to 3s for process to save work
2) respect property "ro.build.shutdown_timeout" in thermal shutdown if
   it is set less than default time - "3s"

Bug: 112432890
Test: Build
Change-Id: Idc2b24dd44c1fab8f9b047fd2468de2ee45ff783
Merged-In: Idc2b24dd44c1fab8f9b047fd2468de2ee45ff783
(cherry picked from commit b5de088262b735267288bbdd3f4430f18f281967)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1) increase thermal shutdown timeout to 3s for process to save work
2) respect property "ro.build.shutdown_timeout" in thermal shutdown if
   it is set less than default time - "3s"

Bug: 112432890
Test: Build
Change-Id: Idc2b24dd44c1fab8f9b047fd2468de2ee45ff783
Merged-In: Idc2b24dd44c1fab8f9b047fd2468de2ee45ff783
(cherry picked from commit b5de088262b735267288bbdd3f4430f18f281967)
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "init: finer grained permissions for ctl. properties" into pi-dev</title>
<updated>2018-05-22T20:15:07+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2018-05-22T20:15:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=8b491495a33c5293a33d029d9124ca08c91c9e51'/>
<id>8b491495a33c5293a33d029d9124ca08c91c9e51</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "init: allow entering of network namespaces" into pi-dev</title>
<updated>2018-05-22T17:13:41+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2018-05-22T17:13:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=9ad11c0eee3ef71efe3bf029338d36ae03b197f7'/>
<id>9ad11c0eee3ef71efe3bf029338d36ae03b197f7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>init: finer grained permissions for ctl. properties</title>
<updated>2018-05-22T15:02:35+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2018-05-03T23:57:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=1debdcf1cf3d45ba9185ab47a265995c676280d8'/>
<id>1debdcf1cf3d45ba9185ab47a265995c676280d8</id>
<content type='text'>
Currently, permissions for ctl. property apply to each action verb, so
if a domain has permissions for controlling service 'foo', then it can
start, stop, and restart foo.

This change implements finer grainer permissions such that permission
can be given to strictly start a given service, but not stop or
restart it.  This new permission scheme is mandatory for the new
control functions, sigstop_on, sigstop_off, interface_start,
interface_stop, interface_restart.

Bug: 78511553
Test: see appropriate successes and failures based on permissions
Change-Id: I6ce915ae39954a67eb6fe1795a93cf715c352ae4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, permissions for ctl. property apply to each action verb, so
if a domain has permissions for controlling service 'foo', then it can
start, stop, and restart foo.

This change implements finer grainer permissions such that permission
can be given to strictly start a given service, but not stop or
restart it.  This new permission scheme is mandatory for the new
control functions, sigstop_on, sigstop_off, interface_start,
interface_stop, interface_restart.

Bug: 78511553
Test: see appropriate successes and failures based on permissions
Change-Id: I6ce915ae39954a67eb6fe1795a93cf715c352ae4
</pre>
</div>
</content>
</entry>
<entry>
<title>init: allow entering of network namespaces</title>
<updated>2018-05-21T15:52:13+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2018-04-20T23:18:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=2fa7451e9b530f814f93ca2248fa425b1f5362cd'/>
<id>2fa7451e9b530f814f93ca2248fa425b1f5362cd</id>
<content type='text'>
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 &lt;lower than root&gt;
  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 aead51b418e70a49191bc0cc5b67c92c969ae699)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;lower than root&gt;
  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 aead51b418e70a49191bc0cc5b67c92c969ae699)
</pre>
</div>
</content>
</entry>
<entry>
<title>Adds /dev/block/by-name/&lt;partition&gt; symlinks</title>
<updated>2018-05-19T01:31:35+00:00</updated>
<author>
<name>Bowgo Tsai</name>
<email>bowgotsai@google.com</email>
</author>
<published>2018-05-16T10:33:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=5ee7dae840eaebdd1aec47632e2a32e1ba7dd90a'/>
<id>5ee7dae840eaebdd1aec47632e2a32e1ba7dd90a</id>
<content type='text'>
During uevent processing, some "by-name" symlinks will be created.
    /dev/block/&lt;type&gt;/&lt;device&gt;/by-name/&lt;partition&gt;

&lt;type&gt; can be: platform, pci or vbd.
&lt;device&gt; might be: soc.0/f9824900.sdhci, soc.0/f9824900.sdhci, etc.
&lt;partition&gt; 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.,

    &amp;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 &lt;type&gt; and &lt;device&gt; are skipped in the newly create symlinks.
It assumes there is no more than one devices with the same &lt;partition&gt;,
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 8eec38f4e463d8cd980562ec49432c17972cc5cb)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During uevent processing, some "by-name" symlinks will be created.
    /dev/block/&lt;type&gt;/&lt;device&gt;/by-name/&lt;partition&gt;

&lt;type&gt; can be: platform, pci or vbd.
&lt;device&gt; might be: soc.0/f9824900.sdhci, soc.0/f9824900.sdhci, etc.
&lt;partition&gt; 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.,

    &amp;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 &lt;type&gt; and &lt;device&gt; are skipped in the newly create symlinks.
It assumes there is no more than one devices with the same &lt;partition&gt;,
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 8eec38f4e463d8cd980562ec49432c17972cc5cb)
</pre>
</div>
</content>
</entry>
<entry>
<title>Removing block device by-num symlinks</title>
<updated>2018-05-19T01:28:42+00:00</updated>
<author>
<name>Bowgo Tsai</name>
<email>bowgotsai@google.com</email>
</author>
<published>2018-05-17T08:19:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=ff17cc31e5aa49fc8cce1693f813d150a7343ab5'/>
<id>ff17cc31e5aa49fc8cce1693f813d150a7343ab5</id>
<content type='text'>
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 &amp;&amp; \
      adb push $OUT/data/nativetest64/init_tests/init_tests /data/. &amp;&amp; \
      adb shell /data/init_tests

Change-Id: I8dfa8dc1a2f9fc9296aa30f33e905bf158b501de
Merged-In: I8dfa8dc1a2f9fc9296aa30f33e905bf158b501de
(cherry picked from commit 95591bd00e653826f25bfa705c3f50545f6b06a3)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &amp;&amp; \
      adb push $OUT/data/nativetest64/init_tests/init_tests /data/. &amp;&amp; \
      adb shell /data/init_tests

Change-Id: I8dfa8dc1a2f9fc9296aa30f33e905bf158b501de
Merged-In: I8dfa8dc1a2f9fc9296aa30f33e905bf158b501de
(cherry picked from commit 95591bd00e653826f25bfa705c3f50545f6b06a3)
</pre>
</div>
</content>
</entry>
<entry>
<title>init: Use sepolicy version instead</title>
<updated>2018-05-04T07:21:14+00:00</updated>
<author>
<name>Logan Chien</name>
<email>loganchien@google.com</email>
</author>
<published>2018-05-03T06:33:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=c50144ef1d7ddebed3f765f176fa3a03d3d5f521'/>
<id>c50144ef1d7ddebed3f765f176fa3a03d3d5f521</id>
<content type='text'>
This commit uses vendor sepolicy file version (defined in
`/vendor/etc/selinux/plat_sepolicy_vers.txt`) to determine whether the
source context should be set as `u:r:vendor_init:s0`.

Before this commit, the criterion was `ro.vndk.version` &gt;= 28.  However,
the check in `property_service.cpp` will always be true because
`ro.vndk.version` hasn't been loaded from `/vendor/default.prop`.

Furthermore, under some circumstances, `ro.vndk.version` may be
different from `plat_sepolicy_vers.txt` (e.g. O-MR1 vendor does not
define `ro.vndk.version`).

Bug: 78605339  # high-level bug to combine O-MR1 and P GSI
Bug: 79135481  # the usage of `ro.vndk.version` in init
Test: vts-tradefed run vts -m VtsTrebleVintfTest  # tetheroffload
Change-Id: Ied46e9346b4ca7931aa4dcf1c9dbc11de0e12d93
Merged-In: Ied46e9346b4ca7931aa4dcf1c9dbc11de0e12d93
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit uses vendor sepolicy file version (defined in
`/vendor/etc/selinux/plat_sepolicy_vers.txt`) to determine whether the
source context should be set as `u:r:vendor_init:s0`.

Before this commit, the criterion was `ro.vndk.version` &gt;= 28.  However,
the check in `property_service.cpp` will always be true because
`ro.vndk.version` hasn't been loaded from `/vendor/default.prop`.

Furthermore, under some circumstances, `ro.vndk.version` may be
different from `plat_sepolicy_vers.txt` (e.g. O-MR1 vendor does not
define `ro.vndk.version`).

Bug: 78605339  # high-level bug to combine O-MR1 and P GSI
Bug: 79135481  # the usage of `ro.vndk.version` in init
Test: vts-tradefed run vts -m VtsTrebleVintfTest  # tetheroffload
Change-Id: Ied46e9346b4ca7931aa4dcf1c9dbc11de0e12d93
Merged-In: Ied46e9346b4ca7931aa4dcf1c9dbc11de0e12d93
</pre>
</div>
</content>
</entry>
<entry>
<title>First-stage mount: avoid triggering a FATAL error</title>
<updated>2018-05-02T02:23:16+00:00</updated>
<author>
<name>Bowgo Tsai</name>
<email>bowgotsai@google.com</email>
</author>
<published>2018-04-30T08:13:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=fe92dd0973c2efd4f8f0b73cb0831af02f8c3529'/>
<id>fe92dd0973c2efd4f8f0b73cb0831af02f8c3529</id>
<content type='text'>
Related AOSP changes:
  1. https://android-review.googlesource.com/#/c/platform/system/core/+/405009/
  2. https://android-review.googlesource.com/#/c/platform/system/core/+/532637/

The second CL raises a FATAL error when it detects fstab-dt has no content
during first-stage mount. However, with the first CL, the fstab-dt entry
might be "skipped" when bootloader sets the status property to a value
other than "ok"/"okay". (e.g., to skip mounting /vendor on upgrading
devices which have no vendor partition).

Use LOG(INFO) when there is nothing to mount here. The later stages
should trigger a FATAL error when some important files in those
partitions are not available, e.g., SEPolicy files.

Bug: 78441220
Test: boot a device
Change-Id: Iae2f47d455679298bdb067d96b771a30c1a82e6f
Merged-In: Iae2f47d455679298bdb067d96b771a30c1a82e6f
(cherry picked from commit 8fe363f26017e39b80c6cd793f7b2a346da88104)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Related AOSP changes:
  1. https://android-review.googlesource.com/#/c/platform/system/core/+/405009/
  2. https://android-review.googlesource.com/#/c/platform/system/core/+/532637/

The second CL raises a FATAL error when it detects fstab-dt has no content
during first-stage mount. However, with the first CL, the fstab-dt entry
might be "skipped" when bootloader sets the status property to a value
other than "ok"/"okay". (e.g., to skip mounting /vendor on upgrading
devices which have no vendor partition).

Use LOG(INFO) when there is nothing to mount here. The later stages
should trigger a FATAL error when some important files in those
partitions are not available, e.g., SEPolicy files.

Bug: 78441220
Test: boot a device
Change-Id: Iae2f47d455679298bdb067d96b771a30c1a82e6f
Merged-In: Iae2f47d455679298bdb067d96b771a30c1a82e6f
(cherry picked from commit 8fe363f26017e39b80c6cd793f7b2a346da88104)
</pre>
</div>
</content>
</entry>
<entry>
<title>Set property for metadata encryption on first boot</title>
<updated>2018-04-18T21:40:54+00:00</updated>
<author>
<name>Paul Crowley</name>
<email>paulcrowley@google.com</email>
</author>
<published>2018-04-17T19:28:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=5872cbdf02ee0a64f1a313f00eb1e635b452393b'/>
<id>5872cbdf02ee0a64f1a313f00eb1e635b452393b</id>
<content type='text'>
Bug: 77335096
Test: device boots twice with and without metadata encryption
Change-Id: Iaed78288cb37865ba23833721b73b11414e7e862
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: 77335096
Test: device boots twice with and without metadata encryption
Change-Id: Iaed78288cb37865ba23833721b73b11414e7e862
</pre>
</div>
</content>
</entry>
</feed>
