tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Use of the PC value in interrupt/exception handlers
On Fri, Aug 02, 2013 at 10:46:31AM +0000, Piyus Kedia wrote:
> Dear all,
>
> We are working on developing a dynamic binary translator for the kernel.
> Towards this, we wanted to confirm if the interrupted PC value pushed on
> stack by an interrupt/exception is used by the interrupt/exception handlers?
> For example, is the PC value compared against a fixed address to determine
> the handler behaviour (like Linux's page fault handler compares the faulting
> PC against an exception table, to allow functions like copy_from_user to
> fault).
IIRC i386 and amd64 both check the faulting PC for copyin() and copyout()
(and similar functions). Unlike linux these exist as proper functions
so there is only a single set of exception PC bounds (not one for every
call site.
There will also be checks that a user-space PC actually contains
a user address.
Also the signal information, coredump, and registers for GDB (etc)
contain the PC.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index