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: <IA1PR11MB61710677ACB74D5D0AED929689AA9@IA1PR11MB6171.namprd11.prod.outlook.com>
Date:   Wed, 22 Feb 2023 05:44:29 +0000
From:   "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To:     "Zhang, Qiang1" <qiang1.zhang@...el.com>,
        "paulmck@...nel.org" <paulmck@...nel.org>,
        "frederic@...nel.org" <frederic@...nel.org>,
        "joel@...lfernandes.org" <joel@...lfernandes.org>
CC:     "rcu@...r.kernel.org" <rcu@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] rcu-tasks: Allow RCU-Task trace stall warning dump late
 IPI CPU stacks

> From: Zqiang <qiang1.zhang@...el.com>
> Sent: Tuesday, February 21, 2023 12:32 PM
> To: paulmck@...nel.org; frederic@...nel.org; joel@...lfernandes.org
> Cc: rcu@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH] rcu-tasks: Allow RCU-Task trace stall warning dump late IPI
> CPU stacks
> 
> The task structure's->trc_ipi_to_cpu and percpu trc_ipi_to_cpu is used to
> record whether the IPI is completed, if the percpu trc_ipi_to_cpu is true and
> task structure's->trc_ipi_to_cpu is non-negative value, indicates that IPI is not
> completed, if the IPI is unresponsive for along time for some reason, there
> will be a possibility of causing RCU-Tasks trace stall. this commit therefore
> allow dump late IPI CPU stacks to show the path that current CPU is executing.
> 
> Signed-off-by: Zqiang <qiang1.zhang@...el.com>
> ---
>  In the real world, the IPI delay will be very small, so the  probability of
> triggering dump_cpu_stack() may be very low,  so if I makes noise, please
> ignore it.
> 
>  kernel/rcu/tasks.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index
> baf7ec178155..85237fc1d0f0 100644
> --- a/kernel/rcu/tasks.h
> +++ b/kernel/rcu/tasks.h
> @@ -1658,8 +1658,13 @@ static void show_stalled_ipi_trace(void)
>  	int cpu;
> 
>  	for_each_possible_cpu(cpu)
> -		if (per_cpu(trc_ipi_to_cpu, cpu))
> +		if (per_cpu(trc_ipi_to_cpu, cpu)) {
>  			pr_alert("\tIPI outstanding to CPU %d\n", cpu);
> +			if (cpu_is_offline(cpu))
> +				pr_alert("offline CPU %d blocking gp\n", cpu);
> +			else
> +				dump_cpu_task(cpu);

check_all_holdout_tasks_trace() -> show_stalled_task_trace() has already showed the states/traces of tasks stalling the current RCU tasks trace GP.
Perhaps we don't need to dump these tasks again here.

> +		}
>  }
> 
>  /* Do one scan of the holdout list. */
> --
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ