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: <20241101092342.30f15908@gandalf.local.home>
Date: Fri, 1 Nov 2024 09:23:42 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Yun Zhou <yun.zhou@...driver.com>
Cc: <mcgrof@...nel.org>, <kees@...nel.org>, <joel.granados@...nel.org>,
 <mhiramat@...nel.org>, <mathieu.desnoyers@...icios.com>,
 <linux-kernel@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>,
 <linux-trace-kernel@...r.kernel.org>
Subject: Re: [PATCH] kernel: add pid_max to pid_namespace

On Wed, 30 Oct 2024 13:29:33 +0800
Yun Zhou <yun.zhou@...driver.com> wrote:

> diff --git a/kernel/trace/pid_list.c b/kernel/trace/pid_list.c
> index 4966e6bbdf6f..c62b9b3cfb3d 100644
> --- a/kernel/trace/pid_list.c
> +++ b/kernel/trace/pid_list.c
> @@ -414,7 +414,7 @@ struct trace_pid_list *trace_pid_list_alloc(void)
>  	int i;
>  
>  	/* According to linux/thread.h, pids can be no bigger that 30 bits */
> -	WARN_ON_ONCE(pid_max > (1 << 30));
> +	WARN_ON_ONCE(init_pid_ns.pid_max > (1 << 30));
>  
>  	pid_list = kzalloc(sizeof(*pid_list), GFP_KERNEL);
>  	if (!pid_list)
> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
> index c866991b9c78..e51851d64e4d 100644
> --- a/kernel/trace/trace.h
> +++ b/kernel/trace/trace.h
> @@ -715,8 +715,6 @@ extern unsigned long tracing_thresh;
>  
>  /* PID filtering */
>  
> -extern int pid_max;
> -
>  bool trace_find_filtered_pid(struct trace_pid_list *filtered_pids,
>  			     pid_t search_pid);
>  bool trace_ignore_this_task(struct trace_pid_list *filtered_pids,
> diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c
> index 8a407adb0e1c..c20c80abe065 100644
> --- a/kernel/trace/trace_sched_switch.c
> +++ b/kernel/trace/trace_sched_switch.c
> @@ -442,7 +442,7 @@ int trace_alloc_tgid_map(void)
>  	if (tgid_map)
>  		return 0;
>  
> -	tgid_map_max = pid_max;
> +	tgid_map_max = init_pid_ns.pid_max;
>  	map = kvcalloc(tgid_map_max + 1, sizeof(*tgid_map),
>  		       GFP_KERNEL);
>  	if (!map)


Acked-by: Steven Rostedt (Google) <rostedt@...dmis>org>

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ