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: <20180329102642.23fa246a@gandalf.local.home>
Date:   Thu, 29 Mar 2018 10:26:42 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Wang Yu <yuwang@...ux.alibaba.com>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ftrace: fix task's invalid comm of <...> when big pid

On Thu, 29 Mar 2018 10:16:22 +0800
Wang Yu <yuwang@...ux.alibaba.com> wrote:

> > What you can do is make that map_pid_to_cmdline array bigger.
> >
> > -- Steve  
> 
> I am sorry about it, and as the number of cpu cores increases, the current
> 
> PID_MAX_DEFAULT is too small, our online machines set the pid_max 65536 as default, so the task
> pid number bigger than PID_MAX_DEFAULT can't show the real comm (only <...>), so i want to
> ajust the PID_MAX_DEFAULT upto 4x, and what do you think?
> 
>    * This controls the default maximum pid allocated to a process
>    */
> -#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)
> +#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x20000)

What I was thinking is to make the map_pid_to_cmdline array dynamic
(not static), and be set to pid_max (after pid_max is determined).

Now, pid_max can be changed at run time. Thus, the tracing code will
need to keep a separate variable for that array to store the length. It
can not rely on pid_max. But if a pid that is greater than pid_max is
found, we could kick off a work thread to increase the array.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ