Re: [PATCH] FIXUP: MIPS: fix n64 syscall address calculation

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

 



On Fri, Sep 25, 2015 at 01:39:43PM +0100, Markos Chandras wrote:
> On Fri, Sep 25, 2015 at 05:24:48AM -0700, Paul Burton wrote:
> > On Fri, Sep 25, 2015 at 08:15:06AM +0100, Markos Chandras wrote:
> > > On Thu, Sep 24, 2015 at 08:33:45PM -0700, Paul Burton wrote:
> > > > The patch "MIPS: kernel: scall: Always run the seccomp syscall filters"
> > > > incorrectly calculates the address of the syscall function and instead
> > > > attempts a load from the offset of the syscall being invoked into the
> > > > table. This completely trashes all n64 userland syscalls. Fix the
> > > > address calculation.
> > > > 
> > > > Signed-off-by: Paul Burton <paul.burton@xxxxxxxxxx>
> > > > Cc: Markos Chandras <markos.chandras@xxxxxxxxxx>
> > > > ---
> > > > Markos: could you please test all 3 ABIs you modified? The n64 one at
> > > >         least has clearly not been tested.
> > > > ---
> > > 
> > > Calm down. it was an honest mistake. The version I sent was slighly different to
> > > what I had in my tree and that's why the tests were passing for me. I will send it
> > > again.
> > > 
> > > -- 
> > > markos
> > 
> > I'm quite calm, simply stating facts & asking you to fix your patch.
> > Please don't presume to know my state of mind in lieu of a very strong
> > indicator!
> > 
> > Thanks for submitting v2, though from your description I presume it's
> > just v1 plus this fixup, correct?
> > 
> > Paul
> 
> There is a changelog in v2 as well.
> 
> -- 
> markos

Yes, and it simply reads "Fix offset calculation for n64", which I
interpret as a slightly less accurately described version of this fixup.
Diffing your 2 patches shows that this one line is all that changed,
to a form equivalent to this patch, which answers my question:

 +      dsll    t0, t2, 3               # offset into table
 +      dla     t2, sys_call_table
-+      daddu   t2, t0
++      daddu   t0, t2, t0
 +      ld      t2, (t0)                # syscall routine
 +      beqz    t2, illegal_syscall

Thanks,
    Paul




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux