Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76fc52bd authored by Mark Rutland's avatar Mark Rutland Committed by Will Deacon
Browse files

arm64: ptrace: map SPSR_ELx<->PSR for compat tasks



The SPSR_ELx format for exceptions taken from AArch32 is slightly
different to the AArch32 PSR format.

Map between the two in the compat ptrace code.

Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Fixes: 7206dc93 ("arm64: Expose Arm v8.4 features")
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 25dc2c80
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1076,6 +1076,7 @@ static int compat_gpr_get(struct task_struct *target,
			break;
		case 16:
			reg = task_pt_regs(target)->pstate;
			reg = pstate_to_compat_psr(reg);
			break;
		case 17:
			reg = task_pt_regs(target)->orig_x0;
@@ -1143,6 +1144,7 @@ static int compat_gpr_set(struct task_struct *target,
			newregs.pc = reg;
			break;
		case 16:
			reg = compat_psr_to_pstate(reg);
			newregs.pstate = reg;
			break;
		case 17: