Re: question for ia32/linux experts

Linus Torvalds (torvalds@transmeta.com)
7 May 1999 07:46:37 GMT


In article <199905070200.TAA88193@google.engr.sgi.com>,
Kanoj Sarcar <kanoj@google.engr.sgi.com> wrote:
>
>I have a question about the RESTORE_ALL macro in
>kern/arch/i386/kernel/entry.S.
>
>The macro seems to imply that the "popl %ds", "popl %es" and
>"iret" might take faults/exceptions. Exactly how can you
>force these conditions in Linux? It seems to me that a user
>program can not just fill in arbitrary values into ds/es
>before a system call (since the processor would check the
>validity of the segment register contents at load time in
>user space), forcing the kernel to take the exception path
>for the popl's.

Look at the signal handling paths - they _do_ allow a user to say "oh,
you need to restart my state from here instead, because I was
interrupted with these segments etc.."

>PS - Any code snippets that trigger these conditions will be
>greatly appreciated ...

Run crashme for several days, and you'll find an amazing amount of
things you didn't believe could ever be done ;)

Random testing is actually a fairly powerful thing,

Linus

-
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/