Re: How to develop a random number generation device
- From: Nobody <nobody@xxxxxxxxxxx>
- Date: Sat, 15 Sep 2007 04:52:54 +0100
On Fri, 14 Sep 2007 11:47:32 -0700, John Larkin wrote:
Nothing the OS does can prevent machine code from overrunning a
buffer.
Absolute nonsense. Perhaps buffer overruns can't be prevented
using C++, but they *can* be prevented.
Not by the *OS*.
Sure it can. Not in Windows and not with C++, perhaps. An OS can
surely make it impossible to write safe code and a real OS is required
to make safe code possible.
That doesn't address the issue, which was whether the OS can prevent
buffer overruns.
I can't prevent them, but it could and should trap them and abort the
offending task, with no possibility of subsequent damage.
Under a decent OS, bad code should only hurt itself.
I don't think you understand what a buffer overrun is. FWIW, it isn't
related to process isolation (preventing one process from trashing another
process' memory). That's a non-issue with modern OSes and modern CPUs (for
x86, that means 80286 and later).
A buffer overrun is where a process trashes its own memory. The memory
which is written is supposed to be written by that process, but the wrong
part of the program writes the wrong data to it (e.g. writing a portion of
a string to memory which is supposed to hold an integer or pointer).
The reason why the OS cannot do anything about this is because it lacks
the detailed knowledge regarding which portions of memory are used for
what purpose. That information is normally discarded during compilation
(unless you compile with debug information). By the time you get to
running a binary executable, you're at a level of "code writes data",
with no details about which parts of memory belong to specific variables.
.
- Follow-Ups:
- Re: How to develop a random number generation device
- From: JosephKK
- Re: How to develop a random number generation device
- From: Rich Grise
- Re: How to develop a random number generation device
- From: MooseFET
- Re: How to develop a random number generation device
- From: John Larkin
- Re: How to develop a random number generation device
- References:
- Re: How to develop a random number generation device
- From: John Devereux
- Re: How to develop a random number generation device
- From: MooseFET
- Re: How to develop a random number generation device
- From: John Devereux
- 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: 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: John Larkin
- Re: How to develop a random number generation device
- Prev by Date: Re: How to develop a random number generation device
- Next by Date: Re: How to develop a random number generation device
- 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
|