Page MenuHomeFreeBSD

arm64: Add -mgeneral-regs-only to rtld
Needs ReviewPublic

Authored by wac_gmail.com on Thu, Jan 8, 9:39 AM.
Tags
None
Referenced Files
F141927421: D54597.id169306.diff
Mon, Jan 12, 8:45 PM
F141915565: D54597.diff
Mon, Jan 12, 11:31 AM
F141909426: D54597.diff
Mon, Jan 12, 9:23 AM
F141894143: D54597.diff
Mon, Jan 12, 3:14 AM
Unknown Object (File)
Fri, Jan 9, 7:42 AM
Unknown Object (File)
Fri, Jan 9, 6:56 AM
Unknown Object (File)
Fri, Jan 9, 4:36 AM
Unknown Object (File)
Fri, Jan 9, 1:21 AM
Subscribers

Details

Reviewers
andrew
Summary

Ensure the rtld for aarch64 is built with -mgeneral-regs-only to prevent the compiler from generating SIMD instructions. This guarantees that volatile SIMD registers (q16-q31) are not clobbered during lazy symbol binding. Without this, symbol binding operations could corrupt application state, especially during signal delivery or context switches.

This resolves a potential source of failure in tests like xregs_sig, as seen in bug 271730.

Test Plan

Run xregs_sig successfully. Observe no use of SIMD registers in linker assembly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

xregs_sig doesn't follow the ABI so it is valid to trash these registers.

Does this fix a problem in software that follows the ABI?