Actions
Bug #8667
closeddie() misleads with KERNELBASE
Start date:
2017-09-21
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
When panicking during a T_PGFLT trap, the die() function will customize the error message based on the fault address. It checks for addresses below KERNELBASE to signify an improper access to userspace (or a NULL pointer dereference for addresses in the first page). While this is fine on 32-bit kernels, 64-bit machines with large amounts of DRAM adjust 'kernelbase' relative to the segkpm mapping. This means that the true 'kernelbase' falls below KERNELBASE, leading to potentially confusing error messages.
If die() compares against 'kernelbase' instead, it will properly differentiate between improper userspace accesses and faults to kernel addresses.
Updated by Electric Monk over 4 years ago
- Status changed from New to Closed
git commit 086dcf7e86461fd5b1eb18e47d0e3d136a959e5e
commit 086dcf7e86461fd5b1eb18e47d0e3d136a959e5e Author: Patrick Mooney <pmooney@pfmooney.com> Date: 2017-10-10T15:21:08.000Z 8667 die() misleads with KERNELBASE Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Gordon Ross <gwr@nexenta.com>
Actions