Messages in this thread | | | Date | Tue, 29 Jul 1997 16:42:58 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: i386 WP bit problems |
| |
On Tue, 29 Jul 1997, Colin Plumb wrote: > > But now, a question: > > It seems to me that this can't be a problem because there is no "time" > for another thread to do anything between the check and the write. > There are not multiprocessor 386's, and once in the kernel, there > is no preemption except on explicit calls to schedule() (or > sleep_on() or whatever eventually calls schedule()). And I think > most places in the kernel don't do that between the check and the write. > > So where is the problem?
Quite a lot of places sleep in between the check and the write. It makes many things much easier (the check could be done just _once_ in the generic "write()" system call, and not in all the subcalls), but it opens the window when we thread (this didn't use to be an issue, because we didn't have threads in the original Linux/i386).
These days, my standpoint is that I refuse to make the kernel more complex or slower on sane systems just because intel made a major design mistake in the original i386.
But yes, it _could_ be fixed (for UP, and nobody does SMP on 386's and stays sane for very long) but I don't have the incentive to fix it (and I have lots of nice machines that are incentives to _not_ fix it).
Linus
| |