From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FF591D7995; Thu, 17 Jul 2025 00:49:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752713378; cv=none; b=Ns4NG1Gbmn4ZUQhE2v2NcNfu1JBHVTztqWSFva3lHRoz8NhNKjmztxREEf0dKV5mH9cArsBYEIAO2QXuPBX/bN+RHAB1uWz+m2kY4yNzxxVQ/pJZq62SWu7UOOzZKXiNiIuYa6g7Q0EKDZTBKCUeyckvE1ZY0yuirox2SARWUnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752713378; c=relaxed/simple; bh=q9368biQbKFkdqwUJGMNR4U7z4DEcx2lmBxRY3YPNYQ=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=R0vJUKcNSVPStym7witLIXkuWaam0aEBOpB12vp+DQu1iEX6sZbkhjLtYgz/2UO0LX3TIRdDhdpuPR3+Fr4KW78xjZ3b/UKpQruFSb/WMDCI3CqFsTjx/NV7XI3NCEjCEkE6h0M73IcIOVOxR19YPqS+Oz5Cdj67yYDeo1490mU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PJ67K37d; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PJ67K37d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D9ABC4CEF5; Thu, 17 Jul 2025 00:49:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752713378; bh=q9368biQbKFkdqwUJGMNR4U7z4DEcx2lmBxRY3YPNYQ=; h=Date:From:To:Cc:Subject:References:From; b=PJ67K37dGwS/YzRyyE/L7rF12OvhYcXucXz6Ah5IsxWG1kBJ0dTKE/ypRKP/UsE+y wj7aP/uMkuKXl5/neY9F3CC6vPUu2+sX2GwpIxYYyykNf6T3QNp6lI9Ni9CUA0qCuG mqzsinO8hxwd0ltY3V7Dc4xuunThJURQ/OzmLh77OOpkMfrK2wg4ub4YP4SZ92vEpt +3iZd9P1/VVVprsB4NQxjUdLsTuqaeLNsy9Vj5+vlauhluma17eVFAWVt4IXKefKlb 5lStyIvxU6URsrseXNbfa1EV0nj9HImpblCuz62tg0opQhnpPFmoswX1IimyyeJqAW qglwaaFR02LvQ== Received: from rostedt by gandalf with local (Exim 4.98.2) (envelope-from ) id 1ucCow-000000067Wx-1jAE; Wed, 16 Jul 2025 20:49:58 -0400 Message-ID: <20250717004958.260781923@kernel.org> User-Agent: quilt/0.68 Date: Wed, 16 Jul 2025 20:49:21 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, x86@kernel.org Cc: Masami Hiramatsu , Mathieu Desnoyers , Josh Poimboeuf , Peter Zijlstra , Ingo Molnar , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Andrii Nakryiko , Indu Bhagat , "Jose E. Marchesi" , Beau Belgrave , Jens Remus , Linus Torvalds , Andrew Morton , Jens Axboe , Florian Weimer , Sam James Subject: [PATCH v14 11/12] unwind_user/x86: Enable frame pointer unwinding on x86 References: <20250717004910.297898999@kernel.org> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 From: Josh Poimboeuf Use ARCH_INIT_USER_FP_FRAME to describe how frame pointers are unwound on x86, and enable CONFIG_HAVE_UNWIND_USER_FP accordingly so the unwind_user interfaces can be used. Signed-off-by: Josh Poimboeuf Signed-off-by: Steven Rostedt (Google) --- arch/x86/Kconfig | 1 + arch/x86/include/asm/unwind_user.h | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 arch/x86/include/asm/unwind_user.h diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 71019b3b54ea..5862433c81e1 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -302,6 +302,7 @@ config X86 select HAVE_SYSCALL_TRACEPOINTS select HAVE_UACCESS_VALIDATION if HAVE_OBJTOOL select HAVE_UNSTABLE_SCHED_CLOCK + select HAVE_UNWIND_USER_FP if X86_64 select HAVE_USER_RETURN_NOTIFIER select HAVE_GENERIC_VDSO select VDSO_GETRANDOM if X86_64 diff --git a/arch/x86/include/asm/unwind_user.h b/arch/x86/include/asm/unwind_user.h new file mode 100644 index 000000000000..8597857bf896 --- /dev/null +++ b/arch/x86/include/asm/unwind_user.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_X86_UNWIND_USER_H +#define _ASM_X86_UNWIND_USER_H + +#define ARCH_INIT_USER_FP_FRAME \ + .cfa_off = (s32)sizeof(long) * 2, \ + .ra_off = (s32)sizeof(long) * -1, \ + .fp_off = (s32)sizeof(long) * -2, \ + .use_fp = true, + +#endif /* _ASM_X86_UNWIND_USER_H */ -- 2.47.2