Re: Capabilities done right [diff against 2.3.1]

Jeremy Fitzhardinge (jeremy@goop.org)
Tue, 18 May 1999 11:31:35 -0700 (PDT)


On 18-May-99 Richard Henderson wrote:
> On Mon, May 17, 1999 at 09:53:41AM -0700, Linus Torvalds wrote:
>> With ELF notes, there's not a way in hell I do that without compiling up
>> my own program. That may be acceptable to engineers, but it sure as hell
>> doesn't make sense, and it sure isn't very friendly.
>
> Not to be construed with defending the scheme too much, cause
> I'm not sure I like it, but ...
>
> It is quite possible to write a tool to diddle the notes in an
> existing executable. The PT_NOTE is not a loaded header, and so
> can be put space available anywhere in the image.

Actually, I wrote that program and it works pretty well (see
http://www.goop.org/~jeremy/caps). It is more subtle than you're making out
though. The notes can go anywhere, but you have to expand the PHDR table to
refer to it - and the PHDRs are mapped into the process address space.

I also agree with both of you (Richard & Linus). I think putting the caps into
the ELF header is an interesting hack to experiment with capabilities, but not
the way to go in the long term. That's why I've pushed so hard to keep caps in
an ELF note rather than in some more pervasive ELF format change.

J

-
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/