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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230914112223.27165-5-yangyicong@huawei.com>
Date:   Thu, 14 Sep 2023 19:22:22 +0800
From:   Yicong Yang <yangyicong@...wei.com>
To:     <suzuki.poulose@....com>, <mathieu.poirier@...aro.org>,
        <jonathan.cameron@...wei.com>, <linux-kernel@...r.kernel.org>
CC:     <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: [PATCH v2 4/5] hwtracing: hisi_ptt: Don't try to attach a task

From: Yicong Yang <yangyicong@...ilicon.com>

PTT is an uncore PMU and shouldn't be attached to any task. Block
the usage in pmu::event_init().

Signed-off-by: Yicong Yang <yangyicong@...ilicon.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
---
 drivers/hwtracing/ptt/hisi_ptt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c
index 4f355df8da23..62a444f5228e 100644
--- a/drivers/hwtracing/ptt/hisi_ptt.c
+++ b/drivers/hwtracing/ptt/hisi_ptt.c
@@ -1003,6 +1003,9 @@ static int hisi_ptt_pmu_event_init(struct perf_event *event)
 		return -EOPNOTSUPP;
 	}
 
+	if (event->attach_state & PERF_ATTACH_TASK)
+		return -EOPNOTSUPP;
+
 	if (event->attr.type != hisi_ptt->hisi_ptt_pmu.type)
 		return -ENOENT;
 
-- 
2.24.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ