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: <20230825122552.000033ce@Huawei.com>
Date:   Fri, 25 Aug 2023 12:25:52 +0100
From:   Jonathan Cameron <Jonathan.Cameron@...wei.com>
To:     Yicong Yang <yangyicong@...wei.com>
CC:     <suzuki.poulose@....com>, <mathieu.poirier@...aro.org>,
        <linux-kernel@...r.kernel.org>,
        <alexander.shishkin@...ux.intel.com>, <helgaas@...nel.org>,
        <linux-pci@...r.kernel.org>, <prime.zeng@...ilicon.com>,
        <linuxarm@...wei.com>, <yangyicong@...ilicon.com>,
        <hejunhao3@...wei.com>
Subject: Re: [PATCH 5/5] hwtracing: hisi_ptt: Add dummy callback pmu::read()

On Wed, 9 Aug 2023 16:18:25 +0800
Yicong Yang <yangyicong@...wei.com> wrote:

> From: Junhao He <hejunhao3@...wei.com>
> 
> When start trace with perf option "-C $cpu" and immediately stop it
> with SIGTERM or others, the perf core will invoke pmu::read() while
> the driver doesn't implement it. Add a dummy pmu::read() to avoid
> any issues.
> 
> Signed-off-by: Junhao He <hejunhao3@...wei.com>
> Signed-off-by: Yicong Yang <yangyicong@...ilicon.com>

Acked-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>

> ---
>  drivers/hwtracing/ptt/hisi_ptt.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c
> index 916686c6a9c8..7392e039b8c1 100644
> --- a/drivers/hwtracing/ptt/hisi_ptt.c
> +++ b/drivers/hwtracing/ptt/hisi_ptt.c
> @@ -1184,6 +1184,10 @@ static void hisi_ptt_pmu_del(struct perf_event *event, int flags)
>  	hisi_ptt_pmu_stop(event, PERF_EF_UPDATE);
>  }
>  
> +static void hisi_ptt_pmu_read(struct perf_event *event)
> +{
> +}
> +
>  static void hisi_ptt_remove_cpuhp_instance(void *hotplug_node)
>  {
>  	cpuhp_state_remove_instance_nocalls(hisi_ptt_pmu_online, hotplug_node);
> @@ -1227,6 +1231,7 @@ static int hisi_ptt_register_pmu(struct hisi_ptt *hisi_ptt)
>  		.stop		= hisi_ptt_pmu_stop,
>  		.add		= hisi_ptt_pmu_add,
>  		.del		= hisi_ptt_pmu_del,
> +		.read		= hisi_ptt_pmu_read,
>  	};
>  
>  	reg = readl(hisi_ptt->iobase + HISI_PTT_LOCATION);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ