Re: [PATCH] perf_event: Add support for LSM and SELinux checks

2019-10-14 Thread Joel Fernandes
On Mon, Oct 14, 2019 at 11:35:44AM +0200, Peter Zijlstra wrote: > On Fri, Oct 11, 2019 at 12:03:30PM -0400, Joel Fernandes (Google) wrote: > > > @@ -4761,6 +4762,7 @@ int perf_event_release_kernel(struct perf_event > > *event) > > } > > > > no_ctx: > > + security_perf_event_free(event);

Re: [PATCH] perf_event: Add support for LSM and SELinux checks

2019-10-14 Thread Peter Zijlstra
On Fri, Oct 11, 2019 at 12:03:30PM -0400, Joel Fernandes (Google) wrote: > @@ -4761,6 +4762,7 @@ int perf_event_release_kernel(struct perf_event *event) > } > > no_ctx: > + security_perf_event_free(event); > put_event(event); /* Must be the 'last' reference */ > return 0;

Re: [PATCH] perf_event: Add support for LSM and SELinux checks

2019-10-11 Thread James Morris
On Fri, 11 Oct 2019, Joel Fernandes (Google) wrote: > This patch adds LSM and SELinux access checking which will be used in > Android to access perf_event_open(2) for the purposes of attaching BPF > programs to tracepoints, perf profiling and other operations from > userspace. These operations