Re: SMP races in proc with thread_struct

Keith Owens
2001-05-04T23:27:59Z

On 04 May 2001 15:11:37 +0200,
Andreas Schwab <schwab@suse.de> wrote:
>Keith Owens <kaos@ocs.com.au> writes:
>|> Wrap the reference to the parent task structure with exception table
>|> recovery code, like copy_from_user().
>
>Exception tables only protect accesses to user virtual memory. Kernel
>memory references must always be valid in the first place.

Wrong. Exception tables say that if the kernel gets an exception
between labels A and B then branch to fixup label C. See show_regs()
in arch/i386/kernel/process.c and wrmsr_eio() in arch/i386/kernel/msr.c
for examples which do not depend on user virtual memory.