[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <787b0d920607220105l21251402nc98381edbc27a0c5@mail.gmail.com>
Date: Sat, 22 Jul 2006 04:05:19 -0400
From: "Albert Cahalan" <acahalan@...il.com>
To: froese@....de, B.Steinbrink@....de, hurtta+gmane@...lo.fmi.fi,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [RFC/PATCH] revoke/frevoke system calls
Edgar Toernig writes:
> Bjvrn Steinbrink wrote:
>> In do_revoke() there is:
>>
>> + if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER)) {
>> + ret = -EPERM;
>> + goto out;
>>
>> That pretty much matches what the BSD manpage says.
>
> 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
Other concerns:
Optionally excluding the current UID/TGID/TID would be good.
(some flags) A revokeat() call seems to be required. Be sure
to handle working directories. The controlling tty is special.
Flag processes with revoked ttys in /proc/*/stat please, so
that ps can report it properly without opening another file.
BTW, it is wonderful to see this happening.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists