Re: How to develop a random number generation device
- From: Nobody <nobody@xxxxxxxxxxx>
- Date: Tue, 18 Sep 2007 10:48:13 +0100
On Mon, 17 Sep 2007 23:30:32 +0000, Vladimir Vassilevsky wrote:
I'm not talking about process isolation. I'm talking about the ability to
make a program behave other than how its author intended by overrunning a
a buffer (e.g. by making some portion of its input larger than the buffer
in which it will be stored).
It is possible to declare every data object in a program as a separate
segment. That is what LDT was intended for. Of course, there will be a
lot of overhead and the compatibility issues, too.
One problem with that is that you're limited to 8192 segments per process.
In theory, you could use segments only for "active" objects, and have
something like the Local{Lock,Unlock} of 8086-mode Windows. But apart from
producing really ugly code (and adding overhead), it only helps to the
extent that the code chooses to make use of it.
Some code can use a lot of arrays, e.g. an array of structures, each of
which contains an array of characters. Chances are that the programmer
will use a segment for the larger array and leave the character arrays as
just a range of bytes within the segment.
If you can accept mechanisms which impose significant constraints on
coding, you may as well just forbid the use of arrays in favour of an
opaque "vector" type whose accessor methods/functions perform bounds
checking.
Both methods work just as well (i.e. they work if you use them, and don't
work if you don't use them), but the OS-level option adds a lot more
overhead.
The realistic approach to eliminating buffer overruns is not to write word
processors and web browsers in a language which was designed for writing
an OS kernel and device drivers. If arrays are a distinct type, having
both a start and end (to allow bounds checking), and pointer arithmetic is
impossible (or at least not actively encouraged), buffer overruns would be
an obscure theoretical issue rather than an everyday occurrence.
.
- References:
- Re: How to develop a random number generation device
- From: krw
- Re: How to develop a random number generation device
- From: MooseFET
- Re: How to develop a random number generation device
- From: Nobody
- Re: How to develop a random number generation device
- From: krw
- Re: How to develop a random number generation device
- From: Nobody
- Re: How to develop a random number generation device
- From: krw
- Re: How to develop a random number generation device
- From: Nobody
- Re: How to develop a random number generation device
- From: MooseFET
- Re: How to develop a random number generation device
- From: Nobody
- Re: How to develop a random number generation device
- From: John Larkin
- Re: How to develop a random number generation device
- From: Nobody
- Re: How to develop a random number generation device
- From: Vladimir Vassilevsky
- Re: How to develop a random number generation device
- Prev by Date: Re: Measuring current in phone lines
- Next by Date: OT 11:44 a.m. on Sept. 19, 1982
- Previous by thread: Re: How to develop a random number generation device
- Next by thread: Re: How to develop a random number generation device
- Index(es):
Relevant Pages
|