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: <72cb3e24-3f82-7e2a-7630-233749c780c4@oracle.com>
Date:   Mon, 11 May 2020 15:53:17 +0200
From:   Alexandre Chartre <alexandre.chartre@...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>,
        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>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        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 07/31] x86/entry: Provide
 idtentry_entry/exit_cond_rcu()


On 5/5/20 3:53 PM, Thomas Gleixner wrote:
> The pagefault handler cannot use the regular idtentry_enter() because on
> that invokes rcu_irq_enter() the pagefault was caused in the kernel.

I am struggling to understand this part of the sentence: "because on
that invokes rcu_irq_enter() the pagefault was caused in the kernel."

Do you mean: "because that invokes rcu_irq_enter() if the pagefault was
caused in the kernel." ?

alex.

> Not a
> problem per se, but kernel side page faults can schedule which is not
> possible without invoking rcu_irq_exit().
> 
> Adding rcu_irq_exit() and a matching rcu_irq_enter() into the actual
> pagefault handling code is possible, but not pretty either.
> 
> Provide idtentry_entry/exit_cond_rcu() which calls rcu_irq_enter() only
> when RCU is not watching. While this is not a legit kernel #PF establishing
> RCU before handling it avoids RCU side effects which might affect
> debugability.
> 
> The function is also useful for implementing lightweight scheduler IPI
> entry handling later.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>   arch/x86/entry/common.c         |  119 ++++++++++++++++++++++++++++++++++------
>   arch/x86/include/asm/idtentry.h |    3 +
>   2 files changed, 106 insertions(+), 16 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ