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]
Message-ID: <20240312111826.1b5bec27@gandalf.local.home>
Date: Tue, 12 Mar 2024 11:18:26 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: wenyang.linux@...mail.com
Cc: Andrew Morton <akpm@...ux-foundation.org>, Ingo Molnar
 <mingo@...nel.org>, Oleg Nesterov <oleg@...hat.com>, Mathieu Desnoyers
 <mathieu.desnoyers@...icios.com>, Masami Hiramatsu <mhiramat@...nel.org>,
 Christian Brauner <brauner@...nel.org>, Mel Gorman
 <mgorman@...hsingularity.net>, Peter Zijlstra <peterz@...radead.org>,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] exit: move trace_sched_process_exit earlier in
 do_exit()

On Sun, 10 Mar 2024 13:25:29 +0800
wenyang.linux@...mail.com wrote:

> From: Wen Yang <wenyang.linux@...mail.com>
> 
> Currently coredump_task_exit() takes some time to wait for the generation
> of the dump file. But if the user-space wants to receive a notification
> as soon as possible it maybe inconvenient.
> 
> Move trace_sched_process_exit() earlier in do_exit().
> This way a user-space monitor could detect the exits and
> potentially make some preparations in advance.
> 
> Oleg initially proposed this suggestion, and Steven further provided some
> detailed suggestions, and Mathieu carefully checked the historical code
> and said:
> : I've checked with Matthew Khouzam (maintainer of Trace Compass)
> : which care about this tracepoint, and we have not identified any
> : significant impact of moving it on its model of the scheduler, other
> : than slightly changing its timing.
> : I've also checked quickly in lttng-analyses and have not found
> : any code that care about its specific placement.
> : So I would say go ahead and move it earlier in do_exit(), it's
> : fine by me.
> 

I'm putting together last minute minor patches for this merge window. I can
take this if nobody has any objections.

-- Steve


> Suggested-by: Oleg Nesterov <oleg@...hat.com>
> Suggested-by: Steven Rostedt <rostedt@...dmis.org>
> Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Signed-off-by: Wen Yang <wenyang.linux@...mail.com>
> Cc: Masami Hiramatsu <mhiramat@...nel.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Christian Brauner <brauner@...nel.org>
> Cc: Mel Gorman <mgorman@...hsingularity.net>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: linux-kernel@...r.kernel.org
> ---
>  kernel/exit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/exit.c b/kernel/exit.c
> index 493647fd7c07..2cff6533cb39 100644
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -826,6 +826,7 @@ void __noreturn do_exit(long code)
>  
>  	WARN_ON(tsk->plug);
>  
> +	trace_sched_process_exit(tsk);
>  	kcov_task_exit(tsk);
>  	kmsan_task_exit(tsk);
>  
> @@ -866,7 +867,6 @@ void __noreturn do_exit(long code)
>  
>  	if (group_dead)
>  		acct_process();
> -	trace_sched_process_exit(tsk);
>  
>  	exit_sem(tsk);
>  	exit_shm(tsk);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ