Be careful about signal versus exception. Signal has a specific meaning in
Unix that is different.
> the Linux Device Drivers book, but it doesn't
> appear to cover this type of problem.
I'm not suprised 8). You can do this. The best example of it is the
copy_*_user functions (include/asm-i386/uaccess.h)
You want the asm code to look like
1: wrmsr blah
.section .fixup, "ax"
3: code to handle fault
jmp 2b # Back to the original code path
.section __ex_table, "a"
What happens when you get a fault is the kernel walks the exception table
looking for the fault address (thats the piece in the __ex_table. If it
finds the address it jumps to the fault handler address. If not it
follows the normal path.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
Please read the FAQ at http://www.tux.org/lkml/