Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add network location setting and add network location provider to config_locationProviderPackageNames #61

Open
wants to merge 339 commits into
base: 15
Choose a base branch
from

Conversation

@soupslurpr soupslurpr changed the title add network location setting add network location setting and redirect to other location providers when network location is disabled Nov 15, 2024
thestinger and others added 26 commits December 6, 2024 07:19
This reverts commit 5a8d91b5fac0a1ae597de359128e0706776ce3a7.
When an unhandled exception occured, binder connections were closed with
IPCThreadState::stopProcess() before the invocation of java.lang.Thread#dispatchUncaughtException().
By default, that method tries to report the crash via ActivityManager#handleApplicationCrash(),
which always failed due to the closed binder connection.
This meant that the crash dialog was never shown and additional crash handling was skipped.

Zygote-based spawning never calls IPCThreadState::stopProcess().
Needed for exec spawning, to pass custom flags to the kernel.
Chromium browser and its derivatives setup a seccomp syscall filter in their isolated processes,
which blocks creation of new userfaultfds.

Since 14 QPR2, ART uses a new userfaultfd-based GC.

When zygote-based process spawning is used, userfaultfd GC is initialized before any of app's code
is executed, i.e. before Chromium's seccomp syscall filter is installed.

When exec spawning is used, userfaultfd GC initialization is delayed until first garbage collection.
Chromium's seccomp syscall filter is already installed at that point.

This leads to crashes of isolated Chromium processes (both browser and WebView), with the following
log messages:
 E cr_seccomp: ../../sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall
 E cr_seccomp: nr=0x11a arg1=0x80001 arg2=0xc arg3=0xffffffffffffffff arg4=0xc

As a workaround, perform early initialization of ART userfaultfd GC in isolated processes by calling
System.gc() before executing app's code. On Pixel 8, this increases startup latency by around 4 to
10 milliseconds.
Based on 57448ae and d17960e

Co-authored-by: Renlord <me@renlord.com>
Co-authored-by: Daniel Micay <daniel.micay@grapheneos.org>
u-fred and others added 10 commits December 29, 2024 23:53
Some upstream methods are used to check if unlocking is possible when it
is known that a biometric auth has succeeded, but they don't and can't
take into account biometric second factor. Renaming these methods gives
us build errors for future callers, so we can make sure they are safe.
Extracted from:
commit dc6270f
Author: Fred Underwood <underwoodfred@proton.me>
Date:   Sat Dec 21 16:25:15 2024 +1000

    add second factor to DevicePolicyManagerService
Extracted from:
commit 3caf1f2
Author: Fred Underwood <underwoodfred@proton.me>
Date:   Sat Dec 21 16:40:05 2024 +1000

    add second factor to LockSettingsService
Extracted from:
commit caa335d
Author: Fred Underwood <underwoodfred@proton.me>
Date:   Sun Dec 22 06:53:47 2024 +1000

    add second factor UI
@thestinger
Copy link
Member

@hamzabhatti5253 Why are you repeatedly marking this approved?

@soupslurpr soupslurpr changed the title add network location setting, redirect to other location providers when network location is disabled, and add network location provider to config_locationProviderPackageNames add network location setting and add network location provider to config_locationProviderPackageNames Jan 5, 2025
@thestinger thestinger force-pushed the 15 branch 9 times, most recently from 3d97c25 to f3469eb Compare January 21, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.