2002-10-15 22:44:51

by Dave McCracken

[permalink] [raw]
Subject: [PATCH 2.5.42-mm3] Fix mremap for shared page tables


Hugh Dickens was right. mremap was broken wrt shared page tables. Here's
the fix.

Dave McCracken

======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
[email protected] T/L 678-3059


Attachments:
(No filename) (315.00 B)
shpte-2.5.42-mm3-3.diff (2.63 kB)
Download all attachments

2002-10-16 15:01:35

by Hugh Dickins

[permalink] [raw]
Subject: Re: [PATCH 2.5.42-mm3] Fix mremap for shared page tables

On Tue, 15 Oct 2002, Dave McCracken wrote:
>
> Hugh Dickens was right. mremap was broken wrt shared page tables.
i

Sorry, Dave, I only mentioned mremap as one _example_. You have
changed the locking rules for ptes in page tables in two or three
sources, but there's a number more which need to be updated too.

Please don't ask me to list which, it's a matter of looking at all
the uses of ->page_table_lock and whether those places need to be
changed to fit the new locking scheme - some of the uses are quite
irrelevant, some may be obscure, some may be historic, some must
be changed.

I wouldn't mind if it was just broken wrt shared page tables,
CONFIG_SHAREPTE is easily made experimental. But the locking rules
have (rightly) been changed in all cases, so -mm tree is now unsafe.
A stopgap measure might be to hold on to page_table_lock for as
long as before, then fix sources up piecemeal - but that approach
would still leave CONFIG_SHAREPTE y broken for a while.

Let me say again, that I have _not_ actually observed any problem
yet: we're talking about races and correctness, I don't mean to be
alarmist.

Hugh