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: <1370646215-6543-19-git-send-email-ddaney.cavm@gmail.com>
Date:	Fri,  7 Jun 2013 16:03:22 -0700
From:	David Daney <ddaney.cavm@...il.com>
To:	linux-mips@...ux-mips.org, ralf@...ux-mips.org,
	kvm@...r.kernel.org, Sanjay Lal <sanjayl@...asys.com>
Cc:	linux-kernel@...r.kernel.org, David Daney <david.daney@...ium.com>
Subject: [PATCH 18/31] mips/kvm: Add pt_regs slots for BadInstr and BadInstrP

From: David Daney <david.daney@...ium.com>

These save the instruction word to be used by MIPSVZ code for
instruction emulation.

Signed-off-by: David Daney <david.daney@...ium.com>
---
 arch/mips/include/asm/ptrace.h | 4 ++++
 arch/mips/kernel/asm-offsets.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h
index 5e6cd09..d080716 100644
--- a/arch/mips/include/asm/ptrace.h
+++ b/arch/mips/include/asm/ptrace.h
@@ -46,6 +46,10 @@ struct pt_regs {
 	unsigned long long mpl[3];	  /* MTM{0,1,2} */
 	unsigned long long mtp[3];	  /* MTP{0,1,2} */
 #endif
+#ifdef CONFIG_KVM_MIPSVZ
+	unsigned int cp0_badinstr;	/* Only populated on do_page_fault_{0,1} */
+	unsigned int cp0_badinstrp;	/* Only populated on do_page_fault_{0,1} */
+#endif
 } __aligned(8);
 
 struct task_struct;
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 03bf363..c5cc28f 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -71,6 +71,10 @@ void output_ptreg_defines(void)
 	OFFSET(PT_MPL, pt_regs, mpl);
 	OFFSET(PT_MTP, pt_regs, mtp);
 #endif /* CONFIG_CPU_CAVIUM_OCTEON */
+#ifdef CONFIG_KVM_MIPSVZ
+	OFFSET(PT_BADINSTR, pt_regs, cp0_badinstr);
+	OFFSET(PT_BADINSTRP, pt_regs, cp0_badinstrp);
+#endif
 	DEFINE(PT_SIZE, sizeof(struct pt_regs));
 	BLANK();
 }
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ