lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29b94227-8861-4011-b83f-2e0c59dd1f73@oracle.com>
Date: Tue, 28 Jan 2025 07:35:08 -0800
From: Indu Bhagat <indu.bhagat@...cle.com>
To: Weinan Liu <wnliu@...gle.com>, Josh Poimboeuf <jpoimboe@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Peter Zijlstra <peterz@...radead.org>
Cc: Mark Rutland <mark.rutland@....com>, roman.gushchin@...ux.dev,
        Will Deacon <will@...nel.org>, Ian Rogers <irogers@...gle.com>,
        linux-toolchains@...r.kernel.org, linux-kernel@...r.kernel.org,
        live-patching@...r.kernel.org, joe.lawrence@...hat.com,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

On 1/27/25 1:33 PM, Weinan Liu wrote:
> This patchset implements a generic kernel sframe-based [1] unwinder.
> The main goal is to support reliable stacktraces on arm64.
> 
> On x86 orc unwinder provides reliable stacktraces. But arm64 misses the
> required support from objtool: it cannot generate orc unwind tables for
> arm64.
> 
> Currently, there's already a sframe unwinder proposed for userspace: [2].
> Since the sframe unwind table algorithm is similar, these two proposal
> could integrate common functionality in the future.
> 
> There are some incomplete features or challenges:
>    - The unwinder doesn't yet work with kernel modules. The `start_addr` of
>      FRE from kernel modules doesn't appear correct, preventing us from
>      unwinding functions from kernel modules.

I did file https://sourceware.org/bugzilla/show_bug.cgi?id=32589 
earlier.  It is misleading (and inconvenient) to see all 0s in the dump 
of non-relocated SFrame section.

I get the sense that while issue 32589 may be causing confusion that the 
SFrame data is not correct, the problem is elsewhere ?

I can share a fix for 32589 so atleast we can verify that the starting 
point is sane.

>    - Currently, only GCC supports sframe.
> 
> Ref:
> [1]: https://sourceware.org/binutils/docs/sframe-spec.html
> [2]: https://lore.kernel.org/lkml/cover.1730150953.git.jpoimboe@kernel.org/
> 
> Madhavan T. Venkataraman (1):
>    arm64: Define TIF_PATCH_PENDING for livepatch
> 
> Weinan Liu (7):
>    unwind: build kernel with sframe info
>    arm64: entry: add unwind info for various kernel entries
>    unwind: add sframe v2 header
>    unwind: Implement generic sframe unwinder library
>    unwind: arm64: Add sframe unwinder on arm64
>    unwind: arm64: add reliable stacktrace support for arm64
>    arm64: Enable livepatch for ARM64
> 
>   Makefile                                   |   6 +
>   arch/Kconfig                               |   8 +
>   arch/arm64/Kconfig                         |   3 +
>   arch/arm64/Kconfig.debug                   |  10 +
>   arch/arm64/include/asm/stacktrace/common.h |   6 +
>   arch/arm64/include/asm/thread_info.h       |   4 +-
>   arch/arm64/kernel/entry-common.c           |   4 +
>   arch/arm64/kernel/entry.S                  |  10 +
>   arch/arm64/kernel/setup.c                  |   2 +
>   arch/arm64/kernel/stacktrace.c             | 102 ++++++++++
>   include/asm-generic/vmlinux.lds.h          |  12 ++
>   include/linux/sframe_lookup.h              |  43 +++++
>   kernel/Makefile                            |   1 +
>   kernel/sframe.h                            | 215 +++++++++++++++++++++
>   kernel/sframe_lookup.c                     | 196 +++++++++++++++++++
>   15 files changed, 621 insertions(+), 1 deletion(-)
>   create mode 100644 include/linux/sframe_lookup.h
>   create mode 100644 kernel/sframe.h
>   create mode 100644 kernel/sframe_lookup.c
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ