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: <8734ftpmku.wl-kuninori.morimoto.gx@renesas.com>
Date: Tue, 4 Mar 2025 02:16:17 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Andy Shevchenko <andy@...nel.org>, Kees Cook <kees@...nel.org>, linux-hardening@...r.kernel.org
Subject: [SAMPLE] microblaze: kernel: use string choices helper

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
---
 arch/microblaze/kernel/exceptions.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/microblaze/kernel/exceptions.c b/arch/microblaze/kernel/exceptions.c
index fd153d5fab98..d287a324bdee 100644
--- a/arch/microblaze/kernel/exceptions.c
+++ b/arch/microblaze/kernel/exceptions.c
@@ -73,7 +73,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
 
 #if 0
 	pr_warn("Exception %02x in %s mode, FSR=%08x PC=%08x ESR=%08x\n",
-			type, user_mode(regs) ? "user" : "kernel", fsr,
+			type, str_user_kernel(user_mode(regs)), fsr,
 			(unsigned int) regs->pc, (unsigned int) regs->esr);
 #endif
 
@@ -138,7 +138,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
 	/* FIXME what to do in unexpected exception */
 		pr_warn("Unexpected exception %02x PC=%08x in %s mode\n",
 			type, (unsigned int) addr,
-			kernel_mode(regs) ? "kernel" : "user");
+			str_kernel_user(kernel_mode(regs)));
 	}
 	return;
 }
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ