From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 74B63386437 for ; Tue, 3 Mar 2026 10:38:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772534308; cv=none; b=EpeDe9hTXU4YVLjAcLk4QnyoS+VNMR7+63wM7p+UGN51uK+E7xTn9IxlXQLs8muKSPIAPBpxG0hATZLYuv+DZbqpQasc+LHCrIWCHyTTUV9IUTb4MSA238rP9K0MOag4CUn92p8auWNbQuVWuMh/fzgyd9V27PKpmrGbzQTzzuY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772534308; c=relaxed/simple; bh=taiMMM4Q9ienyOKePrmJLIt8IiDl6KKB7YEh0peOMmA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dYrGtnzjymNRWx4ww/R3z+JV8HAHLyIjUpCxhY3C0KL4HS/cJFztu/hlqLOyW7956EQGCACV1IJnuiN01oo46nHB7MsHblfXHxYUaLvS+RvOc2g3ApxxQjvWmGq8bvrVDE19zsI/ZbyW7qvQPisDabFbFNFVbyp3fF8alaggdAc= 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=AOw60Zlk; arc=none smtp.client-ip=209.85.221.42 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="AOw60Zlk" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-4327790c4e9so4097218f8f.2 for ; Tue, 03 Mar 2026 02:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772534306; x=1773139106; 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=rnBOzFJcfXoWhFGXXIv8+0FYSpLPtwiqAebZRn6kZlI=; b=AOw60Zlkkaf+mww2O/NRXzsS1/RVSVST5Mp5Wshj59j/i9sfftqIJo4oBn1s+cQhdP PjaPG75qJAqp9lOyo/7a8wRNUOTmUllyZ3PXG27ctQacqubHqaPO4ucDc5AskWEMiOLx Q8J85P19wLTAHNZwO3ZStOLKUlnCJkTIf31RyvrXMpOZ9p6hWh0Msx3rhv2sDGY4c0Og nFjc4k+tO8xhpaPstYIwO6Iw/EnlH1gDZw5aet26zqpmaCBbYv0PJaaf8WLuzlXdOA/3 Gj4OOWktYyp8wznJxAiKoT4AdN0h8e8lnWNwtXLkAliIY0keJIhs9qp+lo5JEN29AE11 Fvlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772534306; x=1773139106; 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=rnBOzFJcfXoWhFGXXIv8+0FYSpLPtwiqAebZRn6kZlI=; b=QZ+T/O66rfZS4hQOL9QCo2pI8243g7WXpAmr3mxgbIltpWkVItVdL7hO78ieQt/39Y F8Ak69LAi4lNac7aNUwrFM24zl4prME3nuMStJYDHqMxJflLYDWUQYdbmUpk0Z5yEnqv sTAysYruibILzjYkF8ocrqMVvk5Yk1mr97gxFMI/Ia/I49dvQKo23rnDz2CveSATjlAQ qUJqW3/m1Qojj1NgWcFr7JHjC6Fr2UaEqHR8GJBpg311g4Au9z/BkDwE0CtSimcHf8Gb 00k/bEDuDZOHU1FGb3wBQlrV0IxpP+J0DXCg68r9WXnVS0cZkp687IN1l5f93UqJf9w3 VDCw== X-Forwarded-Encrypted: i=1; AJvYcCWKMLxJjgjz/M2ZmK+gxBmN01BYq7zDwVNJUWmbnviGNiZvN0h3FFk/45W4/P6yX++VM2fPGadatCGj2uY=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3xWhOsO+2tImhUcNtjjtTbX2D+XsbWY2ex8RY8fb5WV+CxKIf c+xyXyU9zIBK6XT5cDSB7u3hExEHYCpcErFrCw/fy5ckT1bHjA9YeXC28n+e4RwE3gY= X-Gm-Gg: ATEYQzw/d9QaZsWPnPAdpgk9ayUDWbFYnSaMVxplB53XErd5yzEa1a7qwkxZE9QDwiP gC6PMXbQ81bfJfL0MtSj3Arnw8lgfNkRL05wT62/GOTfeXXExi9kAsJzhr+zpfX8TxRKobaLQ5X ZtXiFW5dW1L9PvCFek9mz+x6+YhBX5bObtz0qaaeIW4fcRs8I/bzaqSkTuVa0drICDTxINrG61h 3Vkm8o3Ece6IqeuEXojQ6eJHJFWagpCuXXPLNy1iJ5Mt+/GV/hlTaqrute28ZRGfBpIvqmBd5dr +OqNHXDipVGo8ZUi6awNQ/li/6zMvVMCl6bKDY/DsbUsEG4LHlMiZlrI5Muzvz4kjRCPm586HOC 6XU02flyIt+BFddcL0R3xOMTy7hglb0WDFSEXJAfsizl8hGiYSscJa38GKTHbcn548G52Oirh08 gL+7sd9Wn7ShpTDrg1UCIG51ANk9Dt0ZWstpPa39o= X-Received: by 2002:a05:6000:2c10:b0:439:b744:c5fa with SMTP id ffacd0b85a97d-439b744c836mr12755157f8f.30.1772534305718; Tue, 03 Mar 2026 02:38:25 -0800 (PST) Received: from [192.168.1.3] ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c60e40fsm33905284f8f.7.2026.03.03.02.38.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Mar 2026 02:38:25 -0800 (PST) Message-ID: <197f3d1e-5d1e-4b2d-a12b-782287eecc43@linaro.org> Date: Tue, 3 Mar 2026 10:38:23 +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 v2 1/1] perf arm64: Send pointer auth masks to ring buffer To: Jakub Brnak , James Clark , Leo Yan Cc: Peter Zijlstra , linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, acme@kernel.org, Andrew Kilroy , Vince Weaver , Mark Rutland , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Will Deacon , Catalin Marinas , kristina.martsenko@arm.com References: <20221020101921.1219533-1-james.clark@arm.com> <20221020101921.1219533-2-james.clark@arm.com> <4e50b890-0588-1551-fb7c-6cd8191d1054@arm.com> <133c2f4b-1ca5-2d0c-f4f4-e01ff5e028c8@arm.com> Content-Language: en-US From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 02/03/2026 4:33 pm, Jakub Brnak wrote: > On Mon, Oct 31, 2022 at 01:48:56PM +0000, James Clark wrote: >> >> >> On 27/10/2022 18:20, Peter Zijlstra wrote: >>> On Tue, Oct 25, 2022 at 04:28:12PM +0100, James Clark wrote: >>> >>>>> Why do we want the same mask repeated over and over with each sample; >>>>> should this not be part of the address space (side-band) data? >>>> >>>> You are probably right that it could be done that way. The reason that >>>> we did it this way was to be consistent with ptrace feature [1] where it >>>> is delivered to userspace on a per-process basis. And there is also a >>>> prctl for the enabled key types [2] which can be changed dynamically. >>>> Particularly for the last reason is why it was done per sample. >>>> >>>> Having said that, the enabled keys field is not used by perf, only the >>>> mask is used, so I can drop the per sample data until enabled keys is >>>> needed, which may be never. >>>> >>>> I'm going to assume that perf shouldn't use ptrace because of >>>> permissions and conflicts with debuggers, so I could put the mask >>>> somewhere like PERF_RECORD_FORK instead of per sample. >>> >>> Yeah, or create an new RECORD type which you can also send around at >>> prctl() time. >>> >>> The only thing that's needed on top of that is exposing the mask >>> somewhere in /proc for existing tasks; which is what perf also uses to >>> syntesize RECORD_MMAP events on startup etc.. >>> >> >> Hmm ok, in that case I can just add the /proc interface for now because >> the mask won't change and we can add the new record type at the point >> it's needed in the future. >> >> Thanks for the feedback. > > Hi all, > > Does anyone know how this issue was eventually resolved? > Specifically, is the mask for the pointer authentication bits > currently exposed and stored somewhere in perf.data so it can be > used when running perf report? > > Thanks, > Jakub > > Hi Jakub, No we never finished this, you're actually the first person to mention it. Can you give a bit more detail about your use case? Maybe we can dig out the old branches and work on it again. For a summary of the current status, frame pointer unwinds in the kernel are working with pointer auth because the kernel strips them. We patched libunwind for support on commit f67ef2867bc5 ("Unwind with pointer authentication on arm64"). And libdw on commit 0af6c7289c22 (libdwfl, aarch64: Demangle return addresses using a PAC mask). These two were to support dwarf unwinding, but the kernel changes to expose the mask and Perf changes to pass it to the unwinders were never finished. Thanks James