From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 CDDA3478E42 for ; Fri, 15 May 2026 11:32:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844730; cv=none; b=Sy/O4TQrRNJuBDNFxtOoo0jrsN3eJ/I8m6CO9JkTne9kTYv+IWLgNsK14eIkc4vqXPf+zpzc5xuyeTjegWifi3Lhpm9/kU5c7rKEizWn2LA3ZmcKy8YGaTx0DeD4Txspb7+SSyrTu5QXMVAz1HumfrQGujhDQtnJ+eEPoP05rrE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844730; c=relaxed/simple; bh=ILFfSSwiIHS3xksI2tYP/10VV1qXzWXTFy+yC9JgmLA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=u82cSyhqgK1UyqbQ+B1ImYE9z64mogZ+O0MjCQYVqeAtCu/QQiPWd7uu6i/x4BSX3xUA0/fYZduo+rzQb9gJOcQlBSOH86imRq0Coul1HUo3sNMIFo4hp2DfGYZFkFgGUQMIMwRV4lAxQjaxsbRddK0nwm+HM/9Y8aYVZYgLNgY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=vambGVoE; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vambGVoE" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-48d1c670255so495e9.0 for ; Fri, 15 May 2026 04:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778844727; x=1779449527; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=un4xKj6dT6ED2wP/JPzbfl3yuNb8MArO48PVmah0dIc=; b=vambGVoELPGcNJ25K7pgusr83BnwxT1GtoHqdh+oqu5coSLmZlmFYJxpi9oRuvsUl9 vPbGVRtOEMaO5r2S/U6i9m8gR42aZ6zL5LaesL8WIj82sBM+nkK5V1yTEd5i6SDO9TFr UyduaK4UvYAaf+teN4PBRMo7Mrf6kwOMAOJzm/fmjlXZdjx0J8ukTwEm1PAzO9XhU8TK fJrKAhESY+tQ5PsWiRWtByRgvCIPtxqNu41tHDUaHNlpaHRALMW/IqPD+ltRkzC5Vd7K uKs453fGzAWyqxaWdgKTS82beNpLRYDNnQlRsA1WQEN2CasGe3jUvCZNDqPAAI259B76 HPjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844727; x=1779449527; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=un4xKj6dT6ED2wP/JPzbfl3yuNb8MArO48PVmah0dIc=; b=QWq+83Grj7kTtx8Z9YDyF91KZ/cNpGUII0ZHEqFXXXCHxnA9gENsjPwnxVdBVmX5od LP6tvUSnQPb2fHDgqEbrgjya/v997gW+H3iuo6AqCNuYMgkvHp3M9pLpcEqnAbrYs0Nv XG8PQ82gYsOFB0LR0Ha6pTK4GVNgWTklQDL6m7WPJsw8P8IrhWDJVng/7gxhAPSuR6+K zp1K3WKVCJIfICANhfiEPKDH6lrYDoie7+mNRQJg0Aazj7lG6RhLm8DurlfrjZkDDTc7 J2cCe7+83rRuBiUAzfgeIdynFOxdu1CON5nJt+5MKx+XwS9Q9tGBEvUb6wt3UbU1qqVG jMXw== X-Forwarded-Encrypted: i=1; AFNElJ81XIThPelzj02KxkcyDpVWLOw2VLA7olOQ29Vl3UhAcg831eTOv61///YJ+Uz9CbHUlFOxEncFt30YRks=@vger.kernel.org X-Gm-Message-State: AOJu0Yzt03+0qSEqjoFYDeAS6TDFhz3E3i4QcWxDL7Vwnhvp6R8pELvU HSzOz8jiPqtlnjq+3qxW70hDqRsvItLl4Gx0PUetN+IDf8CSsmlYs+UjRz2yPTOkQQ== X-Gm-Gg: Acq92OHc5JUNAxJUUjazFV9pfGh9jHPfAH5G486yGtEgXIkAZTWoo2sP8VIfUTC7X4V vhULbHin0jY8CG3+Hzi4Q3F6LyxqpkVMMwUGZfugnppM4Ipr3/nSyWr4yFq9fJxb90Bj9w4TCL3 GswVPGcbTEIYexmQ3ZrXKNoOLyRcgdhLEJZJKxt2qVgnLfII95TO4Xb+Oofq2TLH+V08Abds4oc mootAQ2Pny9/gYv/N4yy5yn/cFqFk76VTuTEyU/gq7rsvkffj+7gJ2wO58Cmkfyd14aoePtBudZ 4fwzYQMj6Ley2YLDjum0eIghaAILLi/pOWjUAlDhlWZdAq/fMI/7kQ9HIM4O31BxRHZwxA2Vy2O n5Ty8v/SMnFt48Yec+eO9uGhcJGcDJM24scKil605S79UkK5V/n63uFr/0HkMK1PaD5SOz5ylAg 8Leu3yEvS9PN6r5AtBxheDRMFM7rNmQa4T9Ouwj1RjiHmbqaQMPXKu X-Received: by 2002:a05:600d:6443:20b0:489:1ace:d0d3 with SMTP id 5b1f17b1804b1-48fe8720282mr611985e9.3.1778844726885; Fri, 15 May 2026 04:32:06 -0700 (PDT) Received: from google.com (8.181.38.34.bc.googleusercontent.com. [34.38.181.8]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45da0a19a0csm14106306f8f.20.2026.05.15.04.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:32:06 -0700 (PDT) Date: Fri, 15 May 2026 11:32:00 +0000 From: Mostafa Saleh To: Dylan Hatch Cc: Roman Gushchin , Weinan Liu , Will Deacon , Josh Poimboeuf , Indu Bhagat , Peter Zijlstra , Steven Rostedt , Catalin Marinas , Jiri Kosina , Jens Remus , 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, Randy Dunlap Subject: Re: [PATCH v5 0/8] unwind, arm64: add sframe unwinder for kernel Message-ID: References: <20260428183643.3796063-1-dylanbhatch@google.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260428183643.3796063-1-dylanbhatch@google.com> On Tue, Apr 28, 2026 at 06:36:35PM +0000, Dylan Hatch wrote: > Implement a generic kernel sframe-based [1] unwinder. The main goal is > to improve reliable stacktrace on arm64 by unwinding across exception > boundaries. > > On x86, the ORC unwinder provides reliable stacktrace through similar > methodology, but arm64 lacks the necessary support from objtool to > create ORC unwind tables. > > Currently, there's already a sframe unwinder proposed for userspace: [2]. > To maintain common definitions and algorithms for sframe lookup, a > substantial portion of this patch series aims to refactor the sframe > lookup code to support both kernel and userspace sframe sections. > > Currently, only GNU Binutils support sframe. This series relies on the > Sframe V3 format, which is supported in binutils 2.46. > > These patches are based on Steven Rostedt's sframe/core branch [3], > which is and aggregation of existing work done for x86 sframe userspace > unwind, and contains [2]. This branch is, in turn, based on Linux > v7.0-rc3. This full series (applied to the sframe/core branch) is > available on github: [4]. > Not sure if related, but after updating my toolchain (aarch64-linux-gnu-gcc (Debian 15.2.0-4) 15.2.0), I hit link errors: ld.lld: error: arch/arm64/kernel/vdso/vgettimeofday.o:(.sframe) is being placed in '.sframe' ld.lld: error: arch/arm64/kernel/vdso/vgetrandom.o:(.sframe) is being placed in '.sframe` I applied this series hoping that fix it, but it doesn't, so far I have this hack : diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S index 52314be29191..53bdf757ee44 100644 --- a/arch/arm64/kernel/vdso/vdso.lds.S +++ b/arch/arm64/kernel/vdso/vdso.lds.S @@ -77,7 +77,7 @@ SECTIONS /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) *(.bss .sbss .dynbss .dynsbss) - *(.eh_frame .eh_frame_hdr) + *(.eh_frame .eh_frame_hdr .sframe) } } diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 60c8c22fd3e4..759903acd6fc 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -1064,6 +1064,7 @@ /* ld.bfd warns about .gnu.version* even when not emitted */ \ *(.gnu.version*) \ *(__tracepoint_check) \ + *(.sframe) \ #define DISCARDS \ /DISCARD/ : { \ Thanks, Mostafa