From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) (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 BF24C17BBF; Wed, 11 Jun 2025 01:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749603785; cv=none; b=TDXzjFZhZtOX+lebCCY3GewnvtES7RVqmlsbcLNiddKqPtz8r0O4JGe3xiPLPUfZrGzQtvNCV+Q+OkgYFmQNevSgFLXcfGUjI/1XE1SI3OeR+R4thIWviKQJ+CI56ms1Cda0Mkasc+NAul8+2+ymU2iDYKqDtRQ9NdPXjT7yWFk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749603785; c=relaxed/simple; bh=/aoScwYOkCF4fLnSJ9PusAogYx2TOp0qIdg16G+Yb7Q=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=jcsslRK1lrycvLR2MgW9vwvXdUgNhreqZhIinEPFNxtOchCFfIc5CXrLu8TAwE9cFMsAO9f4/halm83D06DBA9Vt4K1c0xD73H3l7OsUFx4Nmj6dbJelKOrkFfHNzDQZuTbqH4Ppxj0tgggoVASCiS7aT3o1ZLkTsxgcNCiPJlQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; arc=none smtp.client-ip=216.40.44.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Received: from omf19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D3DFC1A14A7; Wed, 11 Jun 2025 01:03:00 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: nevets@goodmis.org) by omf19.hostedemail.com (Postfix) with ESMTPA id DBBE920025; Wed, 11 Jun 2025 01:02:57 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98.2) (envelope-from ) id 1uP9tF-00000000vD8-3vh3; Tue, 10 Jun 2025 21:04:29 -0400 Message-ID: <20250611010429.786324495@goodmis.org> User-Agent: quilt/0.68 Date: Tue, 10 Jun 2025 20:54:33 -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 Subject: [PATCH v10 12/14] unwind_user/x86: Enable frame pointer unwinding on x86 References: <20250611005421.144238328@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Rspamd-Queue-Id: DBBE920025 X-Stat-Signature: frtwck145zhd97i5iktdexifwkfoc7zz X-Rspamd-Server: rspamout05 X-Session-Marker: 6E657665747340676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX18M8zasJQDjxJt8HH0+pZyYzYAqEiZSnH8= X-HE-Tag: 1749603777-828293 X-HE-Meta: U2FsdGVkX1/+Fw78fgA36RGKZ4XEgHBKz9V393shKSBjR40Ny7hwWcjlr4tSJZWNsSN1IeobvXb/hUzQDGaonmjEjEbvW0v0DPcL7DZy2ml9EYCF04ILU+H1zahHZlvCtsL7yw0syvEUMRrla9nWGdng7lZV9S/kIrzpXMoFtabYUL3YZWKwa01ccKsBRIRsS7zamfSCBzCp98DPXsHFkTMBAjKstEuollM+IdwUWgLLnImzOxDI2yzEYwixv4nS2XaFps67DLOMtIB8MsOA0FCafPKh4uEuoEfqAxbuRRbSaaIjCLbfKi5srLIoOeBKMinlcuRp8UdfUrylpaupJBhCBXK6k6IAykZ0Z5M/1I+E/RXrN722PFxbgtn8kw1YrdNM2u+GedX8KoG3NQqzg9k9NMfI1ifo7bvwYsBDCwE= 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 340e5468980e..2cdb5cf91541 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