Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-19 Thread Weinan Liu
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

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-19 Thread Song Liu
On Wed, Mar 19, 2025 at 11:38 AM Weinan Liu wrote: > > 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

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-18 Thread Josh Poimboeuf
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 need unwind_state.unreliable. I will look into > fixing this and s

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-18 Thread Song Liu
On Tue, Mar 18, 2025 at 6:03 PM Josh Poimboeuf wrote: > > On Tue, Mar 18, 2025 at 04:38:20PM -0700, Song Liu wrote: > > On Tue, Mar 18, 2025 at 4:00 PM Josh Poimboeuf wrote: > > > - even in the -ENOENT case the unreliable bit has already been set > > > right before the call to kunwind_next_

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-18 Thread Josh Poimboeuf
On Tue, Mar 18, 2025 at 04:38:20PM -0700, Song Liu wrote: > On Tue, Mar 18, 2025 at 4:00 PM Josh Poimboeuf wrote: > > - even in the -ENOENT case the unreliable bit has already been set > > right before the call to kunwind_next_frame_record_meta(). > > For this one, do you mean we set state-

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-18 Thread Song Liu
On Tue, Mar 18, 2025 at 4:00 PM Josh Poimboeuf wrote: > > On Tue, Mar 18, 2025 at 01:14:40PM -0700, Song Liu wrote: > > > > > > See for example all the error conditions in the x86 version of > > > arch_stack_walk_reliable() and in arch/x86/kernel/unwind_frame.c. > > > > I guess I missed this part:

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-18 Thread Josh Poimboeuf
On Tue, Mar 18, 2025 at 01:14:40PM -0700, Song Liu wrote: > > > > See for example all the error conditions in the x86 version of > > arch_stack_walk_reliable() and in arch/x86/kernel/unwind_frame.c. > > I guess I missed this part: > > diff --git i/arch/arm64/kernel/stacktrace.c w/arch/arm64/kerne

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-18 Thread Song Liu
Hi Josh, Thanks for the review! On Tue, Mar 18, 2025 at 11:45 AM Josh Poimboeuf wrote: > > On Fri, Mar 07, 2025 at 05:27:41PM -0800, Song Liu wrote: > > With proper exception boundary detection, it is possible to implment > > arch_stack_walk_reliable without sframe. > > > > Note that, arch_stack

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-18 Thread Josh Poimboeuf
On Fri, Mar 07, 2025 at 05:27:41PM -0800, Song Liu wrote: > With proper exception boundary detection, it is possible to implment > arch_stack_walk_reliable without sframe. > > Note that, arch_stack_walk_reliable does not guarantee getting reliable > stack in all scenarios. Instead, it can reliably

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-13 Thread Song Liu
On Thu, Mar 13, 2025 at 11:12 AM Breno Leitao wrote: > > On Fri, Mar 07, 2025 at 05:27:41PM -0800, Song Liu wrote: > > With proper exception boundary detection, it is possible to implment > > arch_stack_walk_reliable without sframe. > > > > Note that, arch_stack_walk_reliable does not guarantee ge

Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-13 Thread Breno Leitao
On Fri, Mar 07, 2025 at 05:27:41PM -0800, Song Liu wrote: > With proper exception boundary detection, it is possible to implment > arch_stack_walk_reliable without sframe. > > Note that, arch_stack_walk_reliable does not guarantee getting reliable > stack in all scenarios. Instead, it can reliably

[PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-07 Thread Song Liu
With proper exception boundary detection, it is possible to implment arch_stack_walk_reliable without sframe. Note that, arch_stack_walk_reliable does not guarantee getting reliable stack in all scenarios. Instead, it can reliably detect when the stack trace is not reliable, which is enough to pro