Closed Bug 1930384 Opened 1 year ago Closed 11 months ago

add missing BTI asm instruction to xpcom aarch64 stubs

Categories

(Core :: XPCOM, enhancement)

ARM64
All
enhancement

Tracking

()

RESOLVED FIXED
134 Branch
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: nobody → landry
Status: NEW → ASSIGNED
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/d76870072e98 add missing BTI instruction in aarch64 C stubs r=nika
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: