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: <2c4b693f-afd8-302b-99c7-d1f0444cd767@oracle.com>
Date:   Thu, 14 May 2020 12:24:37 -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>,
        Tom Lendacky <thomas.lendacky@....com>,
        Wei Liu <wei.liu@...nel.org>,
        Michael Kelley <mikelley@...rosoft.com>,
        Jason Chen CJ <jason.cj.chen@...el.com>,
        Zhao Yakui <yakui.zhao@...el.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>
Subject: Re: [patch V5 09/38] x86/entry: Switch XEN/PV hypercall entry to
 IDTENTRY

On 5/12/20 5:01 PM, Thomas Gleixner wrote:
> Convert the XEN/PV hypercall to IDTENTRY:
>
>   - Emit the ASM stub with DECLARE_IDTENTRY
>   - Remove the ASM idtentry in 64bit
>   - Remove the open coded ASM entry code in 32bit
>   - Remove the old prototypes
>
> The handler stubs need to stay in ASM code as it needs corner case handling
> and adjustment of the stack pointer.
>
> Provide a new C function which invokes the entry/exit handling and calls
> into the XEN handler on the interrupt stack.
>
> The exit code is slightly different from the regular idtentry_exit() on
> non-preemptible kernels. If the hypercall is preemptible and need_resched()
> is set then XEN provides a preempt hypercall scheduling function. Add it as
> conditional path to __idtentry_exit() so the function can be reused.
>
> __idtentry_exit() is forced inlined so on the regular idtentry_exit() path
> the extra condition is optimized out by the compiler.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> Cc: Juergen Gross <jgross@...e.com>
> ---
> V5: Move DECLARE_PER_CPU(bool, xen_in_preemptible_hcall) out of ifdeffery
>     to avoid #ifdeffery in idtentry_exit().
>     Convert to the reworked stack switching helper
>     Fixed up the XEN callback initialization (Boris O.)
> ---
>  arch/x86/entry/common.c         |   57 ++++++++++++++++++++++++++++++++++++++--
>  arch/x86/entry/entry_32.S       |   17 ++++++-----
>  arch/x86/entry/entry_64.S       |   22 ++++-----------
>  arch/x86/include/asm/idtentry.h |   13 +++++++++
>  arch/x86/xen/setup.c            |    4 ++
>  arch/x86/xen/smp_pv.c           |    3 +-
>  arch/x86/xen/xen-asm_32.S       |   12 ++++----
>  arch/x86/xen/xen-asm_64.S       |    2 -
>  arch/x86/xen/xen-ops.h          |    1 
>  drivers/xen/preempt.c           |    2 -
>  include/xen/xen-ops.h           |    7 +++-
>  11 files changed, 103 insertions(+), 37 deletions(-)


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ