2006-08-07 10:45:23

by Pekka Enberg

[permalink] [raw]
Subject: Re: [RFC/PATCH] revoke/frevoke system calls

Hi,

Edgar Toernig writes:
> > Urgs, so any user may remove mappings from another process and
> > let it crash?

On 7/22/06, Albert Cahalan <[email protected]> wrote:
> Two good solutions come to mind:
>
> a. substitute the zero page
> b. make the mapping private and touch it as if C-O-W happened

Actually, I think revokeat() and frevoke() should be consistent with
mmap which will make a process go SIGBUS if it attempts to write to
truncated shared mapping.

Pekka


2006-08-07 15:19:53

by Albert Cahalan

[permalink] [raw]
Subject: Re: [RFC/PATCH] revoke/frevoke system calls

On 8/7/06, Pekka Enberg <[email protected]> wrote:
> [Albert Cahalan]
>> Edgar Toernig writes:

> > > Urgs, so any user may remove mappings from another process and
> > > let it crash?
> > Two good solutions come to mind:
> >
> > a. substitute the zero page
> > b. make the mapping private and touch it as if C-O-W happened
>
> Actually, I think revokeat() and frevoke() should be consistent with
> mmap which will make a process go SIGBUS if it attempts to write to
> truncated shared mapping.

You're right. Apps must already be tolerant of SIGBUS.
There is thus no additional risk.