<feed xmlns='http://www.w3.org/2005/Atom'>
<title>system_core/init, branch replicant-10</title>
<subtitle>Fork of system/core
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/'/>
<entry>
<title>reboot: allow opting-in to fastbootd</title>
<updated>2020-03-07T13:05:16+00:00</updated>
<author>
<name>Alessandro Astone</name>
<email>ales.astone@gmail.com</email>
</author>
<published>2020-02-26T16:30:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=c0167ecadff27251d5c66214b7f91f54b50ee8b8'/>
<id>c0167ecadff27251d5c66214b7f91f54b50ee8b8</id>
<content type='text'>
Change-Id: Iaf5eb813e848ef05b1b455ebfe3643f4a8b4f80d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Iaf5eb813e848ef05b1b455ebfe3643f4a8b4f80d
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'android-10.0.0_r31' into lineage-17.1-android-10.0.0_r31</title>
<updated>2020-03-07T12:42:13+00:00</updated>
<author>
<name>Luca Stefani</name>
<email>luca.stefani.ge1@gmail.com</email>
</author>
<published>2020-03-07T12:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=2d7f4193a04ad9148cbe6cd3dd45dc961e22ff4e'/>
<id>2d7f4193a04ad9148cbe6cd3dd45dc961e22ff4e</id>
<content type='text'>
Android 10.0.0 release 31

* tag 'android-10.0.0_r31':
  Store crashing process name in sysprop
  Allowing /avb/q-developer-gsi.avbpubkey for DSU
  Adding the AVB public key for Q-Developer-GSI
  FlattenableUtils::align memsets

Change-Id: Ia9d79894d1a390669031842f83c1bba3d185e9b2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Android 10.0.0 release 31

* tag 'android-10.0.0_r31':
  Store crashing process name in sysprop
  Allowing /avb/q-developer-gsi.avbpubkey for DSU
  Adding the AVB public key for Q-Developer-GSI
  FlattenableUtils::align memsets

Change-Id: Ia9d79894d1a390669031842f83c1bba3d185e9b2
</pre>
</div>
</content>
</entry>
<entry>
<title>init: only provide control message results for devices launching &gt; Q</title>
<updated>2020-01-13T17:28:41+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2019-10-22T15:27:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=250a290dedabe55c72d790fca1ce311534b7bf18'/>
<id>250a290dedabe55c72d790fca1ce311534b7bf18</id>
<content type='text'>
This is a behavior change and may have unintended consequences,
especially in Java, where failed property sets create exceptions.
Therefore, we only provide this new behavior to devices launching &gt; Q.

Bug: 137070994
Test: build
Change-Id: If0b44aedc5c887ea6ea16dd3ec551ac2bf793cef
(cherry picked from commit 5310db82b012131242f723742e02426abcf1c684)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a behavior change and may have unintended consequences,
especially in Java, where failed property sets create exceptions.
Therefore, we only provide this new behavior to devices launching &gt; Q.

Bug: 137070994
Test: build
Change-Id: If0b44aedc5c887ea6ea16dd3ec551ac2bf793cef
(cherry picked from commit 5310db82b012131242f723742e02426abcf1c684)
</pre>
</div>
</content>
</entry>
<entry>
<title>Ignore class_{reset|start}_post_data on non-updatable APEX.</title>
<updated>2020-01-13T15:43:31+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2019-07-16T11:15:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=d8c6c0804ff9fb2a0f83de6c9b96578345e0ff2e'/>
<id>d8c6c0804ff9fb2a0f83de6c9b96578345e0ff2e</id>
<content type='text'>
For devices that use FDE and don't support updatable APEXes, don't
stop and restart all processes - there is no need and it only increases
boot time for these devices.

Additionally, some daemons have never been restarted in the past, and
restarting them exposes certain issues.

Bug: 137251597
Bug: 136777273
Bug: 135627804
Test: verified manually w/ ro.updatable.apex=false
Change-Id: I9590f2c2cdfab0a49f39846896460305d44221ee
(cherry picked from commit 728586f5b23d830b1d14c61abcf85cd72dc95412)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For devices that use FDE and don't support updatable APEXes, don't
stop and restart all processes - there is no need and it only increases
boot time for these devices.

Additionally, some daemons have never been restarted in the past, and
restarting them exposes certain issues.

Bug: 137251597
Bug: 136777273
Bug: 135627804
Test: verified manually w/ ro.updatable.apex=false
Change-Id: I9590f2c2cdfab0a49f39846896460305d44221ee
(cherry picked from commit 728586f5b23d830b1d14c61abcf85cd72dc95412)
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland^2: "init: run property service in a thread"</title>
<updated>2020-01-13T15:43:12+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2019-04-23T00:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=aa39415260171b8a5645a5c255330eb98e1de020'/>
<id>aa39415260171b8a5645a5c255330eb98e1de020</id>
<content type='text'>
It's been a long standing issue that init cannot respond to property
set messages when it is running a builtin command.  This is
particularly problematic when the commands involve IPC to vold or
other daemons, as it prevents them from being able to set properties.

This change has init run property service in a thread, which
eliminates the above issue.

This change may also serve as a starting block to running property
service in an entirely different process to better isolate init from
handling property requests.

Reland: during reboot, init stops processing property_changed messages
from property service, since it will not act on these anyway.  This
had an unexpected effect of causing future property_set calls to block
indefinitely, since the buffer between init and property_service was
filling up and the send() call from property_service would then
block.  This change has init tell property_service to stop sending it
property_changed messages once reboot begins.

Test: CF boots, walleye boots, properties are set appropriately
Change-Id: I26902708e8be788caa6dbcf4b6d2968d90962785
(cherry picked from commit 1ab3dfcab469198114c4bb4a3914c6b64b891f72)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's been a long standing issue that init cannot respond to property
set messages when it is running a builtin command.  This is
particularly problematic when the commands involve IPC to vold or
other daemons, as it prevents them from being able to set properties.

This change has init run property service in a thread, which
eliminates the above issue.

This change may also serve as a starting block to running property
service in an entirely different process to better isolate init from
handling property requests.

Reland: during reboot, init stops processing property_changed messages
from property service, since it will not act on these anyway.  This
had an unexpected effect of causing future property_set calls to block
indefinitely, since the buffer between init and property_service was
filling up and the send() call from property_service would then
block.  This change has init tell property_service to stop sending it
property_changed messages once reboot begins.

Test: CF boots, walleye boots, properties are set appropriately
Change-Id: I26902708e8be788caa6dbcf4b6d2968d90962785
(cherry picked from commit 1ab3dfcab469198114c4bb4a3914c6b64b891f72)
</pre>
</div>
</content>
</entry>
<entry>
<title>init: add error handling in control message</title>
<updated>2020-01-13T15:42:59+00:00</updated>
<author>
<name>Wei Wang</name>
<email>wvw@google.com</email>
</author>
<published>2019-05-23T19:13:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=3a4413e22f5f97cc31f86122bc3c5ec0650d4f36'/>
<id>3a4413e22f5f97cc31f86122bc3c5ec0650d4f36</id>
<content type='text'>
Bug: 133432022
Test: boot
Test: setprop ctl.interface_restart android.hardware.power@1.0::IPower/default success
Test: setprop ctl.interface_restart android.hardware.power@1.0::IPower/abc fail
Change-Id: I66342b2723eb01022fb4e0d98f0b6ffc2752bcac
(cherry picked from commit 5f01d3af77d420c0bd0688e86ceb9c7772c1c76a)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: 133432022
Test: boot
Test: setprop ctl.interface_restart android.hardware.power@1.0::IPower/default success
Test: setprop ctl.interface_restart android.hardware.power@1.0::IPower/abc fail
Change-Id: I66342b2723eb01022fb4e0d98f0b6ffc2752bcac
(cherry picked from commit 5f01d3af77d420c0bd0688e86ceb9c7772c1c76a)
</pre>
</div>
</content>
</entry>
<entry>
<title>init: simplify async restorecon</title>
<updated>2020-01-13T15:42:38+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2019-04-23T22:11:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=17a0c2f31d2f15447f905e0500f9a07f010c9a92'/>
<id>17a0c2f31d2f15447f905e0500f9a07f010c9a92</id>
<content type='text'>
In the future, property service may run in its own thread or process,
which means that PropertyChildReap() needs to be refactored to not run
as part of the init signal handler.

The new method spawns a new thread that handles the queue of paths
that require restorecon. It then communicates back to property service
via android::base::SetProperty(). Property service distinguishes the
thread from other callers of SetProperty() by checking the pid in the
credentials for the socket connection, thus avoiding dependencies on
the rest of init.

The new method also drops the genericness, since restorecon is the
only function that we should ever need to run asynchronously

Test: async restorecon works, including with queued requests
Change-Id: I2ca00459969e77b1820776dac23d0a0d974e330b
(cherry picked from commit fe8154175c411b0dba6bbc881cf9dfe501be74c5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the future, property service may run in its own thread or process,
which means that PropertyChildReap() needs to be refactored to not run
as part of the init signal handler.

The new method spawns a new thread that handles the queue of paths
that require restorecon. It then communicates back to property service
via android::base::SetProperty(). Property service distinguishes the
thread from other callers of SetProperty() by checking the pid in the
credentials for the socket connection, thus avoiding dependencies on
the rest of init.

The new method also drops the genericness, since restorecon is the
only function that we should ever need to run asynchronously

Test: async restorecon works, including with queued requests
Change-Id: I2ca00459969e77b1820776dac23d0a0d974e330b
(cherry picked from commit fe8154175c411b0dba6bbc881cf9dfe501be74c5)
</pre>
</div>
</content>
</entry>
<entry>
<title>init: handle getpeercon() errors</title>
<updated>2020-01-13T15:42:25+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2019-04-22T20:28:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=625cc21457eece141753ab4eed7cca0976a22105'/>
<id>625cc21457eece141753ab4eed7cca0976a22105</id>
<content type='text'>
Though unlikely, it is possible for getpeercon() to fail.  This change
adds code to handle this case gracefully.

Bug: 130209483
Test: boots, properties are set
Change-Id: I3b3fb76b2312a5cbc87c0da2a044be3ddf8aa400
(cherry picked from commit 7f160af14246e8819839e1693496c7e2f304a7b8)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Though unlikely, it is possible for getpeercon() to fail.  This change
adds code to handle this case gracefully.

Bug: 130209483
Test: boots, properties are set
Change-Id: I3b3fb76b2312a5cbc87c0da2a044be3ddf8aa400
(cherry picked from commit 7f160af14246e8819839e1693496c7e2f304a7b8)
</pre>
</div>
</content>
</entry>
<entry>
<title>init: set up SelinuxAuditCallback() earlier</title>
<updated>2020-01-13T15:42:11+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2019-04-22T17:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=f4786c81d132f8a950e9c941a33b9d14a30dd779'/>
<id>f4786c81d132f8a950e9c941a33b9d14a30dd779</id>
<content type='text'>
The setup of SelinuxAuditCallback() was happening after property files
are loaded, and now that these property files can trigger audits, the
audit messages did not contain all of the correct information.  This
change moves the setup of SelinuxAuditCallback() to immediately before
the property area is initialized, to ensure that this can not happen
again.

Bug: 130979265
Test: audits work early
Change-Id: I9eb43269317c74e041626ee7b2bb7fea49250e09
(cherry picked from commit 2f113ad1e147fdf26e74e42ccf130184440dc4ea)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The setup of SelinuxAuditCallback() was happening after property files
are loaded, and now that these property files can trigger audits, the
audit messages did not contain all of the correct information.  This
change moves the setup of SelinuxAuditCallback() to immediately before
the property area is initialized, to ensure that this can not happen
again.

Bug: 130979265
Test: audits work early
Change-Id: I9eb43269317c74e041626ee7b2bb7fea49250e09
(cherry picked from commit 2f113ad1e147fdf26e74e42ccf130184440dc4ea)
</pre>
</div>
</content>
</entry>
<entry>
<title>ueventd: make parallel restorecon functionality optional</title>
<updated>2020-01-04T13:49:13+00:00</updated>
<author>
<name>Tom Cherry</name>
<email>tomcherry@google.com</email>
</author>
<published>2019-09-06T17:52:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=6b664ff0596b91553e64aae1f79f338c4fc3d051'/>
<id>6b664ff0596b91553e64aae1f79f338c4fc3d051</id>
<content type='text'>
5aa6197d5f387579ff04c330001840d6988e825f added the ability to
parallelize restorecon to speed up boot for devices that have not
completely moved to genfscon.  This parallel restorecon happens after
the parallel ueventd handling.

This causes a performance regression for devices that have moved to
genfscon, since previously, the restorecon() was done in the main
ueventd thread in parallel with the uevent handlers.

I also tried to run the fully parallelized restorecon in parallel with
the uevent handlers, but that did not make any change to the cold boot
time, likely due to the additional overhead of parallelizing the work.

Bug: 140458170
Test: blueline coldboot time returns to pre-regression time.
Change-Id: I3cd6a869cc9b62792466813d94ad6c69834e854e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
5aa6197d5f387579ff04c330001840d6988e825f added the ability to
parallelize restorecon to speed up boot for devices that have not
completely moved to genfscon.  This parallel restorecon happens after
the parallel ueventd handling.

This causes a performance regression for devices that have moved to
genfscon, since previously, the restorecon() was done in the main
ueventd thread in parallel with the uevent handlers.

I also tried to run the fully parallelized restorecon in parallel with
the uevent handlers, but that did not make any change to the cold boot
time, likely due to the additional overhead of parallelizing the work.

Bug: 140458170
Test: blueline coldboot time returns to pre-regression time.
Change-Id: I3cd6a869cc9b62792466813d94ad6c69834e854e
</pre>
</div>
</content>
</entry>
</feed>
