Re: Capabilities done right [diff against 2.3.1]

Simon Richter (geier@phobos.fachschaften.tu-muenchen.de)
Tue, 25 May 1999 18:39:16 +0200 (CEST)


-----BEGIN PGP SIGNED MESSAGE-----

On Tue, 25 May 1999, Fred Reimer wrote:

[-EACCES, -ECAP or SIGCAP]

> Why not both? Why not return the syscall with failure (and appropriate
> error code) AND send a signal. Signals are supposed to be async right? The
> signal handler, for those cap aware future apps, could flip a flag that they
> program can check after getting the failed syscall for more capability
> specific information. Is this not doable? Or is it, just not desirable?

Returning -EPERM and sending SIGCAP (non-fatal signal) has the
disadvantage that the program cannot tell at the time the syscall returns
what has happened, because signals are asynchronous.

I see three options:

return -ECAP: disadvantage: Non-aware apps wouldn't know about this error
and assume wild things (or even break). advantage: Aware apps could know
what happened without too much overhead.

return -EACCES: advantage: Old apps know what happened. Disadvantage: New
apps are unsure.

send SIGCAP: advantage: ? disadvantage: Causes strange things if not
properly caught.

Simon

PGP public key available from ftp://phobos.fs.tum.de/pub/pgp/geier.asc
Fingerprint: 10 62 F6 F5 C0 5D 9E D8 47 05 1B 8A 22 E5 4E C1
GEEK code block available from ftp://phobos.fs.tum.de/pub/gcb/geier.asc
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQEVAwUBN0rSSfFUmCYJPaUlAQE9EAf+NJWZ3v002iw04yYBoJSUqMUvcye/N16m
+TIZCzmw2Qodo3i5DLh02m3N9Q+XmfBfZ6C0G1OVC+ZQx4qXP7TXQhHhbSi/2az7
cbnmbbKTP6vRRWLZCC5CzCtj30yUvn0+zYvEj4Tss1n8SUmqgJ6rhB6YJrjHOsu9
UEQe56NS70btEWmR8uHXlacNKIajykfaa11OEeJRGRm4cT7iZvXi0iT5QS7UGxWN
Fu+hVOXdV4nJPZNznGFQDWoDssZi66UGkjJHfEsBuF9G8d7g++ysHW2bODlAmm58
MMUreWf9yxyjlhj78VFXOWvIiFzMnfmBvD93WbrBdcjOQSOvzobh1g==
=WZ6c
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/