linux/arch
James Hogan 18e3cd7c46 KVM: MIPS: Fix trace event to save PC directly
commit b3cffac04e upstream.

Currently the guest exit trace event saves the VCPU pointer to the
structure, and the guest PC is retrieved by dereferencing it when the
event is printed rather than directly from the trace record. This isn't
safe as the printing may occur long afterwards, after the PC has changed
and potentially after the VCPU has been freed. Usually this results in
the same (wrong) PC being printed for multiple trace events. It also
isn't portable as userland has no way to access the VCPU data structure
when interpreting the trace record itself.

Lets save the actual PC in the structure so that the correct value is
accessible later.

Fixes: 669e846e6c ("KVM/MIPS32: MIPS arch specific APIs for KVM")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 13:22:29 +01:00
..
alpha arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
arc ARC: fix page address calculation if PAGE_OFFSET != LINUX_LINK_BASE 2015-03-06 14:40:52 -08:00
arm hx4700: regulator: declare full constraints 2015-03-06 14:40:52 -08:00
arm64 arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian 2015-03-06 14:40:52 -08:00
avr32 arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
blackfin blackfin updates for Linux 3.10 2013-05-10 07:21:16 -07:00
c6x arch: c6x: mm: include "asm/uaccess.h" to pass compiling 2013-07-21 18:21:29 -07:00
cris arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
frv arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
h8300 We get rid of the general module prefix confusion with a binary config option, 2013-05-05 10:58:06 -07:00
hexagon arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
ia64 arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
m32r arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
m68k arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
metag metag: Fix KSTK_EIP() and KSTK_ESP() macros 2015-03-06 14:40:53 -08:00
microblaze arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
mips KVM: MIPS: Fix trace event to save PC directly 2015-03-18 13:22:29 +01:00
mn10300 arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
openrisc arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
parisc arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
powerpc axonram: Fix bug in direct_access 2015-03-06 14:40:50 -08:00
s390 crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:57 -08:00
score arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
sh arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
sparc crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:57 -08:00
tile arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
um um: Skip futex_atomic_cmpxchg_inatomic() test 2015-01-27 07:52:33 -08:00
unicore32 arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
x86 KVM: emulate: fix CMPXCHG8B on 32-bit hosts 2015-03-18 13:22:29 +01:00
xtensa arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
.gitignore
Kconfig microblaze: fix clone syscall 2013-08-20 08:43:02 -07:00