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] [day] [month] [year] [list]
Message-Id: <20210218232936.c3158cc304e13151484de3c2@kernel.org>
Date:   Thu, 18 Feb 2021 23:29:36 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Uladzislau Rezki <urezki@...il.com>
Cc:     paulmck@...nel.org,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>, RCU <rcu@...r.kernel.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Daniel Axtens <dja@...ens.net>,
        Frederic Weisbecker <frederic@...nel.org>,
        Neeraj Upadhyay <neeraju@...eaurora.org>,
        Joel Fernandes <joel@...lfernandes.org>,
        Michal Hocko <mhocko@...e.com>,
        "Theodore Y . Ts'o" <tytso@....edu>,
        Oleksiy Avramchenko <oleksiy.avramchenko@...ymobile.com>,
        rostedt@...dmis.org
Subject: Re: [PATCH 2/2] rcu-tasks: add RCU-tasks self tests

On Thu, 18 Feb 2021 09:36:36 +0100
Uladzislau Rezki <urezki@...il.com> wrote:

> On Thu, Feb 18, 2021 at 02:03:07PM +0900, Masami Hiramatsu wrote:
> > On Wed, 17 Feb 2021 10:17:38 -0800
> > "Paul E. McKenney" <paulmck@...nel.org> wrote:
> > 
> > > > > 1.	Spawn ksoftirqd earlier.
> > > > > 
> > > > > 2.	Suppress attempts to awaken ksoftirqd before it exists,
> > > > > 	forcing all ksoftirq execution on the back of interrupts.
> > > > > 
> > > > > Uladzislau and I each produced patches for #1, and I produced a patch
> > > > > for #2.
> > > > > 
> > > > > The only other option I know of is to push the call to init_kprobes()
> > > > > later in the boot sequence, perhaps to its original subsys_initcall(),
> > > > > or maybe only as late as core_initcall().  I added Masami and Steve on
> > > > > CC for their thoughts on this.
> > > > > 
> > > > > Is there some other proper fix that I am missing?
> > > > 
> > > > Oh, I missed that the synchronize_rcu_tasks() will be involved the kprobes
> > > > in early stage. Does the problem only exist in the synchronize_rcu_tasks()
> > > > instead of synchronize_rcu()? If so I can just stop optimizer in early stage
> > > > because I just want to enable kprobes in early stage, but not optprobes.
> > > > 
> > > > Does the following patch help?
> > > 
> > > It does look to me like it would!  I clearly should have asked you about
> > > this a couple of months ago.  ;-)
> > > 
> > > The proof of the pudding would be whether the powerpc guys can apply
> > > this to v5.10-rc7 and have their kernel come up without hanging at boot.
> > 
> > Who could I ask for testing this patch, Uladzislau?
> > I think the test machine which enough slow or the kernel has much initcall
> > to run optimization thread while booting.
> > In my environment, I could not reproduce that issue because the optimizer
> > was sheduled after some tick passed. At that point, ksoftirqd has already
> > been initialized.
> > 
> From my end i did some simulation and had a look at your change. So the
> patch works on my setup. I see that optimization of kprobes is deferred
> and can be initiated only from the subsys_initcall() phase. So the sequence
> should be correct for v5.10-rc7:
> 
> 1. ksoftirq is setup early_initcall();

    also kprobe framework is initialized in early_initcall() and
    kprobes smoketest (register/unregister probes) executed.

> 2. rcu_spawn_tasks_* are setup in the core_initcall();

    and kprobe events are setup in core_initcall_sync() (via trace_boot);

> 3. an optimization of kprobes are invoked from subsys_initcall().

   At this point, all kprobes which can be optimized will be actually
   optimized.


> For real test on power-pc you can ask Daniel Axtens <dja@...ens.net> for help. 

OK, I'll CC to Daniel.

Thank you,

-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ