tech-net archive

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

Re: Subtle NFS incompatibility with SunOS 4.1.1 on 68K



On Mar 25, 2020, at 9:14 AM, David Brownlee <abs%absd.org@localhost> wrote:
>> 
>> I think I've found the spot in the code where this lives, this would be in nfsrv_statfs() sys/nfs/nfs_serv.c, correct? Where it sets sfp->sf_* to a bunch of txdr_unsigned() without clamping them?
> 
> There are probably more - I suspect
> https://nxr.netbsd.org/xref/src/sys/nfs/nfs_subs.c#1697 is going to be
> needed for file sizes.

I just masked the input to txdr_unsigned() to 0x7fffffff before assigning it to sfp->sf_*; did a build of tools, kernel=RPI2 and distribution; and put the new kernel and nfsserver.kmod in place. Now I can compile & assemble from my Sun!

The Raspberry Pi 3B+ has been plenty fast at rebuilding everything. After all, even the original Raspberry Pi is *way* faster than a stock SPARCstation 20. ;)

> I think it would be good to fix - if we have the nfsv2 code then it
> should do something better in this case :) As Jason says saturating
> the value would be better than the current behaviour.
> 
> I'm happy enough to have a poke at it if no-one else is interested :)

Unfortunately I can't share my actual code without jumping through some bureaucratic hoops, but hopefully knowing that this works is sufficient for someone to put a more complete fix than my quick hack into mainline. :)

  -- Chris




Home | Main Index | Thread Index | Old Index