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: <20220305141603.GY11184@worktop.programming.kicks-ass.net>
Date:   Sat, 5 Mar 2022 15:16:03 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>, Phil Auld <pauld@...hat.com>,
        Alex Belits <abelits@...vell.com>,
        Nicolas Saenz Julienne <nsaenz@...nel.org>,
        Xiongfeng Wang <wangxiongfeng2@...wei.com>,
        Neeraj Upadhyay <quic_neeraju@...cinc.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Yu Liao <liaoyu15@...wei.com>,
        Boqun Feng <boqun.feng@...il.com>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Marcelo Tosatti <mtosatti@...hat.com>,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Uladzislau Rezki <uladzislau.rezki@...y.com>,
        Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH 09/19] rcu/context-tracking: Remove rcu_irq_enter/exit()

On Wed, Mar 02, 2022 at 04:48:00PM +0100, Frederic Weisbecker wrote:
>  void ct_irq_enter_irqson(void)
>  {
> -	rcu_irq_enter_irqson();
> +	unsigned long flags;
> +
> +	local_irq_save(flags);
> +	ct_irq_enter();
> +	local_irq_restore(flags);
>  }
>  
>  void ct_irq_exit_irqson(void)
>  {
> -	rcu_irq_exit_irqson();
> +	unsigned long flags;
> +
> +	local_irq_save(flags);
> +	ct_irq_exit();
> +	local_irq_restore(flags);
>  }

I know you're just copying code around, but this is broken per
construction :/

On the irq_enter site, local_irq_save() will hit a tracepoint, which
requires RCU, which will only be made available by the ct_irq_enter().
Same in reverse for the exit case.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ