Re: [PATCH] ppc64: Fix possible race with set_pte on a present PTE

Linus Torvalds
2004-05-25T04:39:05Z

On Tue, 25 May 2004, Andrea Arcangeli wrote:

> On Mon, May 24, 2004 at 09:00:02PM -0700, Linus Torvalds wrote:
> >
> >
> > On Tue, 25 May 2004, Andrea Arcangeli wrote:
> > >
> > > The below patch should fix it, the only problem is that it can screwup
> > > some arch that might use page-faults to keep track of the accessed bit,
> >
> > Indeed. At least alpha does this - that's where this code came from. SO
> > this will cause infinite page faults on alpha and any other "accessed bit
> > in software" architectures.
>
> as you say the alpha has no accessed bit at all in hardware, so
> it cannot generate page faults.

It _does_ generate page faults.

We do the accessed bit by clearing the "user readable" thing (or
something. I forget the exact details, and I'm too lazy to check it out).
And a page won't be _really_ readable until it has been marked young.

If you don't mark it young, you'll get infinite page faults.

That's how we do the accessed bit.

> "accessed bit in software" is fine with my fix.

NO IT IS NOT.

Linus