Unable to backtrace out of vector page 0xffff0000
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GDB |
Fix Released
|
Medium
|
Ulrich Weigand | ||
Linaro Linux |
Fix Released
|
Medium
|
Nicolas Pitre |
Bug Description
The kernel creates a special page visible to user space at 0xffff0000. This page contains (amongst others) small code stubs that can be executed in user space. These include:
- Signal return handler stubs
- ERESTART_
- User-mode helpers for atomic operations
Unfortunately, while this page can be accessed from user space code, it is invisible to ptrace and /proc/.../mem accesses, which means GDB cannot retrieve its contents.
This is not ideal in any case, but is particularly harmful if GDB needs to perform code parsing in order to perform proper unwinding (which it generally does, as there is no debug information for code in that page either).
For example, the ERESTART_
We could fix this by hard-coding addresses in the vector page range into GDB, but that isn't really portable as not all of those addresses are guaranteed to remain stable across kernel releases.
It seems at the very least, the kernel would need to allow ptrace access to that page, to allow GDB code scanning to work.
Maybe it would even make sense to convert this page in to a full vDSO like on other platforms, including enough DWARF CFI to self-describe stack frame layouts?
Related branches
Changed in linux-linaro: | |
assignee: | nobody → Nicolas Pitre (npitre) |
Changed in gdb-linaro: | |
assignee: | nobody → Nicolas Pitre (npitre) |
status: | New → In Progress |
assignee: | Nicolas Pitre (npitre) → nobody |
status: | In Progress → New |
Changed in linux-linaro: | |
status: | New → Confirmed |
Changed in gdb-linaro: | |
assignee: | nobody → Ulrich Weigand (uweigand) |
importance: | Undecided → Medium |
Changed in linux-linaro: | |
importance: | Undecided → Medium |
Changed in gdb-linaro: | |
status: | New → Confirmed |
Changed in linux-linaro: | |
status: | Confirmed → In Progress |
Changed in gdb-linaro: | |
status: | Fix Committed → Fix Released |
Added linux-linaro since there is kernel impact.