Make JIT Bailout compatible with CET Shadow Stack on x86_64
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: abhishekcs, Assigned: abhishekcs)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files)
The bailout code currently rebuilds Baseline stack frames and copies them directly into the native stack in the bailout tail. However, when CET Shadow Stack is enabled - the return addresses within these newly materialized frames are absent from the shadow stack and cause a violation. The bailout process needs to be modified to use actual call instructions when rebuilding these frames to be compatible with CET Shadow Stack.
| Assignee | ||
Comment 1•19 days ago
|
||
Add bailout stubs to the Baseline Interpreter and the Fallback IC compiler. These
are currently a no-op - but will be jumped to by the bailout tail after copying
a single frame's contents. This allows the frame's return address, that is presently
directly copied into the stack, to be materialized with an actual call - making
bailout compatible with CET shadow stack.
Updated•19 days ago
|
| Assignee | ||
Comment 2•19 days ago
|
||
The BaselineStackBuilder now adds BailoutStubInfo corresponding to each
rebuilt stack frame to the BaselineBailoutInfo. The stub info tells the
bailout tail where each frame's contents end and the bailout stub that
will materialize the frame's return address.
| Assignee | ||
Comment 3•19 days ago
|
||
The bailout process is modified in x86_64 to use bailout stub information
to rebuild the stack one frame at a time instead of the existing bulk copy.
- The bailout tail uses the bailout stub information to setup the bailout
registers, copy contents of frames (besides the return address) and jumps
to the appropriate bailout stub. - The bailout stub is setup so that simply calling back into the bailout
tail materializes the expected return address - and the bailout tail can
continue with the next frame.
Updated•18 days ago
|
Updated•13 days ago
|
Updated•13 days ago
|
https://hg.mozilla.org/mozilla-central/rev/d7cc6883723b
https://hg.mozilla.org/mozilla-central/rev/b5ee4a72ac47
https://hg.mozilla.org/mozilla-central/rev/45306dee8419
Description
•