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]
Date:   Wed, 6 May 2020 22:11:06 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     x86@...nel.org, "Paul E. McKenney" <paulmck@...nel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Alexandre Chartre <alexandre.chartre@...cle.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Joel Fernandes <joel@...lfernandes.org>,
        Juergen Gross <jgross@...e.com>,
        Brian Gerst <brgerst@...il.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Will Deacon <will@...nel.org>
Subject: Re: [patch V4 part 5 05/31] x86/entry: Switch XEN/PV hypercall entry
 to IDTENTRY


On 5/5/20 9:53 AM, Thomas Gleixner wrote:
> --- a/arch/x86/xen/setup.c
> +++ b/arch/x86/xen/setup.c
> @@ -20,6 +20,7 @@
>  #include <asm/setup.h>
>  #include <asm/acpi.h>
>  #include <asm/numa.h>
> +#include <asm/idtentry.h>
>  #include <asm/xen/hypervisor.h>
>  #include <asm/xen/hypercall.h>
>  
> @@ -993,7 +994,8 @@ static void __init xen_pvmmu_arch_setup(
>  	HYPERVISOR_vm_assist(VMASST_CMD_enable,
>  			     VMASST_TYPE_pae_extended_cr3);
>  
> -	if (register_callback(CALLBACKTYPE_event, xen_hypervisor_callback) ||
> +	if (register_callback(CALLBACKTYPE_event,
> +			      asm_exc_xen_hypervisor_callback) ||


This ...


>  	    register_callback(CALLBACKTYPE_failsafe, xen_failsafe_callback))
>  		BUG();
>  
> --- a/arch/x86/xen/smp_pv.c
> +++ b/arch/x86/xen/smp_pv.c
> @@ -27,6 +27,7 @@
>  #include <asm/paravirt.h>
>  #include <asm/desc.h>
>  #include <asm/pgtable.h>
> +#include <asm/idtentry.h>
>  #include <asm/cpu.h>
>  
>  #include <xen/interface/xen.h>
> @@ -347,7 +348,7 @@ cpu_initialize_context(unsigned int cpu,
>  	ctxt->gs_base_kernel = per_cpu_offset(cpu);
>  #endif
>  	ctxt->event_callback_eip    =
> -		(unsigned long)xen_hypervisor_callback;
> +		(unsigned long)asm_exc_xen_hypervisor_callback;


... and this should be xen_asm_exc_xen_hypervisor_callback (we need to
pop %rcx and %r11).


And then Xen PV guest boots.


-boris


>  	ctxt->failsafe_callback_eip =
>  		(unsigned long)xen_failsafe_callback;
>  	per_cpu(xen_cr3, cpu) = __pa(swapper_pg_dir);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ