linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "William J. Earl" <wje@cthulhu.engr.sgi.com>
To: "Eric W. Biederman" <ebiederm+eric@ccr.net>
Cc: Linux MM <linux-mm@kvack.org>
Subject: Re: page faults
Date: Tue, 26 Oct 1999 11:04:28 -0700 (PDT)	[thread overview]
Message-ID: <14357.60716.436104.461584@liveoak.engr.sgi.com> (raw)
In-Reply-To: <m1ln8qcjcs.fsf@flinx.hidden>

Eric W. Biederman writes:
 > "William J. Earl" <wje@cthulhu.engr.sgi.com> writes:
...
 > >       This of course the neglects the question of whether a broken
 > > user-mode program could damage the hardware, but then a broken
 > > single-threaded user-mode program, with no other programs using the
 > > hardware, could just as easily damage the hardware.  That is, if the
 > > hardware is not safe for direct access in general, threading does not
 > > make it any less safe.
 > 
 > Except on logically ``single thread'' hardware. Which I have heard exists.
 > Where the breakage point is simple writers hitting the harware at the
 > same time.
 > 
 > And since James work seems to have been how to protect the world from
 > broken hardware. . .

       Threading cannot make this more hazardous.  Suppose two threads, A and B,
accessing the hardware concurrently, were each to do a series of instructions
I[i].  Suppose these instructions were interleaved:

       I[0]-A
       I[0]-B
       I[1]-A
       I[1]-B
       I[2]-A
       I[2]-B
       ...

and that this broke the hardware.  Then suppose that, instead, 
thread A simply executed a series of instructions with same effect
on the hardware as the above series of instructions (with thread B
not executing at all).  Then a single thread would damage the hardware.
That is, if some series of user-mode instructions can damage the hardware,
then broken threaded programs (where "broken" includes not adequately
serializing their operations) are no more or less hazardous than
a broken single threaded program.  If you rely on correct user-mode code
(neglecting threading), then you are always at risk of having a broken
application damage the hardware.

 > Also for the sgi hardware the design I believe is with the kernel
 > doing all of the thread/porocess synchronization by mapping/unmapping
 > the hardware.  That technique does not work on linux.

     That is the way IRIX handles the hardware.  It is not trivially
implementable on Linux.  The more important point is that SGI hardware
can be context-switched.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

  parent reply	other threads:[~1999-10-26 18:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-21 16:31 James Simmons
1999-10-21 19:40 ` Benjamin C.R. LaHaise
1999-10-22  0:47   ` Wang Yong
1999-10-22 13:06   ` Stephen C. Tweedie
1999-10-22 14:59     ` James Simmons
1999-10-22 15:15       ` Benjamin C.R. LaHaise
1999-10-22 17:35       ` Stephen C. Tweedie
1999-10-22 23:31         ` James Simmons
1999-10-24 17:15           ` Eric W. Biederman
1999-10-25 17:27             ` William J. Earl
1999-10-26 13:50               ` Marcus Sundberg
1999-10-26 14:00               ` Eric W. Biederman
1999-10-26 15:11                 ` James Simmons
1999-10-26 18:04                 ` William J. Earl [this message]
1999-10-26  9:05             ` Ralf Baechle
1999-10-29 14:52               ` James Simmons
1999-11-01 11:57                 ` Stephen C. Tweedie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14357.60716.436104.461584@liveoak.engr.sgi.com \
    --to=wje@cthulhu.engr.sgi.com \
    --cc=ebiederm+eric@ccr.net \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox