From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 CE098478E45 for ; Fri, 15 May 2026 11:32:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844730; cv=none; b=FopT+k7Pc19UI23Eik3wYPWJuM/sn693zyF3wgZ0mn4PynIa6yoHy6Ar+bjybZlT2rbhJHQgnwvQQYPiS1WdmRBAQmSOfufKAvo08b+oBEU11QFEJRVUhw8fdtBs5WCRo/z6GL8ppXw01QYALdYUYArpr9ewMORgRnyA9IgqXy4= 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.45 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-f45.google.com with SMTP id 5b1f17b1804b1-48d1c670255so535e9.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=URTVTiPMbDHj/b0OWq6xt7Jbi9VI4+UozFXblOwdDmGSL3dP17Sj7I8sE8XGOgFMyG 4puFM0SO9VEmJztG7qYXq4OjfnGSN+5JW+rSaR5nQ3wMnrsQ5G+JhNYVjFt5KtUoFGqy ShSoHYwp54H4fk5ZBldvz979l3buwuW0gF+MjwWaGh1q6XtZOALp3dXib2g0dGzomjTL evwo3suzMhjwd/VYcgBHVzwCfQhEJ9GmybPKIt3cYJb06vkLWeUy/LVvFuqv2IB3hZ5P aOcEIfAOOJbFdYGn+bdWAIgLZcId4OwxJ0KNeHCGw+fSHwx1OEArPerLyS9nzgjTTIEp 5OKQ== X-Forwarded-Encrypted: i=1; AFNElJ8+oVODhtfl4zmWPwMUf5vCruBE5Xv93U2VCVvYG2zOd2PZrVgWxO750L2MG/wEDv1W2VL+QcoiEq69/D+uzdQ9@vger.kernel.org X-Gm-Message-State: AOJu0YzPO5FnosbKV4dQzSW4oDJGphOTLXQ3IcPdlovvLlFmwEPs8IzB EcymIKzpzdCFN4gQQBCj2WOzHooij4j93RJ4+4TgAZ8VzFzylxhufVBjhTwcdnYplw== X-Gm-Gg: Acq92OHByuvaymjmtGVQa17KaDuLmFnHB0TtVPcJsDXn6L+NUTHrLl7Miew26/+NdsU pEi5+L9UKFVnsBrBBxuLOescBSM7pzBmwPX1uKRFSeNjYQP9lO3oNeidz9384Vbbhx035B6LB65 ZqhwbQhrIokGJXtIRfkNKYR7CdEc78JOxpBLNnZLLgTnewleCPfLc5G6zhwWp/mOYanljBv93Fe XhMZU33H9A4GUkR8GorcUYCKavS4+apBAwldfyAV8/jIdTTRKN+RWqPSkN2xVFYap/8+/8wbWyw TcsV3JAEOzUxd5uM/+yFOT7jZnlyfHdLCi3zbfSqWq58AXgNrBppf8xNNFrMqQFQ+4pEe48HDPb Yjszmt5jP8hHx5BgNMRqdckaAd5LW+AV6Ay4Po8N9lXEBd6oNiccGekJNzmGqAuNw1QaR31yCv3 kjqsjKyL1C5eNI38p8TlKQa7Z+Ki1sRQuNRWkCcF3bPvMfTKHKSZCZ 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-toolchains@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