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: <aHUG78Vv1QU5Aafj@J2N7QTR9R3>
Date: Mon, 14 Jul 2025 14:32:31 +0100
From: Mark Rutland <mark.rutland@....com>
To: "Koichi Okuno (Fujitsu)" <fj2767dz@...itsu.com>
Cc: 'Peter Zijlstra' <peterz@...radead.org>, Will Deacon <will@...nel.org>,
	Jonathan Corbet <corbet@....net>,
	Catalin Marinas <catalin.marinas@....com>,
	"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
	Bjorn Andersson <quic_bjorande@...cinc.com>,
	Geert Uytterhoeven <geert+renesas@...der.be>,
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
	Konrad Dybcio <konradybcio@...nel.org>,
	Neil Armstrong <neil.armstrong@...aro.org>,
	Arnd Bergmann <arnd@...db.de>,
	NĂ­colas F. R. A. Prado <nfraprado@...labora.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 2/2] perf: Fujitsu: Add the Uncore PCI PMU driver

On Tue, Jul 01, 2025 at 06:13:57AM +0000, Koichi Okuno (Fujitsu) wrote:
> Hi, Peter
> 
> Sorry for the late reply.
> 
> > On Tue, Jun 17, 2025 at 07:27:50PM +0900, Koichi Okuno wrote:
> > > +	pcipmu->pmu = (struct pmu) {
> > > +		.parent		= dev,
> > > +		.task_ctx_nr	= perf_invalid_context,
> > > +
> > > +		.pmu_enable	= fujitsu_pci__pmu_enable,
> > > +		.pmu_disable	= fujitsu_pci__pmu_disable,
> > > +		.event_init	= fujitsu_pci__event_init,
> > > +		.add		= fujitsu_pci__event_add,
> > > +		.del		= fujitsu_pci__event_del,
> > > +		.start		= fujitsu_pci__event_start,
> > > +		.stop		= fujitsu_pci__event_stop,
> > > +		.read		= fujitsu_pci__event_read,
> > > +
> > > > +		.attr_groups	= fujitsu_pci_pmu_attr_grps,
> > > +		.capabilities	= PERF_PMU_CAP_NO_EXCLUDE,
> > 
> > Should these drivers not also have PERF_PMU_CAP_NO_INTERRUPT ? Per them
> > being uncore they cannot generate samples.
> 
> Even now, the fujitsu_pci__event_init() function rejects sampling events
> before checking PERF_PMU_CAP_NO_INTERRUPT in core.c.
> However, I think it is correct to have PERF_PMU_CAP_NO_INTERRUPT which
> means not being able to sample, so I will add NO_INTERRUPT in the next
> version.

Sorry to give contradictory feeback, but given that the majority of PMU
drivers under drivers/perf/ don't set PERF_PMU_CAP_NO_INTERRUPT, and
explicitly reject sampling events, I'd prefer to do the same for
consistency.

Peter, are you happy with that for now?

Overall it would be better for PMUs to export a positive "I support
sampling" flag, and maybe rename/replace PERF_PMU_CAP_NO_INTERRUPT
accordingly, which I'd be happy to look at in future.

Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ