NetBSD-Bugs archive

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

lib/59978: bootx64 cannot lookup files over nfsv3



>Number:         59978
>Category:       lib
>Synopsis:       bootx64 cannot lookup files over nfsv3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 08 01:50:00 +0000 2026
>Originator:     Aran Clauson
>Release:        10.1, pkgin
>Organization:
Personal
>Environment:
NetBSD owl.100acres.us 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
I am net-booting UEFI from a diskless amd64 system.  It gets bootx64.efi from tftp.  It finds and loads boot.cfg and the kernel over NFSv3, but fails to find /stand/amd64/10.1/nfs/nfs.kmod.  From tcpdump, it does an nfs_lookup on /stand, which succeeds, but bootx64 incorrectly says that it isn't a directory.  This is because of the variable length file handle.  

The patch below shifts the file attributes into the correct location. 
>How-To-Repeat:
Net boot amd64, NFSv3 from UEFI.  
>Fix:
RCS file: /cvsroot/src/sys/lib/libsa/nfs.c,v
retrieving revision 1.50.24.1
diff -c -r1.50.24.1 nfs.c
*** nfs.c       20 Sep 2024 11:31:32 -0000      1.50.24.1
--- nfs.c       8 Feb 2026 01:36:05 -0000
***************
*** 328,333 ****
--- 328,335 ----
                }
  
                setfh(newfd, replv3->fh);
+               alen = fhstore(d->version, replv3->fh);
+               memmove(&(replv3->fa),  replv3->fh + alen + 4, sizeof(replv3->fa));
  
                if (replv3->fattrflag) {
                        (void)memcpy(&newfd->u_fa.v3, &replv3->fa,



Home | Main Index | Thread Index | Old Index