public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Esthetics (or worse?) of Secure Pointers
@ 2001-04-17 15:00 Chris Lattner
  2001-04-17 15:46 ` Robert Bernecky
                   ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: Chris Lattner @ 2001-04-17 15:00 UTC (permalink / raw)
  To: gcc; +Cc: bernecky

> We discarded the function-level intermixing as too low-level
> and complicated in practice. This left us with larger approaches to
> the problem of intermixing checked and non-checked code:

Another alternative way to implement this (which would allow a single libc
that contains both bounded pointer code and nonbounded pointer code to
exist in the same library), would be to mangle function names, ala
C++.  Of course you could do this really simply by simply prefixing all
functions (C as well) with __BP_ or some such ugly thing.

This isn't a wonderful solution from a cleanliness standpoint, but it
would make it "impossible" to accidentally mismatch code.  It would also
make it possible to have a library with both bounded pointer and
nonbounded pointer code linked into it, which would be nice.

-Chris

http://www.nondot.org/~sabre/os/
http://www.nondot.org/MagicStats/
http://www.nondot.org/~sabre/

^ permalink raw reply	[flat|nested] 36+ messages in thread
* Re: Esthetics (or worse?) of Secure Pointers
@ 2001-04-19  2:22 Jimen Ching
  2001-04-19  6:49 ` Robert Bernecky
  0 siblings, 1 reply; 36+ messages in thread
From: Jimen Ching @ 2001-04-19  2:22 UTC (permalink / raw)
  To: gcc

Robert Bernecky <bernecky at acm dot org> said:
>As computing professionals, we have a responsibility to
>provide provably reliable tools. C without secure pointers
>is not reliable. We (the computing community) are going to
>be forced to move programming from a craft to an engineering
>discipline. Issues of performance and memory use are going
>to be swept aside by the threat of lawsuits.

Why is it that people think software professionals should always look for
silver bullets?

	As professionals, we must use GC to eliminate all memory heap
	problems.

	As professionals, we must use BP to eliminate all buffer overflow
	problems.

Would real professionals look for silver bullets to solve their problems?  
Should we not see each tool for what it is, i.e. just another tool in our
toolbox?

Btw, isn't one of the motto's of the C programming language go something
like--trust the programmer.  Now, if we could do that, then we would have
finally become a professional discipline.

Don't get me wrong, I think BP is a great tool.  But until the overhead is
reduced to less than 3%, I don't think it should be forced on anyone.

--jc
--
Jimen Ching (WH6BRR)      jching@flex.com     wh6brr@uhm.ampr.org

^ permalink raw reply	[flat|nested] 36+ messages in thread
* Esthetics (or worse?) of Secure Pointers
@ 2001-04-17 11:52 Robert Bernecky
  2001-04-17 12:29 ` Geoff Keating
                   ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: Robert Bernecky @ 2001-04-17 11:52 UTC (permalink / raw)
  To: gcc

My apologies for the length of this message...

Thanks to John Gilmore, I'm getting my feet (and other body
parts) wet by picking up Greg McGary's Bounded Pointers work
on GCC, with the goal of improving application security
by preventing programs from violating array/string bounds,
while minimizing performance loss.

There are a few design issues to be dealt with. This message
asks for recommendations on two of them: glibc and bounds-checking
control.

The glibc change is difficult: due to internal changes in
pointer structure, glibc has to be recompiled in toto.
Programs compiled with bounds checking are incompatible
[from a linker/loader standpoint] with existing [non-bounds-chedked]
programs: the function call interface has to change for
pointers.

From a sanity standpoint, we'd like to be able to
intermix bounds-checked and non-bounds-checked functions.
John, Greg, and I discussed possible resolutions to this problem.
John and Greg may wish to correct me on my appreciation of our
discussion, which follows.

We discarded the function-level intermixing as too low-level
and complicated in practice. This left us with larger approaches to
the problem of intermixing checked and non-checked code:

a. Multiple libraries: discarded as too fragile and
   unstable, at least in their current state.

b. Rebuild entire applications with the new library. John's opinion
   is that, at least in Linux, we have complete source
   code availalbe, so building an entirely new distribution
   is reasonable.
   Obviously, non-Linux GCC users may not have this degree
   of control, but come the revolution... Oops, sorry. 8^}

   This is messy, in my view, as it is be possible,
   in practice, to introduce bounds checking into
   a bazllion lines of code and have it all work.
   So, we'd like to have a NudgeWare(tm) solution, in which
   we can migrate applications in a more controlled manner.

c. (Bear with me...) Greg's work controls bounds checking
   by a compiler flag:  --enabled-bounded.
   This means that we use the same glibc for both checked and
   non-checked output.
   John suggested an alternate approach which may work fine,
   but Greg is a bit leery of it, and I don't know enough about
   the issues: Bounds-checked code would be produced by
   introducing a new target architecture. My understanding of
   this us that it would let us have multiple glibcs lying
   around, in a manner that we could control easily.

   One of our concerns here is that this is like using
   a wrench as a hammer.

So, the question boils down to:

	What is the appropriate way to introduce an incompatible
        glibc, preferably in a way that lets it coexist with
        the existing glibc?

Thanks.
Bob


Robert Bernecky                  Snake Island Research Inc.
bernecky@acm.org                 18 Fifth Street, Ward's Island
+1 416 203 0854                  Toronto, Ontario M5J 2B9 Canada
http://www.snakeisland.com


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2001-04-19  6:49 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-17 15:00 Esthetics (or worse?) of Secure Pointers Chris Lattner
2001-04-17 15:46 ` Robert Bernecky
2001-04-17 16:06   ` Chris Lattner
2001-04-17 16:32     ` Robert Bernecky
2001-04-17 17:00       ` Greg McGary
2001-04-17 16:52     ` Greg McGary
2001-04-18 10:00     ` Joern Rennecke
2001-04-17 16:43   ` Greg McGary
2001-04-17 19:20   ` John Gilmore
2001-04-18  9:22     ` Joe Buck
2001-04-18 13:14     ` Toon Moene
2001-04-17 16:36 ` Greg McGary
2001-04-17 17:03   ` Zack Weinberg
2001-04-17 17:28     ` Greg McGary
2001-04-17 17:41       ` Chris Lattner
2001-04-17 18:01         ` Greg McGary
2001-04-17 19:40       ` John Gilmore
2001-04-17 19:46         ` David Edelsohn
2001-04-17 20:01           ` Michael Meissner
2001-04-18 10:03             ` Joern Rennecke
2001-04-18 10:37               ` Robert Bernecky
2001-04-18 11:02                 ` Neil Booth
2001-04-18 11:10                   ` Joern Rennecke
2001-04-19  0:04                 ` Fergus Henderson
2001-04-17 19:59         ` Michael Meissner
2001-04-17 17:56 ` Fergus Henderson
  -- strict thread matches above, loose matches on Subject: below --
2001-04-19  2:22 Jimen Ching
2001-04-19  6:49 ` Robert Bernecky
2001-04-17 11:52 Robert Bernecky
2001-04-17 12:29 ` Geoff Keating
2001-04-17 16:28 ` Greg McGary
2001-04-17 16:41   ` Robert Bernecky
2001-04-17 17:52   ` Joe Buck
2001-04-17 18:07     ` Greg McGary
2001-04-17 18:49       ` Joe Buck
2001-04-19  5:26 ` Per Abrahamsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).