Skip to contentSkip to conversation

arm64: pass ESR_ELx to die() of cfi_handler

PATCH Applied Sangmoon Kim 4 participants 4 messages Feb 20, 2023 – Feb 22, 2023 1 message not in the archive arm64

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20230220073527epcas1p1e901bfa667b8c51551d26478013131e6@epcas1p1.samsung.com

#1 lore raw

PATCH 1/1 arm64: pass ESR_ELx to die() of cfi_handler

Commit 0f2cb928a154 ("arm64: consistently pass ESR_ELx to die()") caused all callers to pass the ESR_ELx value to die().

For consistency, this patch also adds esr to die() call of cfi_handler. Also, when CFI error occurs, die handlers can use ESR_ELx value.

---
 arch/arm64/kernel/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/traps.c +1 -1
index 0ccc063daccb..4a623e2e982b 100644
@@ -990,7 +990,7 @@ static int cfi_handler(struct pt_regs *regs, unsigned long esr)
 
 	switch (report_cfi_failure(regs, regs->pc, &target, type)) {
 	case BUG_TRAP_TYPE_BUG:
-		die("Oops - CFI", regs, 0);
+		die("Oops - CFI", regs, esr);
 		break;
 
 	case BUG_TRAP_TYPE_WARN:
Signature · 1 line
2.17.1
reviewer Acked-by on v1 1/1
#2 lore raw
Quoted 7 lines · Sangmoon Kim

Commit 0f2cb928a154 ("arm64: consistently pass ESR_ELx to die()") caused all callers to pass the ESR_ELx value to die().

For consistency, this patch also adds esr to die() call of cfi_handler. Also, when CFI error occurs, die handlers can use ESR_ELx value.

Consistently reporting the ESR value makes sense to me, so:

Mark.

Quoted 20 lines
---
 arch/arm64/kernel/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/traps.c +1 -1
index 0ccc063daccb..4a623e2e982b 100644
@@ -990,7 +990,7 @@ static int cfi_handler(struct pt_regs *regs, unsigned long esr)
 
 	switch (report_cfi_failure(regs, regs->pc, &target, type)) {
 	case BUG_TRAP_TYPE_BUG:
-		die("Oops - CFI", regs, 0);
+		die("Oops - CFI", regs, esr);
 		break;
 
 	case BUG_TRAP_TYPE_WARN:
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#3 lore raw
In reply to Sangmoon Kim
Quoted 5 lines · Sangmoon Kim

Commit 0f2cb928a154 ("arm64: consistently pass ESR_ELx to die()") caused all callers to pass the ESR_ELx value to die().

For consistency, this patch also adds esr to die() call of cfi_handler. Also, when CFI error occurs, die handlers can use ESR_ELx value.

maintainer Applied
#4 lore raw
In reply to Sangmoon Kim
Quoted 8 lines · Sangmoon Kim

Commit 0f2cb928a154 ("arm64: consistently pass ESR_ELx to die()") caused all callers to pass the ESR_ELx value to die().

For consistency, this patch also adds esr to die() call of cfi_handler. Also, when CFI error occurs, die handlers can use ESR_ELx value.

[...]

Applied to arm64 (for-next/core), thanks!

[1/1] arm64: pass ESR_ELx to die() of cfi_handler

      https://git.kernel.org/arm64/c/b61b82f81e09
Signature · 1 line
Catalin