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-next>] [day] [month] [year] [list]
Message-Id: <20230412141216.c8f2c1313f34ee0100ac9ae4@linux-foundation.org>
Date:   Wed, 12 Apr 2023 14:12:16 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Chunguang Wu <aman2008@...com>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Alexey Dobriyan <adobriyan@...il.com>
Subject: Re: [PATCH] fs/proc: add Kthread flag to /proc/$pid/status

On Wed, 12 Apr 2023 22:34:02 +0800 Chunguang Wu <aman2008@...com> wrote:

> user can know that a process is kernel thread or not.
> 
> ...
>
> --- a/fs/proc/array.c
> +++ b/fs/proc/array.c
> @@ -434,6 +434,12 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
>  
>  	task_state(m, ns, pid, task);
>  
> +	if ((mm == NULL) || (task->flags & PF_KTHREAD)) {
> +		seq_puts(m, "Kthread:\tYes\n");
> +	} else {
> +		seq_puts(m, "Kthread:\tNo\n");
> +	}
> +
>  	if (mm) {
>  		task_mem(m, mm);
>  		task_core_dumping(m, task);

Well..   Why is this information useful?  What is the use case?

There are many ways of working this out from the existing output - why
is this change required?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ