* [Bug 197381] New: reading segmented memory in kvm
@ 2017-10-25 7:57 bugzilla-daemon
0 siblings, 0 replies; only message in thread
From: bugzilla-daemon @ 2017-10-25 7:57 UTC (permalink / raw)
To: kvm
https://bugzilla.kernel.org/show_bug.cgi?id=197381
Bug ID: 197381
Summary: reading segmented memory in kvm
Product: Virtualization
Version: unspecified
Kernel Version: 4.9.0
Hardware: i386
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: kvm
Assignee: virtualization_kvm@kernel-bugs.osdl.org
Reporter: dekel35@walla.com
Regression: No
I am trying to get the "current" pointer of a running thread. The "current"
resides in a per_cpu segment and translates to gs:current_task. I have added
the following code to emulate.c at em_syscall() calling segmented_read():
{
int rc;
struct segmented_address addr;
u64 *ptr;
addr.ea = 0xd380;
addr.seg = VCPU_SREG_GS;
rc = segmented_read(ctxt, addr, &ptr, sizeof(ptr));
printk("%s::%s - cr3 %p rc=%d ptr:%p\n",
__BASE_FILE__, __func__,
(void *)vcpu->nitro.event.sregs.cr3,
rc, ptr);
}
in the log I see:
[49478.575263] arch/x86/kvm/emulate.c::em_syscall - cr3 000000007aaa2000 rc=2
ptr:0000000000000004
which implies that the segmented read failed. is there something else that
needs to be done? alternatively, is there a way to get the "current" pointer?
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-25 7:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-25 7:57 [Bug 197381] New: reading segmented memory in kvm bugzilla-daemon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox