Re: [PATCH v15 1/3] /proc/pid/status: Add support for architecture specific output

From: Andrew Morton
Date: Tue Apr 16 2019 - 19:01:48 EST


On Tue, 16 Apr 2019 14:32:48 +0800 Aubrey Li <aubrey.li@xxxxxxxxxxxxxxx> wrote:

> The architecture specific information of the running processes could
> be useful to the userland. Add support to examine process architecture
> specific information externally.

The implementation looks just fine to me. Have you had any feedback on
the overall desirability of adding this feature?

> --- a/fs/proc/array.c
> +++ b/fs/proc/array.c
> @@ -96,6 +96,11 @@
> #include <asm/processor.h>
> #include "internal.h"
>
> +/* Add support for architecture specific output in /proc/pid/status */
> +#ifndef arch_proc_pid_status
> +#define arch_proc_pid_status(m, task)
> +#endif

To this I suggest adding

/* arch_proc_pid_status() must be defined in asm/processor.h */

Because we've regularly had different architectures defining such things
in different headers, resulting in a mess.