From mboxrd@z Thu Jan 1 00:00:00 1970 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 AAA1313AA2D; Thu, 16 Apr 2026 16:50:11 +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=1776358212; cv=none; b=Ss6zaM/bc6pHIdm9MuEJBQcJ65zK12X8nRqKIOri3k+OPVQiAwdQFJwBeUDEbEsh9GBeITchBbElup62oRe/jviV0cr6I2GarpbpblYY1FOgPpubd0hpz3lgZZMem/ltr+wXwmGr9F5S6laI9mWuwZhXcp8yigGBpn5O7LAyACM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776358212; c=relaxed/simple; bh=vNyiJaV9avqu4ExTmLFzY3JHREpozRAd1BFMmEtFKmg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kqlettXMJcuZbtH0bGGZ3btwFlD/Go2u+bWMDjwUD9moX9PpjPoN+zXWaKaJYu7ngua2V4iLCgapahmKZgxkD0W2SsM1SUA52bfIzVaCbNVVtGdKc54Lb4cIyLaSEApAQn2/m0wHU2widU4/65jco3hb9jST7rI7s23cIrJUROQ= 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=d+M9Rgz8; 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="d+M9Rgz8" Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63G6ixHV1859973; Thu, 16 Apr 2026 16:49:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=fOBA/e cx2eCKMkJHXKtcQXKpMOvkUxYywK3jmjjKQPk=; b=d+M9Rgz888B/XQZxitoFm7 jNnyYJ+3TLoyN2P3boVOVxyyphFer1CtX3USVpoMPe8FNkhNDbu+Csq4p6OFJNvx DuA4o1ICupxpDhmy86JqM6iwGkrTyHAPibdUwQJYPRizVP6fp1lc/Gv81B6HN9a8 ImsHnJIKKvN54AhaTSXNOlNpvV4bn3XefW0QRzPV5YBm2ORmTUeoxKQRykiReH7h 1BtWsNdS4MUJgpq+ih/S+VG1oGGRp7ZWSSbdQaiWK9EwkAk0fGbW2SyB1+V6281q zQl/zjyucIF5a79GcqH6NP7rcV6SWkLLCBhcIjgkNrLX6J3vqMPbvYPPF4xQra8Q == Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dh89pnkx8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Apr 2026 16:49:35 +0000 (GMT) Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 63GFg0Xs031138; Thu, 16 Apr 2026 16:49:34 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4dg10yku3r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Apr 2026 16:49:34 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 63GGnWjB14221730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Apr 2026 16:49:32 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B1C220043; Thu, 16 Apr 2026 16:49:32 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D850B20040; Thu, 16 Apr 2026 16:49:30 +0000 (GMT) Received: from [9.111.199.83] (unknown [9.111.199.83]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 16 Apr 2026 16:49:30 +0000 (GMT) Message-ID: <72b893e7-e923-440f-8d24-776c7962ac71@linux.ibm.com> Date: Thu, 16 Apr 2026 18:49:28 +0200 Precedence: bulk X-Mailing-List: live-patching@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/8] arm64: entry: add unwind info for various kernel entries To: Dylan Hatch , Roman Gushchin , Weinan Liu , Will Deacon , Josh Poimboeuf , Indu Bhagat , Peter Zijlstra , Steven Rostedt , Catalin Marinas , Jiri Kosina Cc: Mark Rutland , Prasanna Kumar T S M , Puranjay Mohan , Song Liu , joe.lawrence@redhat.com, linux-toolchains@vger.kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Carstens References: <20260406185000.1378082-1-dylanbhatch@google.com> <20260406185000.1378082-4-dylanbhatch@google.com> Content-Language: en-US From: Jens Remus Organization: IBM Deutschland Research & Development GmbH In-Reply-To: <20260406185000.1378082-4-dylanbhatch@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-GUID: y2x_ftf0F9XmeCuxF9mPez9_GjRH2WPg X-Proofpoint-ORIG-GUID: Lvt1QMgcEijiTBznQ7XlYmMVD_g2jV4H X-Authority-Analysis: v=2.4 cv=WbE8rUhX c=1 sm=1 tr=0 ts=69e1131f cx=c_pps a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VnNF1IyMAAAA:8 a=1XWaLZrsAAAA:8 a=lKmbvdJDYgI8s-_BAhYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDE2MDE2MCBTYWx0ZWRfXznP5/Iy7wkBa s3w8qIvqQr8Ist0jjIeQ87JSjB4Sxqf7EdQRB3hXxTLrS82DAMq+jV4p73bLXRGtEqAMvBc9SUI 776yNDC/n05C1aW58vI7K/Ind9ZY+bBsan+IkbBENYYp4DOIFvPXFs7s4PWDGhRUETCbLj53c1P TnugmDuPKdnTLJrGc6fmbeavn41drm+5Qw4z3OdRkmPkAoWudq07/uffXIklHT9dLrir3QvXZ3Y dw/CnJhktOP70d/zmPFLxS702hVzoa8LN9uAhjrv2Yx3zIsrQ/GXa/vBLflz9ws5EHQxxu2czMr aGpAqvbkjq6q0j0zFp1uCZExdUq8u4dqft/QeKzDg8C3XLOiyz1gQrCB0Rha91k20RbYK4aimjW WnBcYbOB664rpAPm7CdaZbCnUTGZaQSbPluE8KT83+zbGK4ZXIsW2fGAEA4H6M7T7XqGPXc9Ql3 NfNPpyn0SQLerakHKdw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-16_03,2026-04-16_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 priorityscore=1501 spamscore=0 clxscore=1015 phishscore=0 impostorscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604160160 On 4/6/2026 8:49 PM, Dylan Hatch wrote: > From: Weinan Liu > > DWARF CFI (Call Frame Information) specifies how to recover the return > address and callee-saved registers at each PC in a given function. > Compilers are able to generate the CFI annotations when they compile > the code to assembly language. For handcrafted assembly, we need to > annotate them by hand. > > Annotate CFI unwind info for assembly for interrupt and exception > handlers. > > Signed-off-by: Weinan Liu > Signed-off-by: Dylan Hatch > --- > arch/arm64/kernel/entry.S | 10 ++++++++++ > 1 file changed, 10 insertions(+) The added CFI directives somehow cause .eh_frame (instead of .debug_frame) to be generated in addition to .sframe. This causes the following warning when linking vmlinux (.tmp_vmlinux1, .tmp_vmlinux2, and vmlinux.unstripped): LD vmlinux.unstripped aarch64-linux-gnu-ld: warning: orphan section `.eh_frame' from `arch/arm64/kernel/entry.o' being placed in section `.eh_frame' I don't think this can be controlled using compiler options -fno-asynchronous-unwind-tables -fno-unwind-tables, as entry.S is only preprocessed and then fed into the assembler. The following at the top of entry.S would resolve the issue: diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S @@ -30,6 +30,12 @@ #include #include +/* + * Do not generate .eh_frame. Only generate .debug_frame and optionally + * .sframe (via assembler option --gsframe[-N]). + */ + .cfi_sections .debug_frame + .macro clear_gp_regs .irp n,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 mov x\n, xzr Regards, Jens -- Jens Remus Linux on Z Development (D3303) jremus@de.ibm.com / jremus@linux.ibm.com IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Ehningen; Registergericht: Amtsgericht Stuttgart, HRB 243294 IBM Data Privacy Statement: https://www.ibm.com/privacy/