From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D49C23C512 for ; Fri, 28 Nov 2025 14:53:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764341591; cv=none; b=Nvx6XWomj0rg0m0DRPkoz74HLbtD+7ESZOGlID8R1G0+JJ4/ecVEJ27/Y4fQz8VDmHBB4mIO5aii0CAeiEeTFC2xWb/3d6z07GopvsxJNbnAcVA+phGCplv+bTmz8q+RFeAMRIs9v7givTEFD7jSJqc2rlzIARVCWTWX4o+EMMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764341591; c=relaxed/simple; bh=IQIJLRQRCJUKYiIoZDrS0KS3bI/OSYjl6F26h3OVH54=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ae0z5Y2fBNYpu337//ISTpixl4arIlkBDY5RwAWHyvgns7GemsrXeOuw1ApAJDw6iFClkRibRRMrAkdAAZn674/SnTUmrPVxQ4cW+CJPhu4LUj9gl/ra3ko33QQUsKCphzKeRhR4uKAtRnTrK66ZDWXfiyo9TyEnA4/+l65sYSM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=QUHH0Uf0; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QUHH0Uf0" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso19891235e9.3 for ; Fri, 28 Nov 2025 06:53:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764341585; x=1764946385; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Rnlc1dtXuVp5Avi/r2iLQdz0CX/cLLUFEsKgUqsEt14=; b=QUHH0Uf0RsvMqUBmf5B4ezwRMCPABTP1uXX1gIym1qM0itMzKP1CsvXinYb8h6ncQ5 FsO08jLsY/v29uXV4R6gITE6UDNL72V+UQF564b3HV/GUIskXpdt8sacF3dSvXTpENon SUD5BWneVfTse/ruaKsTG81/tznTRVsOsAjMA6wjKUCfaFB5ItljQnFjxmpctC0v2yGR prD11+Mu3nsy8uT3hUDK2QE9FH/5Gu9OzLGIXLLXz0Q1DMq2nEJXuqVh2kEyZbExDjnB ShQM5Yqvt1/8sflOZbDS126YHK5BMshsMonIpUNzj4gyQFfRpEqyguIekTWrrb8S8dSX VEiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764341585; x=1764946385; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Rnlc1dtXuVp5Avi/r2iLQdz0CX/cLLUFEsKgUqsEt14=; b=Or05IdaeVBK2t/O/Ci2UL7e0066BUnBhhD3MslEofa+Z3JWRueheBVKOgWjt3UQVcA i/ieHIYVP6gewsToUXygzNvN2Jx2IS3Ud8JIVv0+o/MaYiwGj2wCk/C4p94tb+IBWXu5 gEEB3aHWvvz4TPKckh/usbDREyZF7bgRZJXtZPRipkpmXZAMl05HEJ2fIKj+4C/85Ti0 qKmaNTK10d3XMWhNXQ8nuOkxfq0cnQRSy8WNmu5Lp+SUHR6FWtllcIz+P+gMyFQCvYYI J1BvHerR1feeAMmHAOOgHNKGJfyDPjXt0XMlCIFPAXF4u7lLzcYnqhuG1CcHC32nkOBb ArSw== X-Forwarded-Encrypted: i=1; AJvYcCXfvwXMowFUqUgnfF2GjSRccsoI6gAnilsIZsxDna1azz+6PTG25Z/s9Yoh//Cr1XHTTDSGNgstdrDasEo=@vger.kernel.org X-Gm-Message-State: AOJu0YxY1RFwLJ3Eq4fxg8IusOE9ZOhMrmfeS9npPGxXTKSQDHU8EPJ9 SCg282EISdwRRRVyb1Sg1tStLk4GU4Wr/09wBhSMtlAnvqMgj5C89jTTrPzGtC3kv4Y= X-Gm-Gg: ASbGnctqu9xljy9cFpzHojjfVWue47A2irTBgH3GA3Uv1SQvLuKq1YO8pMqq4Ys20a8 Fmxcq+YVs+ces3s0G/bri3dXz6h/LBkJQb8rOknalWwgZnk9OKZvmBibhJitVtiLXdUZ8QO7v5o i7KjDeZa/QcYYaU855Uf4YizBMUyhqNnZe6buvLPVTz41mWaiyeErzWB9YjWqhsnh7pZjLsIdgX rWAgHFeGYc5XPd4T+hFSfUUaYXYbh6g5IxONAOpDL9NwNGquChtRlCoT/l9nwZROEziUGPJqXGJ VwCmxq0Bz67tLF39iWQYZoPFPMLCzOyDFpJaBlg6vNx+BkON7rZywKitkteJSw0HKVeJeaDxmUX V1vIE5AfUZ3klag/VGVWO9W2Rrxj2RGotF/j/vWNXnrZDj47QlFgHA/N03KVx84TQAXEG0o9eXN WUmqXQk7jZS2yB54Sn X-Google-Smtp-Source: AGHT+IHInRzHYPgTVT3G43Xp1WGE5iHIgv9aeTIFvYapraVaTFrOoNIvykgpSsOowov7B8jkgKaA5Q== X-Received: by 2002:a05:600c:3111:b0:477:b734:8c53 with SMTP id 5b1f17b1804b1-477c10deffamr287739505e9.12.1764341585201; Fri, 28 Nov 2025 06:53:05 -0800 (PST) Received: from [192.168.1.3] ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-479052cfd9dsm92060745e9.7.2025.11.28.06.53.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Nov 2025 06:53:04 -0800 (PST) Message-ID: <8c7be69b-2227-45c2-9096-a49ec6df9a09@linaro.org> Date: Fri, 28 Nov 2025 14:53:03 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] coresight: etm3x: Fix buffer overwrite in cntr_val_show() To: Leo Yan , Mike Leach Cc: Kuan-Wei Chiu , suzuki.poulose@arm.com, alexander.shishkin@linux.intel.com, pratikp@codeaurora.org, mathieu.poirier@linaro.org, gregkh@linuxfoundation.org, jserv@ccns.ncku.edu.tw, marscheng@google.com, ericchancf@google.com, milesjiang@google.com, nickpan@google.com, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20251121002350.1166758-1-visitorckw@gmail.com> <20251126120914.GH724103@e132581.arm.com> <20251126123147.GI724103@e132581.arm.com> <15d536f2-0829-4f3f-b111-b15b14236bd2@linaro.org> <20251127092942.GO724103@e132581.arm.com> Content-Language: en-US From: James Clark In-Reply-To: <20251127092942.GO724103@e132581.arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 27/11/2025 9:29 am, Leo Yan wrote: > On Wed, Nov 26, 2025 at 04:14:19PM +0000, Mike Leach wrote: > > [...] > >>>> The key to this is not the questions we are asked, but which platforms >>>> are still supported by the linux kernel. >>>> >>>> The ETMv3 driver supports both ETMv3 and PTM trace (the programming >>>> model is the same, even if the trace decode is vastly different). >>>> >>>> So as long as there are platforms supported that use either of those, >>>> we need to keep the driver in. >>>> >>> >>> We're not running tests though, so if we find out it's fundamentally >>> broken somehow it could be another justification to remove it, even if >>> the kernel supports the devices. Do you have a board that you can test >>> on Mike? >> >> Don't have one myself, but I believe the TC2 was used in development, >> (that's the A15/A7 32 bit part - not total compute!) which somewhat >> conveniently had both etmv3 and ptm trace. > > If ETMv4 can be used by Armv7 (arm32) CPUs, and nowdays if Armv7 + ETMv4 > is a popular design, it makes sense for me to remove ETMv3 driver. > > If Armv7 CPUs are always bound to ETMv3 / PTM, then we should keep the > driver. > > Thanks, > Leo Based on the the build system I don't think what the hardware supports matters that much. We've always only built the ETM4 driver on Arm64 and only build the ETM3 driver on Arm32. I just found another bug which I think makes sense to log here. We've pretty much always turned on timestamps automatically in Perf, but for some reason the option validator in Perf thinks they're not supported in ETM3. The driver has always accepted it as an option so I'm not sure why. The end result is that the command will always fail, and you couldn't even undo it with "timestamp=0" until more recently when I fixed that. Sysfs or per-thread Perf mode would be working, but it's one more bit of evidence to take in.