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] [day] [month] [year] [list]
Message-ID: <20240807120039.GD37996@noisy.programming.kicks-ass.net>
Date: Wed, 7 Aug 2024 14:00:39 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: James Clark <james.clark@...aro.org>
Cc: linux-arm-kernel@...ts.infradead.org, Al Grant <al.grant@....com>,
	Will Deacon <will@...nel.org>, Mark Rutland <mark.rutland@....com>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	"Liang, Kan" <kan.liang@...ux.intel.com>,
	Paul Moore <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
	"Serge E. Hallyn" <serge@...lyn.com>, linux-kernel@...r.kernel.org,
	linux-perf-users@...r.kernel.org,
	linux-security-module@...r.kernel.org
Subject: Re: [PATCH] drivers/perf: arm_spe: Use perf_allow_kernel() for
 permissions

On Wed, Aug 07, 2024 at 12:20:13PM +0100, James Clark wrote:
> 
> 
> On 07/08/2024 12:15 pm, Peter Zijlstra wrote:
> > On Wed, Aug 07, 2024 at 11:54:41AM +0100, James Clark wrote:
> > > diff --git a/kernel/events/core.c b/kernel/events/core.c
> > > index aa3450bdc227..4a69583e329a 100644
> > > --- a/kernel/events/core.c
> > > +++ b/kernel/events/core.c
> > > @@ -417,6 +417,7 @@ static struct kmem_cache *perf_event_cache;
> > >    *   2 - disallow kernel profiling for unpriv
> > >    */
> > >   int sysctl_perf_event_paranoid __read_mostly = 2;
> > > +EXPORT_SYMBOL_GPL(sysctl_perf_event_paranoid);
> > 
> > I'm never a fan of exporting variables. Perhaps create a helper function
> > that returns the value and use that where required?
> > 
> > That avoids modules getting the idea it would be okay to change this
> > valie themselves.
> 
> I could also remove the inline from perf_allow_kernel() and export that
> instead. I don't think it really needs to be inlined but I gave it the
> benefit of the doubt because it was added that way.

Yes, that works, none of that is a fast path anyway.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ