Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/pmax/stand/common



On Thu Nov 25 2010 at 23:39:03 +0900, Izumi Tsutsui wrote:
> > One remaining problem (which was debugged by Alessandro Forin) is that
> > the post-mips64 brk/sbrk syscall stubs depend on "syscall" retaining t0,
> > and the kernel doesn't do that.  I have this in my local tree and it makes
> > a mips1 platform boot with new userland.  See if it helps on pmax too:
> > 
> > --- locore_mips1.S      8 Nov 2010 18:09:38 -0000       1.68
> > +++ locore_mips1.S      25 Nov 2010 14:15:39 -0000
> > @@ -418,7 +418,7 @@ NESTED_NOPROFILE(mips1_SystemCall, CALLF
> >         sw      a3, FRAME_A3(k1)
> >         lw      a0, CPUVAR(CURLWP)              # 1st arg is curlwp
> >         mfhi    v1
> > -       #sw     t0, FRAME_T0(k1)                # no need to save temp regs
> > +       sw      t0, FRAME_T0(k1)                # no need to save temp regs
> 
> Yeah, it works with 201011170000Z snapshot binaries. Thanks.

cool

> But should we rather fix syscall stubs?

That was debated a little but undecided.

Pros for kernel:
* debugging (low-level) over syscall trap doesn't cause debugger
  confusion
* random kernel info not leaked to userland
(+ IMHO "principle of least surprise")

Pros for syscall stub:
* faster (but nobody measured it, and most likely the difference is lost
  in the noise)

I don't have a strong prefence for either.  The reason I have it that way
is because for some reason when testing I forgot to fix my tree before
starting a build and when I remembered the build was already past libc,
so I figured I might as well fix the kernel ;)


Home | Main Index | Thread Index | Old Index