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

Description

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 by arvindsraj, 5 years ago

Has a Patch: set

comment:2 by ithamar, 5 years ago

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 by pulkomandy, 5 years ago

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 by luroh, 5 years ago

Milestone: R1Unscheduled

Moving non-x86 related tickets out of R1 milestone.

comment:5 by pulkomandy, 5 years ago

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

comment:6 by waddlesplash, 4 years ago

Has a Patch: unset

comment:7 by waddlesplash, 4 years ago

Has a Patch: set

Marked patch as obsolete since it was applied.

comment:8 by pulkomandy, 4 years ago

Has a Patch: unset

comment:9 by axeld, 2 years ago

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