Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: Carsten Langgaard <carstenl@mips.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: User applications
Date: Mon, 8 Jan 2001 14:25:13 -0200	[thread overview]
Message-ID: <20010108142513.C886@bacchus.dhis.org> (raw)
In-Reply-To: <3A598AFC.83204F56@mips.com>; from carstenl@mips.com on Mon, Jan 08, 2001 at 10:40:12AM +0100

On Mon, Jan 08, 2001 at 10:40:12AM +0100, Carsten Langgaard wrote:

> When a new user process is started will its user space be cleared by the
> kernel or is there a potential leak from an older user process ?

A new process is started by the clone(2) or fork(2) syscalls.  Module the
options that can be passed to clone(2) the two only create an identical copy
of the invoking process, so they're designed to leak information by design ;-)

execve(2) replaces the existing mappings with a new process image loaded
from files plus a newly created stack area.  No old mappings survive, so
there in memory there is no information leak.

> What about the registers values, are they cleared for each new user
> application or will it simply contain the current value it got when the
> user application is started ?

We make no attempt at the integer registers for a new process, so some
information might be leaked in registers.  All the callee saved registers
will be passed unchanged to the child process; the caller saved registers
except those that are used as syscall return values will return random
garbage.  Floating point registers will be cleared with SNANs as soon
as the process is attempting to use a FPU for the first time, that is
we won't leak information via fpu registers.

(Ooops, we're not Orange Book B1 compliant, how sad ;-)

> How can you flush the data and instruction cashes from a user application ?

cacheflush(2).  See man page.

  Ralf

      parent reply	other threads:[~2001-01-08 16:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-08  9:40 User applications Carsten Langgaard
2001-01-08 13:30 ` Michael Shmulevich
2001-01-08 13:52   ` Carsten Langgaard
2001-01-08 14:14   ` Kevin D. Kissell
2001-01-08 14:14     ` Kevin D. Kissell
2001-01-08 14:16     ` Carsten Langgaard
2001-01-08 16:03       ` Ralf Baechle
2001-01-08 15:07     ` Maciej W. Rozycki
2001-01-08 15:21       ` Kevin D. Kissell
2001-01-08 15:21         ` Kevin D. Kissell
2001-01-08 15:40         ` Maciej W. Rozycki
2001-01-08 16:27           ` Ralf Baechle
2001-01-08 16:43             ` Maciej W. Rozycki
2001-01-08 16:41               ` Ralf Baechle
2001-01-08 16:05       ` Ralf Baechle
2001-01-08 16:23         ` Carsten Langgaard
2001-01-08 16:30           ` Ralf Baechle
2001-01-08 16:50             ` Carsten Langgaard
2001-01-08 17:56               ` Maciej W. Rozycki
2001-01-08 16:40           ` Maciej W. Rozycki
2001-01-08 17:42             ` Ralf Baechle
2001-01-08 17:58               ` Maciej W. Rozycki
2001-01-09 11:49                 ` Michael Shmulevich
2001-01-09 12:15                   ` Geert Uytterhoeven
2001-01-09 12:17                   ` Alan Cox
2001-01-09 12:17                     ` Alan Cox
2001-01-09 13:00                   ` Maciej W. Rozycki
2001-01-08 16:34         ` Maciej W. Rozycki
2001-01-08 14:16   ` Maciej W. Rozycki
2001-01-08 16:25 ` Ralf Baechle [this message]

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=20010108142513.C886@bacchus.dhis.org \
    --to=ralf@oss.sgi.com \
    --cc=carstenl@mips.com \
    --cc=linux-mips@oss.sgi.com \
    /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