Re: [RFC][PATCH] x86: don't destroy %rbp on kernel-mode faults

From: Andi Kleen
Date: Thu May 22 2008 - 08:59:20 EST

> Hm, I am not sure exactly what a "real unwinder" would be. But I do

A dwarf2 unwinder that doesn't require pipe line stalls on many
CPUs on each function entry point for setting up a frame.

Instead of letting all code
maintain a frame at runtime the stack frames are described by
an external unwind table that is then walked by the unwinder.

The unwinder was in for a short time, but
Linus unfortunately removed it again because it took some time
to debug it in tree and he lost patience. I believe an updated
and stable version is available in the SUSE kernels.

> think it's fair to say that it is the assembly code in this case that
> is violating the binary interface, and not the stack tracer code.

There is a no binary interface for page faults (or other exceptions)
except that "all registers must be restored in the end". They certainly don't
follow the normal ABI.

Still the fix is good, just pointing out that you'll likely need
to change a lot more code to get the frame pointer fully supported
everywhere because it was all written under the explicit "no frame pointer"

-Andi (who still prefers the unwinder)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at