When bootchart is enabled its thread shares the mount namespace context
with the main thread. This prevents the main thread to switch the mount
namespace later with setns().
So, unshare() the mount namespace of the bootchart thread.
Bug: 229983560
Test: rebooted with bootcharting on/off
enter_default_mount_ns should succeeded.
Change-Id: Idac0d0efcb4f7f7d8a7cbcebf8fa2fa29f104c35
Merged-In: Idac0d0efcb4f7f7d8a7cbcebf8fa2fa29f104c35
(cherry picked from commit 7f8721b992)
Let's turn a bug into a feature... Since this code is built with intsan,
anyone who caused overflow here will have had an abort, so we know
no-one actually needs the BAD_INDEX return that was presumably the
original author's intent. So let's just mandate that, since it's a lot
harder to ignore an abort than it is to ignore an error return.
Bug: http://b/179044558
Test: treehugger
Change-Id: I08f1018f9da1e09de885699138b7543d55bb2a36
am skip reason: Merged-In I61c0297503347932b14b83859bec9ff82628336f with SHA-1 97cc69ee5d is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/17937770
Change-Id: I703fbc1ef7ecd0658785771e392ae741cf8e3bbe
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2046445
Change-Id: Ieaae835a6b3a88c37a2c54d1c4003569f150dccf
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2046445
Change-Id: I52ef98b3dae191529fb1293bc7ebe80febc9ec48
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2072812
Change-Id: I780b31d9ca1de1887a53c8f8ca66a4953863f3bd
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2072812
Change-Id: I47d8944b3bc538d83cfae7f26add1c5c3e3f828d
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2074258
Change-Id: Ic27ce9c20d86894ba37a6f9053281b4758e12f25
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2074258
Change-Id: Iaa2f326f68ef8fbc80af4fd29cde6142ec7a7d16
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2072833
Change-Id: I64b1c3f1f327451cae8ec77b54a45f06cf360d47
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2072833
Change-Id: Ifaf75d6ebfe8990c59a9fd1c8548a80b6c1b1c19
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
When bootchart is enabled its thread shares the mount namespace context
with the main thread. This prevents the main thread to switch the mount
namespace later with setns().
So, unshare() the mount namespace of the bootchart thread.
Bug: 229983560
Test: rebooted with bootcharting on/off
enter_default_mount_ns should succeeded.
Change-Id: Idac0d0efcb4f7f7d8a7cbcebf8fa2fa29f104c35
[1] changed the UID of the virtualizationservice daemon and
/data/misc/virtualizationservice directory to `system`. However, this
can cause a permission denial issue when the directory has stale files
when the device was running a build before [1] and an OTA to [1] (or
above) is attempted. The daemon tries to delete the stale files - which
must have been still labeled as old UID and thus the daemon has no
privileged to delete them.
Fixing this issue by ensuring that the directory is always empty by
init.
[1] https://android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/2059527
Bug: 230056726
Test: watch TH
Merged-In: I61c0297503347932b14b83859bec9ff82628336f
Change-Id: I61c0297503347932b14b83859bec9ff82628336f
[1] changed the UID of the virtualizationservice daemon and
/data/misc/virtualizationservice directory to `system`. However, this
can cause a permission denial issue when the directory has stale files
when the device was running a build before [1] and an OTA to [1] (or
above) is attempted. The daemon tries to delete the stale files - which
must have been still labeled as old UID and thus the daemon has no
privileged to delete them.
Fixing this issue by ensuring that the directory is always empty by
init.
[1] https://android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/2059527
Bug: 230056726
Test: watch TH
Change-Id: I61c0297503347932b14b83859bec9ff82628336f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2070481
Change-Id: I6d7e9994f3678ceb862d34422a7383107835186a
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2070481
Change-Id: I7cf5d29b22bd55c88fd53b93189e70d2fad50283
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user karthikmr
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1915268
Change-Id: I8cc268076ce4888386c6089d3c6f24e23b9a24ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user agowdra
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1844795
Change-Id: I67c79b5abba73645174274dea9b3bca5be3e21ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user karthikmr
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1535382
Change-Id: I55838d5674708b3162770a2a60f4fe039be8cc8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I971fd9e25741e18bf7f5907d562556b09db1d624 with SHA-1 0e743a25c9 is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1364665
Change-Id: I39cff584dc58d840438e906e16b4a6cfd7131d4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I971fd9e25741e18bf7f5907d562556b09db1d624 with SHA-1 0e743a25c9 is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1364665
Change-Id: I53a1bf8bb3e611dbc8014e38f4e0acfdcd11ba04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I00366b281eafa5677b0941419a86f2702fb3484b with SHA-1 65e8e3803e is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1258132
Change-Id: I07c4c815bbbad0dfc5f9821e3535516fe562f308
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I00366b281eafa5677b0941419a86f2702fb3484b with SHA-1 019f731097 is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1258132
Change-Id: I74b6fa4d4a73c6cb0fc12aa6891bc82c9a8b7770
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user dmulabagal
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1239888
Change-Id: Ib16eaee45f47db4b10f4e41156004ddddd6b29d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>