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: <aSS-jMEgzX30fe1p@google.com>
Date: Mon, 24 Nov 2025 12:22:36 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Anubhav Shelat <ashelat@...hat.com>
Cc: Ian Rogers <irogers@...gle.com>, Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Thomas Falcon <thomas.falcon@...el.com>,
	Howard Chu <howardchu95@...il.com>,
	James Clark <james.clark@...aro.org>,
	Zhongqiu Han <quic_zhonhan@...cinc.com>,
	Ravi Bangoria <ravi.bangoria@....com>,
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/3] perf pmu: Add PMU kind to simplify differentiating

Hello,

On Mon, Nov 24, 2025 at 12:34:11PM +0000, Anubhav Shelat wrote:
> On Fri, Nov 14, 2025 at 10:06 PM Ian Rogers <irogers@...gle.com> wrote:
> > +static inline enum pmu_kind perf_pmu__kind(const struct perf_pmu *pmu)
> > +{
> > +       __u32 type;
> > +
> > +       if (!pmu)
> > +               return PERF_PMU_KIND_PE;
> > +
> > +       type = pmu->type;
> > +       if (type <= PERF_PMU_TYPE_PE_END)
> > +               return PERF_PMU_KIND_PE;
> > +       if (type <= PERF_PMU_TYPE_DRM_END)
> > +               return PERF_PMU_KIND_DRM;
> > +       if (type <= PERF_PMU_TYPE_DRM_END)
> > +               return PERF_PMU_KIND_DRM;
> > +       if (type <= PERF_PMU_TYPE_HWMON_END)
> > +               return PERF_PMU_KIND_HWMON;
> > +       if (type == PERF_PMU_TYPE_TOOL)
> > +               return PERF_PMU_KIND_TOOL;
> > +       return PERF_PMU_KIND_FAKE;
> > +}
> > +
> 
> Looks like there's a duplicate check for PERF_PMU_TYPE_DRM_END.

Right, can you please send a fix?

Thanks,
Namhyung


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ