add missing BTI asm instruction to xpcom aarch64 stubs
Categories
(Core :: XPCOM, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox134 | --- | fixed |
People
(Reporter: gaston, Assigned: gaston)
Details
Attachments
(1 file)
BTI is enforced by default on OpenBSD, and on hardware that supports it firefox crashes at start. For now to have a working firefox on such hardware we need to link with BTI support disabled, thus we don't benefit from the security feature it brings. Cf https://undeadly.org/cgi?action=article;sid=20230714121907 and https://www.undeadly.org/cgi?action=article;sid=20240222183703 for the background on it.
The disasm in gdb points at the asm in https://searchfox.org/mozilla-central/source/xpcom/reflect/xptcall/md/unix/xptcstubs_aarch64.cpp#227
adding a 'bti c' asm instruction there allows the binary to make more progress, and a build with --disable-jit (support for BTI in spidermonkey/the JIT is being worked on by another OpenBSD developer) even works/is usable on the OmniBook X14 which has hardware support for the BTI instruction.
i have to recheck that it causes no fallback on aarch64 hardware that doesnt support the BTI instruction.
| Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
Comment 3•11 months ago
|
||
| bugherder | ||
Description
•