Re: [RFC 3/5] perf: Allow per PMU access control
On 27/09/2018 21:15, Andi Kleen wrote: + mutex_lock(_lock); + list_for_each_entry(pmu, , entry) + pmu->perf_event_paranoid = sysctl_perf_event_paranoid; + mutex_unlock(_lock); What happens to pmus that got added later? There is a hunk a bit lower in the patch where in perf_pmu_register the initial setting is assigned from the global sysctl. The rest looks good. Can you post a non RFC version? Sure! Regards, Tvrtko
Re: [RFC 3/5] perf: Allow per PMU access control
On 27/09/2018 21:15, Andi Kleen wrote: + mutex_lock(_lock); + list_for_each_entry(pmu, , entry) + pmu->perf_event_paranoid = sysctl_perf_event_paranoid; + mutex_unlock(_lock); What happens to pmus that got added later? There is a hunk a bit lower in the patch where in perf_pmu_register the initial setting is assigned from the global sysctl. The rest looks good. Can you post a non RFC version? Sure! Regards, Tvrtko
Re: [RFC 3/5] perf: Allow per PMU access control
> + mutex_lock(_lock); > + list_for_each_entry(pmu, , entry) > + pmu->perf_event_paranoid = sysctl_perf_event_paranoid; > + mutex_unlock(_lock); What happens to pmus that got added later? The rest looks good. Can you post a non RFC version? -Andi
Re: [RFC 3/5] perf: Allow per PMU access control
> + mutex_lock(_lock); > + list_for_each_entry(pmu, , entry) > + pmu->perf_event_paranoid = sysctl_perf_event_paranoid; > + mutex_unlock(_lock); What happens to pmus that got added later? The rest looks good. Can you post a non RFC version? -Andi