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:   Mon, 11 May 2020 16:13:48 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Alexandre Chartre <alexandre.chartre@...cle.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>, 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 Mon, May 11, 2020 at 03:53:17PM +0200, Alexandre Chartre wrote:
> 
> 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." ?

The problem is that rcu_irq_enter() uses per-cpu state and expect
rcu_irq_exit() to be called on the very same cpu we did enter on.

However, #PF likes to schedule and breaks that expectation.

While there are more exceptions that schedule when from userspace, #PF
is the only one that does so when from kernel space, which makes is
'special'.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ