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: <20200529164132.6fb46471@canb.auug.org.au>
Date:   Fri, 29 May 2020 16:41:32 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     "Paul E. McKenney" <paulmck@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>
Cc:     Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Joel Fernandes (Google)" <joel@...lfernandes.org>
Subject: Re: linux-next: manual merge of the rcu tree with the tip tree

Hi all,

On Fri, 29 May 2020 16:22:34 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> Hi all,
> 
> Today's linux-next merge of the rcu tree got a conflict in:
> 
>   kernel/rcu/tree.c
> 
> between commits:
> 
>   806f04e9fd2c ("rcu: Allow for smp_call_function() running callbacks from idle")
>   aaf2bc50df1f ("rcu: Abstract out rcu_irq_enter_check_tick() from rcu_nmi_enter()")
> 
> from the tip tree and commit:
> 
>   c0601bb42994 ("rcu/tree: Clean up dynticks counter usage")
>   3f3baaf3ac07 ("rcu/tree: Remove dynticks_nmi_nesting counter")
> 
> from the rcu tree.
> 
> I fixed it up (I punted and took some from the former and some from the
> latter) and can carry the fix as necessary. This is now fixed as far as
> linux-next is concerned, but any non trivial conflicts should be mentioned
> to your upstream maintainer when your tree is submitted for merging.
> You may also want to consider cooperating with the maintainer of the
> conflicting tree to minimise any particularly complex conflicts.

I redid this and the resolution is below, but you should look at the
final file when I do the release.

-- 
Cheers,
Stephen Rothwell

diff --cc kernel/rcu/tree.c
index c716eadc7617,78125749638f..1426b968eec1
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@@ -427,14 -385,8 +386,12 @@@ EXPORT_SYMBOL_GPL(rcu_momentary_dyntick
   */
  static int rcu_is_cpu_rrupt_from_idle(void)
  {
- 	long nesting;
- 
 -	/* Called only from within the scheduling-clock interrupt */
 -	lockdep_assert_in_irq();
 +	/*
 +	 * Usually called from the tick; but also used from smp_function_call()
 +	 * for expedited grace periods. This latter can result in running from
 +	 * the idle task, instead of an actual IPI.
 +	 */
 +	lockdep_assert_irqs_disabled();
  
  	/* Check for counter underflows */
  	RCU_LOCKDEP_WARN(__this_cpu_read(rcu_data.dynticks_nesting) < 0,
@@@ -778,24 -718,6 +723,21 @@@ void rcu_irq_exit_preempt(void
  			 "RCU in extended quiescent state!");
  }
  
 +#ifdef CONFIG_PROVE_RCU
 +/**
 + * rcu_irq_exit_check_preempt - Validate that scheduling is possible
 + */
 +void rcu_irq_exit_check_preempt(void)
 +{
 +	lockdep_assert_irqs_disabled();
 +
 +	RCU_LOCKDEP_WARN(__this_cpu_read(rcu_data.dynticks_nesting) <= 0,
 +			 "RCU dynticks_nesting counter underflow/zero!");
- 	RCU_LOCKDEP_WARN(__this_cpu_read(rcu_data.dynticks_nmi_nesting) !=
- 			 DYNTICK_IRQ_NONIDLE,
- 			 "Bad RCU  dynticks_nmi_nesting counter\n");
 +	RCU_LOCKDEP_WARN(rcu_dynticks_curr_cpu_in_eqs(),
 +			 "RCU in extended quiescent state!");
 +}
 +#endif /* #ifdef CONFIG_PROVE_RCU */
 +
  /*
   * Wrapper for rcu_irq_exit() where interrupts are enabled.
   *

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ