Opened 10 years ago

Closed 21 months ago

#11131 closed bug (fixed)

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:
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 10 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by arvindsraj, 10 years ago

patch: 01

comment:2 by ithamar, 10 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, 10 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, 9 years ago

Milestone: R1Unscheduled

Moving non-x86 related tickets out of R1 milestone.

comment:5 by pulkomandy, 9 years ago

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

comment:6 by waddlesplash, 9 years ago

patch: 10

comment:7 by waddlesplash, 9 years ago

patch: 01

Marked patch as obsolete since it was applied.

comment:8 by pulkomandy, 8 years ago

patch: 10

comment:9 by axeld, 7 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:10 by davidkaroly, 21 months ago

it does not seem to be reproducible recently

comment:11 by davidkaroly, 21 months ago

Resolution: fixed
Status: assignedclosed

we get proper stack traces since hrev56350, therefore closing this ticket

Note: See TracTickets for help on using tickets.