That is however not trivial, there is a problem with the si_addr field
in the siginfo_t struct. The do_page_fault function in
arch/i386/mm/fault.c will fill this field in such a struct with the
local variable address. But that only happens if the trap comes from
usermode, in this case the trap comes from kernelmode. That means that
do_page_fault just finds the fixup address and returns loosing the
value of the local variable address.
How can I pass that variable back from do_page_fault to
handle_vm86_fault? There might also be a problem with the si_code
field, I'm not sure exactly from where I should get that value.
Perhaps it will turn out to be some known constant.
Would it be safe to fill the address in tsk->thread.cr2 like the
-- Kasper Dupont -- der bruger for meget tid på usenet. For sending spam use mailto:email@example.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/