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 Fri, Mar 27, 2020 at 08:05:13AM +0100, wrote:
> On Thu, Mar 26, 2020 at 06:22:47PM -0700, Chris Hanson wrote:
> > 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!
> Wouldn't the right thing to do to do the equivalent
> target = input > MAXINT_32bit ? MAXINT_32bit : target

Depends on what you query. Filesystem statistics shouldn't be a problem
to clamp.

File sizes on the other hand. It's probably better to fail stat() calls for
large files. lseek() would also need to handle large files, but I don't know
how the NFS server could influence it. I guess you can only fail read() and
write() when you pass the 32bit limit.

                                Michael van Elst
                                "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index