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:   Tue, 13 Jul 2021 14:16:15 +0800
From:   Zhouyi Zhou <zhouzhouyi@...il.com>
To:     paulmck@...nel.org
Cc:     josh@...htriplett.org, rostedt@...dmis.org,
        mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
        joel@...lfernandes.org, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] RCU: Fix macro name CONFIG_TASKS_RCU_TRACE

Thank you very much,
I went through the wordsmithed version, it looks exquisite!

Thank you for your encouragement.
Cheers
Zhouyi

On Tue, Jul 13, 2021 at 12:16 PM Paul E. McKenney <paulmck@...nel.org> wrote:
>
> On Tue, Jul 13, 2021 at 08:56:45AM +0800, zhouzhouyi@...il.com wrote:
> > From: Zhouyi Zhou <zhouzhouyi@...il.com>
> >
> > Hi Paul,
> >
> > During my studying of RCU, I did a grep in the kernel source tree.
> > I found there are 3 places where the macro name CONFIG_TASKS_RCU_TRACE
> > should be CONFIG_TASKS_TRACE_RCU instead.
> >
> > Without memory fencing, the idle/userspace task inspection may not
> > be so accurate.
> >
> > Thanks for your constant encouragement for my studying.
> >
> > Best Wishes
> > Zhouyi
> >
> > Signed-off-by: Zhouyi Zhou <zhouzhouyi@...il.com>
>
> Good eyes, and those could cause real bugs, so thank you!
>
> Could you please check the wordsmithed version below?
>
>                                                         Thanx, Paul
>
> ------------------------------------------------------------------------
>
> commit fdcf5524b64f2cc8e6201447644079d9f8d4c821
> Author: Zhouyi Zhou <zhouzhouyi@...il.com>
> Date:   Tue Jul 13 08:56:45 2021 +0800
>
>     RCU: Fix macro name CONFIG_TASKS_RCU_TRACE
>
>     This commit fixes several typos where CONFIG_TASKS_RCU_TRACE should
>     instead be CONFIG_TASKS_TRACE_RCU.  Among other things, these typos
>     could cause CONFIG_TASKS_TRACE_RCU_READ_MB=y kernels to suffer from
>     memory-ordering bugs that could result in false-positive quiescent
>     states and too-short grace periods.
>
>     Signed-off-by: Zhouyi Zhou <zhouzhouyi@...il.com>
>     Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
>
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index cfeb43bfc719..434d12fe2d4f 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -167,7 +167,7 @@ void synchronize_rcu_tasks(void);
>  # define synchronize_rcu_tasks synchronize_rcu
>  # endif
>
> -# ifdef CONFIG_TASKS_RCU_TRACE
> +# ifdef CONFIG_TASKS_TRACE_RCU
>  # define rcu_tasks_trace_qs(t)                                         \
>         do {                                                            \
>                 if (!likely(READ_ONCE((t)->trc_reader_checked)) &&      \
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index 27b74352cccf..a8e3acead6f6 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -1498,17 +1498,17 @@ static void noinstr rcu_dynticks_task_exit(void)
>  /* Turn on heavyweight RCU tasks trace readers on idle/user entry. */
>  static void rcu_dynticks_task_trace_enter(void)
>  {
> -#ifdef CONFIG_TASKS_RCU_TRACE
> +#ifdef CONFIG_TASKS_TRACE_RCU
>         if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB))
>                 current->trc_reader_special.b.need_mb = true;
> -#endif /* #ifdef CONFIG_TASKS_RCU_TRACE */
> +#endif /* #ifdef CONFIG_TASKS_TRACE_RCU */
>  }
>
>  /* Turn off heavyweight RCU tasks trace readers on idle/user exit. */
>  static void rcu_dynticks_task_trace_exit(void)
>  {
> -#ifdef CONFIG_TASKS_RCU_TRACE
> +#ifdef CONFIG_TASKS_TRACE_RCU
>         if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB))
>                 current->trc_reader_special.b.need_mb = false;
> -#endif /* #ifdef CONFIG_TASKS_RCU_TRACE */
> +#endif /* #ifdef CONFIG_TASKS_TRACE_RCU */
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ