Opened 5 years ago

Last modified 2 years ago

#11131 assigned bug

KDL faults when printing the backtrace due to incorrect condition to terminate stack unwinding

Reported by: arvindsraj Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: arm


Currently, the check under which KDL stops unwinding the stack is incorrect. As a result, KDL faults when it tries to access the frames of the u-boot function that invoked the haiku loader. The patch adds a check to ensure that the frame prior to the kernel entry are not included in the backtrace by ensuring that the value of lr register is within the memory allocated for the kernel.

Attachments (1)

Added-check-to-ensure-KDL-does-not-fault-when-printing-backtrace.patch (2.4 KB) - added by arvindsraj 5 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 5 years ago by arvindsraj

Has a Patch: set

comment:2 Changed 5 years ago by ithamar

This change actually limits stack traces to the first 8MB of the kernel, which does not sound like a proper fix. It works for now, since it is also the max kernel size on ARM at the moment, but with additional kernel modules loaded and such this will not work. Also, this only seems to be a problem on KDLs before the VM is properly initialized. I've hacked the kernel a little to get further, and KDL is working perfectly fine for me (including symbols, yay!).

comment:3 Changed 5 years ago by pulkomandy

Patch applied in hrev47797. We will want to fix this in a better way (see Ithamar comment), but it will do for now. Leaving the ticket open until the better fix is implemented.

comment:4 Changed 4 years ago by luroh

Milestone: R1Unscheduled

Moving non-x86 related tickets out of R1 milestone.

comment:5 Changed 4 years ago by pulkomandy

Actually I think this one was fixed during the coding sprint. Ithamar, do you confirm?

comment:6 Changed 4 years ago by waddlesplash

Has a Patch: unset

comment:7 Changed 4 years ago by waddlesplash

Has a Patch: set

Marked patch as obsolete since it was applied.

comment:8 Changed 3 years ago by pulkomandy

Has a Patch: unset

comment:9 Changed 2 years ago by axeld

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.