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:   Wed, 20 Jun 2018 07:23:49 +0200
From:   Dmitry Vyukov <dvyukov@...gle.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Paul McKenney <paulmck@...ux.vnet.ibm.com>,
        LKML <linux-kernel@...r.kernel.org>,
        syzkaller <syzkaller@...glegroups.com>
Subject: Re: [PATCH v2] kernel/hung_task.c: allow to set checking interval
 separately from timeout

On Wed, Jun 20, 2018 at 1:03 AM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
> On Mon, 11 Jun 2018 13:10:04 +0200 Dmitry Vyukov <dvyukov@...gle.com> wrote:
>
>> Currently task hung checking interval is equal to timeout,
>> as the result hung is detected anywhere between timeout and 2*timeout.
>> This is fine for most interactive environments, but this hurts automated
>> testing setups (syzbot). In an automated setup we need to strictly order
>> CPU lockup < RCU stall < workqueue lockup < task hung < silent loss,
>> so that RCU stall is not detected as task hung and task hung is not
>> detected as silent machine loss. The large variance in task hung
>> detection timeout requires setting silent machine loss timeout to
>> a very large value (e.g. if task hung is 3 mins, then silent loss
>> need to be set to ~7 mins). The additional 3 minutes significantly
>> reduce testing efficiency because usually we crash kernel within
>> a minute, and this can add hours to bug localization process as it
>> needs to do dozens of tests.
>>
>> Allow setting checking interval separately from timeout.
>> This allows to set timeout to, say, 3 minutes,
>> but checking interval to 10 secs.
>>
>> The interval is controlled via a new hung_task_check_interval_secs
>> sysctl, similar to the existing hung_task_timeout_secs sysctl.
>> The default value of 0 results in the current behavior:
>> checking interval is equal to timeout.
>
> I suppose we shoold do this:


Hi Andrew,

I see you added the patch and fixup to mm tree. Do you want me to
resend v3 with the fixup included, or how does this work?

Thanks


> --- a/kernel/sysctl.c~kernel-hung_taskc-allow-to-set-checking-interval-separately-from-timeout-fix
> +++ a/kernel/sysctl.c
> @@ -145,7 +145,10 @@ static int minolduid;
>  static int ngroups_max = NGROUPS_MAX;
>  static const int cap_last_cap = CAP_LAST_CAP;
>
> -/*this is needed for proc_doulongvec_minmax of sysctl_hung_task_timeout_secs */
> +/*
> + * This is needed for proc_doulongvec_minmax of sysctl_hung_task_timeout_secs
> + * and hung_task_check_interval_secs
> + */
>  #ifdef CONFIG_DETECT_HUNG_TASK
>  static unsigned long hung_task_timeout_max = (LONG_MAX/HZ);
>  #endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ