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: <20181206081707.GF4234@hirez.programming.kicks-ass.net>
Date:   Thu, 6 Dec 2018 09:17:07 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Luis Claudio R. Goncalves" <lclaudio@...g.org>, ldv@...linux.org,
        esyr@...hat.com, Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 1/8] perf: Allow to block process in syscall tracepoints

On Wed, Dec 05, 2018 at 05:05:02PM +0100, Jiri Olsa wrote:
> @@ -10461,6 +10484,19 @@ SYSCALL_DEFINE5(perf_event_open,
>  			return -EINVAL;
>  	}
>  
> +	if (attr.block) {
> +		/*
> +		 * Allow only syscall tracepoints, check for syscall class
> +		 * is made in the tracepoint event_init callback.
> +		 */
> +		if (attr.type != PERF_TYPE_TRACEPOINT)
> +			return -EINVAL;
> +
> +		/* Allow to block only if we attach to a process. */
> +		if (pid == -1)
> +			return -EINVAL;
> +	}
> +
>  	/* Only privileged users can get physical addresses */
>  	if ((attr.sample_type & PERF_SAMPLE_PHYS_ADDR) &&
>  	    perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN))

That's fairly horrible and will, when copied, lead to a giant mess.

Please see the whole exclusion patch set here:

  https://lkml.kernel.org/r/1543230756-15319-1-git-send-email-andrew.murray@arm.com

PERF_PMU_CAP_BLOCK sounds like something you'd want here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ