From nobody Sun Feb 8 03:58:10 2026 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 D6AD5387343; Thu, 29 Jan 2026 11:28:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769686100; cv=none; b=Bt0dDpNRNK7fPASjLbAFRC0YJu7dRwmtD85eQ+lXQzbf9Q67wqMlQOidD9XRd5R6EUXOE98c5WXUkxmKepHu3hx3I2AnXFH/FIP4EKDBQSpGgniQT4qVA4Ox+M5YU/HkJvNWSh/CygLN1HRQHmS8ljRy7+UwAA6PqOZPnq44uSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769686100; c=relaxed/simple; bh=yt/xrDIXDEijdu8dbODoG5L7IGlYhGqtG3F2K2Fdi+U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bgZ/jcY/qA7/Qj7DiDgxfuyqOOtu+1pVX1E6aSUqX6BfPX67lYsjk4nxGTrpb5o7JaMhyIhJkNU8Kw6DcU2B+jOaUV7W8+xy7toLW+bK380m3vdaQhh0CvfHyj56Y2+LY8N77+Ggd5xfHRq3IOu5RKZ0fLKLalmq1vUvqBTtOLg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=JxTYzD7d; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="JxTYzD7d" Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 60SLbD3o022764; Thu, 29 Jan 2026 11:27:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=u44qKJ7Aaq5lAryo2 OrDX5kYjG7xdxcWhEvgrFgy9tU=; b=JxTYzD7dUKAgaEBRiT+oX9xSZt3I7p1Dr Kv80PXbBDPkGjwAxfecC+OpRhIRw6vlrBkkx3kIMIXgC8AFy9XtgpL2C11lU4TdH E3oepCaiP4rPcwHy8kkzaIElteusLHhorDNbSFkq1zASI5hnRR0nUiMY75xOMMYf h3lv50heuGoJW76UyQMPeiGM3LH99ITrk9xo7jc9WVACNzb/dGziRdMOLC0RIHX1 7iYk6sg+ZndRb8TYMuhWma3oPA01OQkLGA81Hr9bCauNFMwLqL4pk13iHd/A5Zm5 OMT0l2f+CZ5jF0RTRSPxtz5syigTBkHoK7NwmYtnX4DQ/P0IrfSWg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4bvkgmwvcg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Jan 2026 11:27:37 +0000 (GMT) Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.0.8) with ESMTP id 60TBRaMN025262; Thu, 29 Jan 2026 11:27:36 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4bvkgmwvcd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Jan 2026 11:27:36 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 60T6hAOs019647; Thu, 29 Jan 2026 11:27:35 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4bw9dn9ed4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Jan 2026 11:27:34 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 60TBRUMk56099142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Jan 2026 11:27:30 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6025E20040; Thu, 29 Jan 2026 11:27:30 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA21B2005A; Thu, 29 Jan 2026 11:27:29 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.87.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 29 Jan 2026 11:27:29 +0000 (GMT) From: Jens Remus To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org, Steven Rostedt Cc: Jens Remus , Josh Poimboeuf , Masami Hiramatsu , Mathieu Desnoyers , Peter Zijlstra , Ingo Molnar , Jiri Olsa , Arnaldo Carvalho de Melo , Namhyung Kim , Thomas Gleixner , Andrii Nakryiko , Indu Bhagat , "Jose E. Marchesi" , Beau Belgrave , Linus Torvalds , Andrew Morton , Florian Weimer , Kees Cook , "Carlos O'Donell" , Sam James , Dylan Hatch , Borislav Petkov , Dave Hansen , David Hildenbrand , "H. Peter Anvin" , "Liam R. Howlett" , Lorenzo Stoakes , Michal Hocko , Mike Rapoport , Suren Baghdasaryan , Vlastimil Babka , Heiko Carstens , Vasily Gorbik , "Steven Rostedt (Google)" Subject: [PATCH v6 3/6] x86/asm: Simplify VDSO DWARF generation Date: Thu, 29 Jan 2026 12:27:23 +0100 Message-ID: <20260129112726.892340-4-jremus@linux.ibm.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260129112726.892340-1-jremus@linux.ibm.com> References: <20260129112726.892340-1-jremus@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=Gr1PO01C c=1 sm=1 tr=0 ts=697b4429 cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=meVymXHHAAAA:8 a=VnNF1IyMAAAA:8 a=i3XSr9hboEKZ3AC0laIA:9 a=2JgSa4NbpEOStq-L5dxp:22 X-Proofpoint-GUID: Oyg23B0gG2Awa1kopZNzXh7_duCwEBia X-Proofpoint-ORIG-GUID: OsyQygSCtyWjSS4FapP7rrSktBeCogHT X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI5MDA3NiBTYWx0ZWRfX218YVoj9uWGR UjQKUslWwhOYxZsPo7f0yEuGXAfcPR4F5eSFpzcxvP598njHCIhatVtq1CyrhGwErhqpaoCR0Q8 CfCe0OXhncuayjginQuMlAx6Ivmdg24owc+0lKtJzKtjzlIR3yKilM8qfImrZyk5Ud/oVYk/osP QFXE2VRPBoq6sDj3ySsOlNQcqP+6SiNtkHOfybgVVh+mRjMY0SObjO/I2djjBIyOde88QjUHKgG ov8LobE2O8LiL3laYgunU4vnrQdFo/puNgt+mIgHJ2J5n58hI/flnfqs+foCOaahMMUyU9G+dYd bt78jsGXvxEHNuTJANaQmDnjHPmy/GGkiJIChopZS1VPPpXb/2BHWYppJ2UpnJeDTN/LSTu5kMm nc/vL5XSwWCnFQIcymVBkVc9lBylYiu3UXkjTUycRMcP0PzTgDStuTDDVqeKY4zztgwDawxvpw1 8NLWKxEQh4niJJi6FPw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-29_02,2026-01-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 suspectscore=0 impostorscore=0 phishscore=0 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2601150000 definitions=main-2601290076 Content-Type: text/plain; charset="utf-8" From: Josh Poimboeuf Add CFI_STARTPROC and CFI_ENDPROC annotations to the SYM_FUNC_* macros so the VDSO asm functions don't need to add them manually. Note this only affects VDSO, the CFI_* macros are empty for the kernel proper. [ Jens Remus: Reword commit subject and message as suggested by Josh. ] Signed-off-by: Josh Poimboeuf Signed-off-by: Steven Rostedt (Google) Signed-off-by: Jens Remus --- arch/x86/entry/vdso/vdso-layout.lds.S | 2 +- arch/x86/entry/vdso/vgetrandom-chacha.S | 2 -- arch/x86/entry/vdso/vsgx.S | 4 --- arch/x86/include/asm/linkage.h | 33 ++++++++++++++++++++----- arch/x86/include/asm/vdso.h | 1 - 5 files changed, 28 insertions(+), 14 deletions(-) diff --git a/arch/x86/entry/vdso/vdso-layout.lds.S b/arch/x86/entry/vdso/vd= so-layout.lds.S index ec1ac191a057..60747905de2b 100644 --- a/arch/x86/entry/vdso/vdso-layout.lds.S +++ b/arch/x86/entry/vdso/vdso-layout.lds.S @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0 */ -#include +#include #include #include =20 diff --git a/arch/x86/entry/vdso/vgetrandom-chacha.S b/arch/x86/entry/vdso/= vgetrandom-chacha.S index cc82da9216fb..a33212594731 100644 --- a/arch/x86/entry/vdso/vgetrandom-chacha.S +++ b/arch/x86/entry/vdso/vgetrandom-chacha.S @@ -22,7 +22,6 @@ CONSTANTS: .octa 0x6b20657479622d323320646e61707865 * rcx: number of 64-byte blocks to write to output */ SYM_FUNC_START(__arch_chacha20_blocks_nostack) - CFI_STARTPROC .set output, %rdi .set key, %rsi .set counter, %rdx @@ -175,5 +174,4 @@ SYM_FUNC_START(__arch_chacha20_blocks_nostack) pxor temp,temp =20 ret - CFI_ENDPROC SYM_FUNC_END(__arch_chacha20_blocks_nostack) diff --git a/arch/x86/entry/vdso/vsgx.S b/arch/x86/entry/vdso/vsgx.S index 37a3d4c02366..c0342238c976 100644 --- a/arch/x86/entry/vdso/vsgx.S +++ b/arch/x86/entry/vdso/vsgx.S @@ -24,8 +24,6 @@ .section .text, "ax" =20 SYM_FUNC_START(__vdso_sgx_enter_enclave) - /* Prolog */ - .cfi_startproc push %rbp .cfi_adjust_cfa_offset 8 .cfi_rel_offset %rbp, 0 @@ -143,8 +141,6 @@ SYM_FUNC_START(__vdso_sgx_enter_enclave) jle .Lout jmp .Lenter_enclave =20 - .cfi_endproc - _ASM_VDSO_EXTABLE_HANDLE(.Lenclu_eenter_eresume, .Lhandle_exception) =20 SYM_FUNC_END(__vdso_sgx_enter_enclave) diff --git a/arch/x86/include/asm/linkage.h b/arch/x86/include/asm/linkage.h index 9d38ae744a2e..9d7f90c57451 100644 --- a/arch/x86/include/asm/linkage.h +++ b/arch/x86/include/asm/linkage.h @@ -40,6 +40,10 @@ =20 #ifdef __ASSEMBLER__ =20 +#ifndef LINKER_SCRIPT +#include +#endif + #if defined(CONFIG_MITIGATION_RETHUNK) && !defined(__DISABLE_EXPORTS) && != defined(BUILD_VDSO) #define RET jmp __x86_return_thunk #else /* CONFIG_MITIGATION_RETPOLINE */ @@ -112,34 +116,51 @@ # define SYM_FUNC_ALIAS_MEMFUNC SYM_FUNC_ALIAS #endif =20 +#define __SYM_FUNC_START \ + CFI_STARTPROC ASM_NL + +#define __SYM_FUNC_END \ + CFI_ENDPROC ASM_NL + /* SYM_TYPED_FUNC_START -- use for indirectly called globals, w/ CFI type = */ #define SYM_TYPED_FUNC_START(name) \ SYM_TYPED_START(name, SYM_L_GLOBAL, SYM_F_ALIGN) \ + __SYM_FUNC_START \ ENDBR =20 /* SYM_FUNC_START -- use for global functions */ #define SYM_FUNC_START(name) \ - SYM_START(name, SYM_L_GLOBAL, SYM_F_ALIGN) + SYM_START(name, SYM_L_GLOBAL, SYM_F_ALIGN) \ + __SYM_FUNC_START =20 /* SYM_FUNC_START_NOALIGN -- use for global functions, w/o alignment */ #define SYM_FUNC_START_NOALIGN(name) \ - SYM_START(name, SYM_L_GLOBAL, SYM_A_NONE) + SYM_START(name, SYM_L_GLOBAL, SYM_A_NONE) \ + __SYM_FUNC_START =20 /* SYM_FUNC_START_LOCAL -- use for local functions */ #define SYM_FUNC_START_LOCAL(name) \ - SYM_START(name, SYM_L_LOCAL, SYM_F_ALIGN) + SYM_START(name, SYM_L_LOCAL, SYM_F_ALIGN) \ + __SYM_FUNC_START =20 /* SYM_FUNC_START_LOCAL_NOALIGN -- use for local functions, w/o alignment = */ #define SYM_FUNC_START_LOCAL_NOALIGN(name) \ - SYM_START(name, SYM_L_LOCAL, SYM_A_NONE) + SYM_START(name, SYM_L_LOCAL, SYM_A_NONE) \ + __SYM_FUNC_START =20 /* SYM_FUNC_START_WEAK -- use for weak functions */ #define SYM_FUNC_START_WEAK(name) \ - SYM_START(name, SYM_L_WEAK, SYM_F_ALIGN) + SYM_START(name, SYM_L_WEAK, SYM_F_ALIGN) \ + __SYM_FUNC_START =20 /* SYM_FUNC_START_WEAK_NOALIGN -- use for weak functions, w/o alignment */ #define SYM_FUNC_START_WEAK_NOALIGN(name) \ - SYM_START(name, SYM_L_WEAK, SYM_A_NONE) + SYM_START(name, SYM_L_WEAK, SYM_A_NONE) \ + __SYM_FUNC_START + +#define SYM_FUNC_END(name) \ + __SYM_FUNC_END \ + SYM_END(name, SYM_T_FUNC) =20 /* * Expose 'sym' to the startup code in arch/x86/boot/startup/, by emitting= an diff --git a/arch/x86/include/asm/vdso.h b/arch/x86/include/asm/vdso.h index b7253ef3205a..c4290dadba66 100644 --- a/arch/x86/include/asm/vdso.h +++ b/arch/x86/include/asm/vdso.h @@ -2,7 +2,6 @@ #ifndef _ASM_X86_VDSO_H #define _ASM_X86_VDSO_H =20 -#include #include #include =20 --=20 2.51.0