On Thu, Mar 20, 2025 at 10:16 AM Song Liu wrote:
>
> static __always_inline void
> @@ -230,8 +231,26 @@ kunwind_next_frame_record(struct kunwind_state *state)
> new_fp = READ_ONCE(record->fp);
> new_pc = READ_ONCE(record->lr);
>
> - if (!new_fp && !new_pc)
> -
On Tue, Mar 18, 2025 at 10:39 PM Josh Poimboeuf wrote:
>
> On Tue, Mar 18, 2025 at 08:58:52PM -0700, Song Liu wrote:
> > On a closer look, I think we also need some logic in unwind_find_stack()
> > so that we can see when the unwinder hits the exception boundary. For
> > this reason, we may still
On Tue, Feb 25, 2025 at 11:38 AM Indu Bhagat wrote:
>
> On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote:
> >> I already have a WIP patch to add sframe support to the kernel module.
> >> However, it is not yet working. I had trouble unwinding frames for the
> >>
On Tue, Feb 25, 2025 at 10:13 AM Josh Poimboeuf wrote:
>
> On Tue, Feb 25, 2025 at 01:02:24AM +, Weinan Liu wrote:
> > On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote:
> > > I already have a WIP patch to add sframe support to the kernel module.
> > > However
On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote:
> I already have a WIP patch to add sframe support to the kernel module.
> However, it is not yet working. I had trouble unwinding frames for the
> kernel module using the current algorithm.
>
> Indu has likely identified the is
On Fri, Feb 7, 2025 at 4:16 AM Puranjay Mohan wrote:
>
> Yes, I think we should, but others people could add more to this.
>
> I have been testing this series with Kpatch and created a PR that works
> with this unwinder: https://github.com/dynup/kpatch/pull/1439
>
> For the modules, I think we n
> After some debugging this is what I found:
>
> devtmpfsd() calls devtmpfs_work_loop() which is marked '__noreturn' and has an
> infinite loop. The compiler puts the `bl` to devtmpfs_work_loop() as the the
> last instruction in devtmpfsd() and therefore on entry to
> devtmpfs_work_loop(),
> LR p
On Thu, Jan 30, 2025 at 2:29 AM Prasanna Kumar T S M
wrote:
> On 30-01-2025 15:52, Prasanna Kumar T S M wrote:
> >
> > On 28-01-2025 03:03, Weinan Liu wrote:
> > > This change introduces a kernel space unwinder using sframe table for
> > > architect
On Thu, Jan 30, 2025 at 2:22 AM Prasanna Kumar T S M
wrote:
> On 28-01-2025 03:03, Weinan Liu wrote:
> > diff --git a/include/linux/sframe_lookup.h b/include/linux/sframe_lookup.h
> > new file mode 100644
> > index ..1c26cf1f38d4
> > --- /dev/n
Not only does objdump show that func_start_addr all 0s, but the
func_start_addr in the kernel module's sframe table is also incorrect. I'll
prepare a repro so we can investigate this.
>
> I can share a fix for 32589 so atleast we can verify that the starting
> point is sane.
>
Great! Thanks.
This
Since SFrame is considered as reliable stacktrace, enable livepatch in
arch/arm64/Kconfig
Signed-off-by: Weinan Liu
---
arch/arm64/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 100570a048c5..c292bc73b65c 100644
--- a/arch/arm64
ned-off-by: Madhavan T. Venkataraman
Signed-off-by: Weinan Liu
---
arch/arm64/include/asm/thread_info.h | 4 +++-
arch/arm64/kernel/entry-common.c | 4
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/thread_info.h
b/arch/arm64/include/asm/thread_in
Add unwind_next_frame_sframe() function to unwind by sframe info.
Built with GNU Binutils 2.42 to verify that this sframe unwinder can
backtrace correctly on arm64.
Signed-off-by: Weinan Liu
---
arch/arm64/include/asm/stacktrace/common.h | 4 ++
arch/arm64/kernel/setup.c | 2
unwinder
Signed-off-by: Weinan Liu
---
arch/arm64/include/asm/stacktrace/common.h | 2 +
arch/arm64/kernel/stacktrace.c | 47 +-
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/include/asm/stacktrace/common.h
b/arch/arm64/include/asm
/lkml/42c0a99236af65c09c8182e260af7bcf5aa1e158.1730150953.git.jpoim...@kernel.org/
[2] https://sourceware.org/binutils/docs/sframe-spec.html
Signed-off-by: Weinan Liu
---
include/linux/sframe_lookup.h | 43
kernel/Makefile | 1 +
kernel/sframe_lookup.c| 196 ++
3
.git.jpoim...@kernel.org/
[2]: https://sourceware.org/binutils/docs/sframe-spec.html
Signed-off-by: Weinan Liu
---
kernel/sframe.h | 215
1 file changed, 215 insertions(+)
create mode 100644 kernel/sframe.h
diff --git a/kernel/sframe.h b/kernel/sframe.h
.
Annotate CFI unwind info for assembly for interrupt and exception
handlers.
Signed-off-by: Weinan Liu
---
arch/arm64/kernel/entry.S | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index 5ae2a34b50bd..fe3e3e29ee5d 100644
--- a
50953.git.jpoim...@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
Use the -Wa,--gsframe flags to build the code, so GAS will generate
a new .sframe section for the stack trace information.
Currently, the sframe format only supports arm64 and x86_64
architectures. Add this configuration on arm64 to enable sframe
unwinder in the future.
Signed-off-by: Weinan Liu
We from Google are working on implementing SFrame unwinder for the Linux
kernel,
And we will be happy to collaborate with others for adding arm64 livepatch
support
Weinan
I'm observing multiple compilation errors when using clang-16 after applying
this particular patch.
# CC init/main.o
:4:1: error: symbol '__bug_table_0' is already defined
__bug_table_0:
^
:4:1: error: symbol '__bug_table_0' is already defined
__bug_table_0:
^
:4:1: error: symbol '__jump_tab
21 matches
Mail list logo