ARM64: nsWindowsDllInterceptor support for Milestone 4 (accessibility)
Categories
(Core :: mozglue, enhancement, P1)
Tracking
()
People
(Reporter: bugzilla, Assigned: bugzilla)
References
(Blocks 4 open bugs)
Details
Attachments
(5 files)
Bug 1532470: Part 1 - Add ability to specify desired memory range when reserving memory; r=handyman!
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
For M4 I have committed to having nsWindowsDllInterceptor
working successfully for these functions:
tiptsf!ProcessCaretEvents
user32!SendMessageTimeoutW
(Less important, but also nice to have for M4)
- Hooks set by
PoisonIOInterposer
onntdll
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
- We don't actually need to hook
tiptsf!ProcessCaretEvents
because that is unused on Windows 10. user32!SendMessageTimeoutW
is annoying because it is only 2 instructions long and there is another function immediately after it. In my current build of Windows 10'suser32.dll
, there are a few words ofUDF
prior to the function that could be used for patching, however those are not guaranteed to exist in other builds. I think we'll need to come up with something to do an 8-byte patch.- Syscall stubs will be easy; it looks like each one intentionally includes two
UDF
words, which gives us enough room to patch; I just need to modify the code to support that instruction sequence.
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
In order to support 4-byte patches on ARM64, we need to be able to reserve
trampoline space within +/- 128 MB of the beginning of a function.
These changes allow us to make such reservations using OS APIs when
available.
Assignee | ||
Comment 6•6 years ago
|
||
VMSharingPolicyShared needs to become much smarter. This patch modifies that
policy to track different VM reservations and reuse them whenever possible.
We add TrampolinePools to abstract away the differences between VM policies
with respect to the caller who is making the reservation.
Depends on D32190
Assignee | ||
Comment 7•6 years ago
|
||
A null trampoline is just a trampoline that is not backed by a VM reservation.
These are used for tracking the number of bytes that are needed to make a patch.
This patch also contains the changes needed to work with TrampolinePool.
Depends on D32191
Assignee | ||
Comment 8•6 years ago
|
||
This patch modifies arm64 so that detours are peformed via two passes:
- The first pass uses a null trampoline to count how many bytes are available
for patching the original function. - If we have >= 16 bytes to patch, we reuse existing trampoline space. If we
have less than 16 bytes to patch, we reserve trampoline space within 128MB
of the function, allowing for a 4 byte patch. - Then we recurse, this time using a real trampoline.
Note that we still do a single-pass on x86(-64).
Depends on D32192
Assignee | ||
Comment 9•6 years ago
|
||
Update the tests for ARM64 to include additional functions that are now
supported via 4 byte patching.
We also convert the TEST macros to accept the DLL names as strings, as this
works better with clang-format.
Depends on D32193
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
Backed out 2 changesets (Bug 1532470) on aklotz's request
Backout link: https://hg.mozilla.org/integration/autoland/rev/89e9b4714a6335593f8dd0258b44e157eb5fac8a
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7a4a079c4db0
https://hg.mozilla.org/mozilla-central/rev/c6720fe67519
https://hg.mozilla.org/mozilla-central/rev/198d9afc62cb
https://hg.mozilla.org/mozilla-central/rev/41f65bf1daf4
https://hg.mozilla.org/mozilla-central/rev/6ac0ea7a64e2
Comment 15•5 years ago
|
||
Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 16•5 years ago
|
||
Setting fix-optional for now. Ideally we'd like this to get into 68, but we have to see how well it bakes on Nightly.
Comment 17•5 years ago
|
||
We're building 68 RC builds next week, safe to say this is a wontfix for 68 at this point?
Description
•