HomeFreeBSD

Restrict spsr updated in the arm64 set_regs*

Description

Restrict spsr updated in the arm64 set_regs*

When using ptrace(2) on arm64 to set registers in a 32-bit program we
need to take care to only set some of the fields. Follow the existing
arm64 path and only let the user set the flags fields. This is also the
case in the arm kernel so fixes a change in behaviour between the two.

While here update set_regs to only set spsr and elr once.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit b029ef7fe618c6fa0482958422cc362905c15376)

Details

Provenance
andrewAuthored on Sep 13 2021, 3:24 PM
Parents
rGc30a7ae6384d: Add arm64 ifunc support in static binaries
Branches
Unknown
Tags
Unknown