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:   Fri, 14 Dec 2018 12:31:11 -0800
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc:     Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel/hung_task.c: Break RCU locks based on jiffies.

On Sat, 15 Dec 2018 00:17:38 +0900 Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp> wrote:

> check_hung_uninterruptible_tasks() is currently calling rcu_lock_break()
> for every 1024 threads. But check_hung_task() is very slow if printk()
> was called, and is very fast otherwise. If many threads within some 1024
> threads called printk(), the RCU grace period might be extended enough
> to trigger RCU stall warnings. Therefore, calling rcu_lock_break() for
> every some fixed jiffies will be safer.
> 
> --- a/kernel/hung_task.c
> +++ b/kernel/hung_task.c
> @@ -34,7 +34,7 @@
>   * is disabled during the critical section. It also controls the size of
>   * the RCU grace period. So it needs to be upper-bound.
>   */
> -#define HUNG_TASK_BATCHING 1024
> +#define HUNG_TASK_LOCK_BREAK (HZ / 10)

This won't work correctly if rcu_cpu_stall_timeout is set to something
stupidly small.  Perhaps is would be better to make this code aware of
the current rcu_cpu_stall_timeout setting?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ