x86/PV: make '0' debug key dump Dom0's stacks again

The conversion to __get_guest() failed to account for the fact that for
remote vCPU-s dumping gets done through a pointer obtained from
map_domain_page(): __get_guest() arranges for (apparent) accesses to
hypervisor space to cause #GP(0).

Fixes: 6a1d72d373 ('x86: split __{get,put}_user() into "guest" and "unsafe" variants')
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
This commit is contained in:
Jan Beulich committed 2021-10-19 10:07:00 +02:00
1 parent 5e97b97bc2
commit 4843546fef
1 file changed
+6 -2
+6 -2
View File
@@ -275,7 +275,9 @@ static void compat_show_guest_stack(struct vcpu *v,
{
if ( (((long)stack - 1) ^ ((long)(stack + 1) - 1)) & mask )
break;
if ( __get_guest(addr, stack) )
if ( stack_page )
addr = *stack;
else if ( __get_guest(addr, stack) )
{
if ( i != 0 )
printk("\n ");
@@ -344,7 +346,9 @@ static void show_guest_stack(struct vcpu *v, const struct cpu_user_regs *regs)
{
if ( (((long)stack - 1) ^ ((long)(stack + 1) - 1)) & mask )
break;
if ( __get_guest(addr, stack) )
if ( stack_page )
addr = *stack;
else if ( __get_guest(addr, stack) )
{
if ( i != 0 )
printk("\n ");
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.