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: <faf07eef-0a51-49f3-be48-0433952171ad@paulmck-laptop>
Date:   Sat, 22 Jul 2023 10:40:54 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Yun Levi <ppbuk5246@...il.com>
Cc:     frederic@...nel.org, quic_neeraju@...cinc.com,
        joel@...lfernandes.org, osh@...htriplett.org, boqun.feng@...il.com,
        rostedt@...dmis.org, mathieu.desnoyers@...icios.com,
        jiangshanlai@...il.com, qiang.zhang1211@...il.com,
        rcu@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcu: remove unnecessary check cpu_no_qs.norm on
 rcu_report_qs_rdp

On Sat, Jul 22, 2023 at 10:23:26AM +0100, Yun Levi wrote:
> Hi, Paul.
> 
> Thanks for looking into this :)
> 
> 
> > Except that rcu_report_qs_rdp() is invoked with interrupts enabled,
> > which means that there is some possibility of state changes up to the
> > raw_spin_lock_irqsave_rcu_node(rnp, flags) statement.
> >
> > So, did you check whether RCU's interrupt paths change this state?
> 
> In my narrow view,
> only a new gp started, cpu_no_qs.b.norm changes as true in the path of
> rcu_sched_clock_irq.
> But in that case, rcu_report_qs_rdp isn't called.
> 
> Did I understand your question well and are there any missed paths I didn't see?

Suppose that the scheduler-clock interrupt invoking rcu_sched_clock_irq()
happened just before the lock was acquired in rcu_report_qs_rdp().
Suppose further that the RCU grace-period kthread started a new grace
period just before that interrupt occurred.  Then mightn't that interrupt
notice the new grace period and set ->cpu_no_qs.b.norm to true before
fully returning?

							Thanx, Paul

> > Why not start with something like this?
> >
> >         if (!WARN_ON_ONCE(!rdp->cpu_no_qs.b.norm) ||
> >             rdp->gp_seq != rnp->gp_seq || rdp->gpwrap) {
> >
> 
> Yes. but with different message

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ