lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411180644.2023991-3-shorne@gmail.com>
Date: Thu, 11 Apr 2024 19:06:29 +0100
From: Stafford Horne <shorne@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Linux OpenRISC <linux-openrisc@...r.kernel.org>,
	Stafford Horne <shorne@...il.com>,
	Jonas Bonn <jonas@...thpole.se>,
	Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>
Subject: [PATCH 2/5] openrisc: traps: Remove calls to show_registers before die

The die function calls show_registers unconditionally.  Remove calls to
show_registers before calling die to avoid printing all registers and
stack status two times during a crash.

This was found when testing kernel trap and floating point exception
handling.

Signed-off-by: Stafford Horne <shorne@...il.com>
---
 arch/openrisc/kernel/traps.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
index 6d0fee912747..88fe27e4c10c 100644
--- a/arch/openrisc/kernel/traps.c
+++ b/arch/openrisc/kernel/traps.c
@@ -212,7 +212,6 @@ asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long address)
 		force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)address);
 	} else {
 		pr_emerg("KERNEL: Unaligned Access 0x%.8lx\n", address);
-		show_registers(regs);
 		die("Die:", regs, address);
 	}
 
@@ -225,7 +224,6 @@ asmlinkage void do_bus_fault(struct pt_regs *regs, unsigned long address)
 		force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address);
 	} else {		/* Kernel mode */
 		pr_emerg("KERNEL: Bus error (SIGBUS) 0x%.8lx\n", address);
-		show_registers(regs);
 		die("Die:", regs, address);
 	}
 }
@@ -421,7 +419,6 @@ asmlinkage void do_illegal_instruction(struct pt_regs *regs,
 	} else {		/* Kernel mode */
 		pr_emerg("KERNEL: Illegal instruction (SIGILL) 0x%.8lx\n",
 			 address);
-		show_registers(regs);
 		die("Die:", regs, address);
 	}
 }
-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ