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]
Date:   Tue, 8 Aug 2023 12:21:27 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Dapeng Mi <dapeng1.mi@...ux.intel.com>
Cc:     Sean Christopherson <seanjc@...gle.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Like Xu <likexu@...cent.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>, kvm@...r.kernel.org,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Zhenyu Wang <zhenyuw@...ux.intel.com>,
        Zhang Xiong <xiong.y.zhang@...el.com>,
        Lv Zhiyuan <zhiyuan.lv@...el.com>,
        Yang Weijiang <weijiang.yang@...el.com>,
        Dapeng Mi <dapeng1.mi@...el.com>, Marc Zyngier <maz@...nel.org>
Subject: Re: [PATCH RFV v2 05/13] perf/core: Add function
 perf_event_create_group_kernel_counters()

On Tue, Aug 08, 2023 at 02:31:03PM +0800, Dapeng Mi wrote:
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 15eb82d1a010..1877171e9590 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -12762,11 +12762,34 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
>  				 struct task_struct *task,
>  				 perf_overflow_handler_t overflow_handler,
>  				 void *context)
> +{
> +	return perf_event_create_group_kernel_counters(attr, cpu, task,
> +			NULL, overflow_handler, context);
> +}
> +EXPORT_SYMBOL_GPL(perf_event_create_kernel_counter);
> +
> +/**
> + * perf_event_create_group_kernel_counters
> + *
> + * @attr: attributes of the counter to create
> + * @cpu: cpu in which the counter is bound
> + * @task: task to profile (NULL for percpu)
> + * @group_leader: the group leader event of the created event
> + * @overflow_handler: callback to trigger when we hit the event
> + * @context: context data could be used in overflow_handler callback
> + */
> +struct perf_event *
> +perf_event_create_group_kernel_counters(struct perf_event_attr *attr,
> +					int cpu, struct task_struct *task,
> +					struct perf_event *group_leader,
> +					perf_overflow_handler_t overflow_handler,
> +					void *context)

I would much prefer if you just add the argument to
perf_event_create_kernel_counter(), there aren't *that* many users.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ