Fetching a value of control registers from user space

Josip Gracin (grac@fly.cc.fer.hr)
04 Jan 1999 00:26:40 +0100


Hi!

When I try to use the following program I get a SEGV fault. Why is this?
I thought reading a value from control registers isn't supposed to
generate an exception.

int
main ()
{
unsigned long fa;
asm ("movl %%cr2, %0": "=r" (fa));

return 0;
}

Thanks in advance.

P.S. I suppose this is not actually the right list to ask this but I
couldn't think of a better one.

-- 
| Josip Gracin
| Zagreb, Croatia

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/