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: <20160121142554.GC2312@kernel.org>
Date:	Thu, 21 Jan 2016 11:25:54 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Ben Hutchings <ben@...adent.org.uk>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] perf: Document the perf sysctls

Em Tue, Jan 19, 2016 at 09:35:15PM +0000, Ben Hutchings escreveu:
> perf_event_paranoid was only documented in source code and a perf
> error message.  Move the documentation from the error message to
> Documentation/sysctl/kernel.txt.
> 
> perf_cpu_time_max_percent was already documented but missing from the
> list at the top, so add it there.
> 
> Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
> ---
>  Documentation/sysctl/kernel.txt | 13 +++++++++++++
>  tools/perf/util/evsel.c         |  7 ++-----
>  2 files changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
> index af70d15..88a2c8e 100644
> --- a/Documentation/sysctl/kernel.txt
> +++ b/Documentation/sysctl/kernel.txt
> @@ -58,6 +58,8 @@ show up in /proc/sys/kernel:
>  - panic_on_stackoverflow
>  - panic_on_unrecovered_nmi
>  - panic_on_warn
> +- perf_cpu_time_max_percent
> +- perf_event_paranoid
>  - pid_max
>  - powersave-nap               [ PPC only ]
>  - printk
> @@ -624,6 +626,17 @@ allowed to execute.
>  
>  ==============================================================
>  
> +perf_event_paranoid:
> +
> +Controls use of the performance events system by unprivileged
> +users (without CAP_SYS_ADMIN).  The default value is 1.
> +
> + -1: Allow use of (almost) all events by all users
> +>=0: Disallow raw tracepoint access by users without CAP_IOC_LOCK
> +>=1: Disallow CPU event access by users without CAP_SYS_ADMIN
> +>=2: Disallow kernel profiling by users without CAP_SYS_ADMIN
> +
> +==============================================================
>  
>  pid_max:
>  
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index 397fb4e..9b4df11 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -2314,11 +2314,8 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
>  	case EACCES:
>  		return scnprintf(msg, size,
>  		 "You may not have permission to collect %sstats.\n"
> -		 "Consider tweaking /proc/sys/kernel/perf_event_paranoid:\n"
> -		 " -1 - Not paranoid at all\n"
> -		 "  0 - Disallow raw tracepoint access for unpriv\n"
> -		 "  1 - Disallow cpu events for unpriv\n"
> -		 "  2 - Disallow kernel profiling for unpriv",
> +		 "Consider tweaking /proc/sys/kernel/perf_event_paranoid -\n"
> +		 "see Documentation/sysctl/kernel.txt",
>  				 target->system_wide ? "system-wide " : "");

Don't remove readily available information by a reference to a not
always available file, I'm just synching this with the doc text you
added to that Documentation file.

- Arnaldo

>  	case ENOENT:
>  		return scnprintf(msg, size, "The %s event is not supported.",
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ