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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230526102705.00003345@Huawei.com>
Date:   Fri, 26 May 2023 10:27:05 +0100
From:   Jonathan Cameron <Jonathan.Cameron@...wei.com>
To:     Namhyung Kim <namhyung@...il.com>
CC:     Liang Kan <kan.liang@...ux.intel.com>, <linux-cxl@...r.kernel.org>,
        <peterz@...radead.org>, <mark.rutland@....com>, <will@...nel.org>,
        <mingo@...hat.com>, <acme@...nel.org>, <dan.j.williams@...el.com>,
        <linuxarm@...wei.com>, <linux-perf-users@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        Davidlohr Bueso <dave@...olabs.net>,
        "Dave Jiang" <dave.jiang@...el.com>,
        Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v6 4/5] perf: CXL Performance Monitoring Unit driver


Hi Namhyung,

> > +static int cxl_pmu_event_init(struct perf_event *event)
> > +{
> > +       struct cxl_pmu_info *info = pmu_to_cxl_pmu_info(event->pmu);
> > +
> > +       event->cpu = info->on_cpu;  
> 
> Why not change the event->cpu after validation is done?

Sure. Whilst I think it's harmless,
it logically makes more sense to do it a few lines later
so I'll move it to the end of this function.


> 
> Thanks,
> Namhyung
> 
> 
> > +       /* Top level type sanity check - is this a Hardware Event being requested */
> > +       if (event->attr.type != event->pmu->type)
> > +               return -ENOENT;
> > +
> > +       if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK)
> > +               return -EOPNOTSUPP;
> > +       /* TODO: Validation of any filter */
> > +
> > +       /*
> > +        * Verify that it is possible to count what was requested. Either must
> > +        * be a fixed counter that is a precise match or a configurable counter
> > +        * where this is a subset.
> > +        */
> > +       return cxl_pmu_get_event_idx(event, NULL, NULL);
> > +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ