linux-origin
[Top] [All Lists]

Re: sys32_newstat() and friends

To: Kanoj Sarcar <kanoj@xxxxxxxxxxxxxxxxxxx>
Subject: Re: sys32_newstat() and friends
From: Ralf Baechle <ralf@xxxxxxxxxxx>
Date: Fri, 7 Jul 2000 03:32:43 +0200
Cc: linux-origin@xxxxxxxxxxx
In-reply-to: <200007070111.SAA25994@google.engr.sgi.com>; from kanoj@google.engr.sgi.com on Thu, Jul 06, 2000 at 06:11:45PM -0700
References: <20000707012436.A2303@bacchus.dhis.org> <200007070111.SAA25994@google.engr.sgi.com>
Sender: owner-linux-origin@xxxxxxxxxxx
On Thu, Jul 06, 2000 at 06:11:45PM -0700, Kanoj Sarcar wrote:

> > Crash - there are some hardware registers which don't like to be read.
> > Point the filename argument to one of those and poof, game over.  For now
> > some pointer to non-decoded address space should do, you get a DBE
> > exception, game over.
> > 
> 
> The right way to fix this is to fix the fault handlers to give SIGSEGV
> to the process incurring the DBE, and move on.

If you get a DBE.  Pick the right hardware register and it'll freeze your
system.  Doesn't seem to happen easily on the Origin but frequently on
less nice hardware.

> If the architecture is such that receovery from a DBE is not possible,
> yes, then all the arch specific code must validate user input. For
> sys32_newstat, that would mean copying the user string into a temporary
> kernel buffer, then setting the set_fs() before invoking sys_newstat()
> and pointing it to the temporary kernel buffer.

I fixed the other code which probably copied from Sparc64.  This one
won't copy filenames multiple times around.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>