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:   Sun, 18 Jul 2021 06:03:34 +0800
From:   Zhouyi Zhou <zhouzhouyi@...il.com>
To:     paulmck@...nel.org
Cc:     Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Josh Triplett <josh@...htriplett.org>,
        rostedt <rostedt@...dmis.org>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        "Joel Fernandes, Google" <joel@...lfernandes.org>,
        rcu <rcu@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>, apw@...onical.com,
        joe@...ches.com, ast@...nel.org, daniel@...earbox.net,
        andrii@...nel.org, kafai@...com, songliubraving@...com, yhs@...com,
        john.fastabend@...il.com, kpsingh@...nel.org, bpf@...r.kernel.org,
        mingo@...nel.org
Subject: Re: [PATCH] RCU: Fix macro name CONFIG_TASKS_RCU_TRACE

Hi Paul
During the research, I found a already existing tool to detect
undefined Kconfig macro:
scripts/checkkconfigsymbols.py. It is marvellous!

By invoking ./scripts/checkkconfigsymbols.py > /tmp/log, I found
following possibly undefined Kconfig macros
which may need our attention:

PREEMPT_LOCK
Referencing files: include/linux/lockdep_types.h

PREEMT_DYNAMIC
Referencing files: kernel/entry/common.c

TREE_PREEMPT_RCU
Referencing files: arch/sh/configs/sdk7786_defconfig

RCU_CPU_STALL_INFO
Referencing files: arch/xtensa/configs/nommu_kc705_defconfig

RCU_NOCB_CPU_ALL
Referencing files:
Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.rst

RCU_TORTURE_TESTS
Referencing files: kernel/rcu/rcutorture.c

and finally the macro which drive me to do this research

TASKS_RCU_TRACE
Referencing files: include/linux/rcupdate.h, kernel/rcu/tree_plugin.h

On Fri, Jul 16, 2021 at 2:09 AM Paul E. McKenney <paulmck@...nel.org> wrote:
>
> On Thu, Jul 15, 2021 at 04:45:04PM +0800, Zhouyi Zhou wrote:
> > On Thu, Jul 15, 2021 at 11:51 AM Paul E. McKenney <paulmck@...nel.org> wrote:
> > >
> > > On Wed, Jul 14, 2021 at 12:44:36PM +0800, Zhouyi Zhou wrote:
> > > > On Tue, Jul 13, 2021 at 11:19 PM Paul E. McKenney <paulmck@...nel.org> wrote:
> > > > >
> > > > > On Tue, Jul 13, 2021 at 06:18:12AM -0700, Paul E. McKenney wrote:
> > > > > > On Tue, Jul 13, 2021 at 09:09:04AM -0400, Mathieu Desnoyers wrote:
> > > > > > > ----- On Jul 13, 2021, at 12:16 AM, paulmck 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!
> > > > > > >
> > > > > > > Hi Paul,
> > > > > > >
> > > > > > > This makes me wonder: what is missing testing-wise in rcutorture to
> > > > > > > catch those issues with testing before they reach mainline ?
> > > > > >
> > > > > > My guess:  Running on weakly ordered architectures.  ;-)
> > > > >
> > > > > And another guess:  A tool that identifies use of Kconfig options
> > > > > that are not defined in any Kconfig* file.
> > > > Based on Paul's second guess ;-),  I did a small research, and I think
> > > > the best answer is to modify scripts/checkpatch.pl. We modify checkpatch.pl
> > > > to identify use of Kconfig options that are not defined in any Kconfig* file.
> > > >
> > > > As I am a C/C++ programmer, I would be glad to take some time to learn
> > > > perl (checkpatch is implented in perl) first if no other volunteer is
> > > > about to do it ;-)
> > >
> > > I haven't heard anyone else volunteer.  ;-)
> > >
> > > Others might have opinions on where best to implement these checks,
> > > but I must confess that I have not given it much thought.
> > I recklessly cc the maintainers of checkpatch.pl without your
> > permission to see others' opion,
> > and I begin to study perl at the same time, after all, learning
> > something is always good ;-)
>
> Works for me!
>
>                                                         Thanx, Paul
Best Wishes
Zhouyi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ