lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba4f9f5d-0688-4537-b721-7b2bda8ead8c@windriver.com>
Date: Fri, 23 May 2025 17:00:40 +0800
From: "Yan, Haixiao (CN)" <haixiao.yan.cn@...driver.com>
To: NeilBrown <neil@...wn.name>
Cc: chuck.lever@...cle.com, stable@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: nfs mount failed with ipv6 addr


On 5/23/2025 3:42 PM, NeilBrown wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Fri, 23 May 2025, Yan, Haixiao (CN) wrote:
>> On 5/23/2025 7:21 AM, NeilBrown wrote:
>>> CAUTION: This email comes from a non Wind River email account!
>>> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>>>
>>> On Thu, 22 May 2025, Haixiao Yan wrote:
>>>> On 2025/5/22 07:32, NeilBrown wrote:
>>>>> CAUTION: This email comes from a non Wind River email account!
>>>>> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>>>>>
>>>>> On Thu, 22 May 2025, Yan, Haixiao (CN) wrote:
>>>>>> On linux-5.10.y, my testcase run failed:
>>>>>>
>>>>>> root@...el-x86-64:/opt/wr-test/testcases/userspace/nfs-utils_v6# mount -t nfs [::1]:/mnt/nfs_root /mnt/v6 -o nfsvers=3
>>>>>> mount.nfs: requested NFS version or transport protocol is not supported
>>>>>>
>>>>>> The first bad commit is:
>>>>>>
>>>>>> commit 7229200f68662660bb4d55f19247eaf3c79a4217
>>>>>> Author: Chuck Lever <chuck.lever@...cle.com>
>>>>>> Date:   Mon Jun 3 10:35:02 2024 -0400
>>>>>>
>>>>>>       nfsd: don't allow nfsd threads to be signalled.
>>>>>>
>>>>>>       [ Upstream commit 3903902401451b1cd9d797a8c79769eb26ac7fe5 ]
>>>>>>
>>>>>>
>>>>>> Here is the test log:
>>>>>>
>>>>>> root@...el-x86-64:/opt/wr-test/testcases/userspace/nfs-utils_v6# dd if=/dev/zero of=/tmp/nfs.img bs=1M count=100
>>>>>> 100+0 records in
>>>>>> 100+0 records out
>>>>>> 104857600 bytes (105 MB, 100 MiB) copied, 0.0386658 s, 2.7 GB/s
>>>>>> root@...el-x86-64:/opt/wr-test/testcases/userspace/nfs-utils_v6# mkfs /tmp/nfs.img
>>>>>> mke2fs 1.46.1 (9-Feb-2021)
>>>>>> Discarding device blocks:   1024/102400.............             .............done
>>>>>> Creating filesystem with 102400 1k blocks and 25688 inodes
>>>>>> Filesystem UUID: 77e3bc56-46bb-4e5c-9619-d9a0c0999958
>>>>>> Superblock backups stored on blocks:
>>>>>>          8193, 24577, 40961, 57345, 73729
>>>>>>
>>>>>> Allocating group tables:  0/13.....     .....done
>>>>>> Writing inode tables:  0/13.....     .....done
>>>>>> Writing superblocks and filesystem accounting information:  0/13.....     .....done
>>>>>> root@...el-x86-64:/opt/wr-test/testcases/userspace/nfs-utils_v6# mount /tmp/nfs.img /mnt
>>>>>>
>>>>>> root@...el-x86-64:/opt/wr-test/testcases/userspace/nfs-utils_v6# mkdir /mnt/nfs_root
>>>>>>
>>>>>> root@...el-x86-64:/opt/wr-test/testcases/userspace/nfs-utils_v6# touch /etc/exports
>>>>>>
>>>>>> root@...el-x86-64:/opt/wr-test/testcases/userspace/nfs-utils_v6# echo '/mnt/nfs_root *(insecure,rw,async,no_root_squash)' >> /etc/exports
>>>>>>
>>>>>> root@...el-x86-64:/opt/wr-test/testcases/userspace/nfs-utils_v6# /opt/wr-test/bin/svcwp.sh nfsserver restart
>>>>>> stopping mountd: done
>>>>>> stopping nfsd: ..........failed
>>>>>>      using signal 9:
>>>>>> ..........failed
>>>>> What does your "nfsserver" script do to try to stop/restart the nfsd?
>>>>> For a very long time the approved way to stop nfsd has been to run
>>>>> "rpc.nfsd 0".  My guess is that whatever script you are using still
>>>>> trying to send a signal to nfsd.  That no longer works.
>>>>>
>>>>> Unfortunately the various sysv-init scripts for starting/stopping nfsd
>>>>> have never been part of nfs-utils so we were not able to update them.
>>>>> nfs-utils *does* contain systemd unit files for sites which use systemd.
>>>>>
>>>>> If you have a non-systemd way of starting/stopping nfsd, we would be
>>>>> happy to make the relevant scripts part of nfs-utils so that we can
>>>>> ensure they stay up to date.
>>>> Actually, we use  service nfsserver restart  =>
>>>> /etc/init.d/nfsserver =>
>>>>
>>>> stop_nfsd(){
>>>>        # WARNING: this kills any process with the executable
>>>>        # name 'nfsd'.
>>>>        echo -n 'stopping nfsd: '
>>>>        start-stop-daemon --stop --quiet --signal 1 --name nfsd
>>>>        if delay_nfsd || {
>>>>            echo failed
>>>>            echo ' using signal 9: '
>>>>            start-stop-daemon --stop --quiet --signal 9 --name nfsd
>>>>            delay_nfsd
>>>>        }
>>>>        then
>>>>            echo done
>>>>        else
>>>>            echo failed
>>>>        fi
>>> The above should all be changed to
>>>      echo -n 'stopping nfsd: '
>>>      rpc.nfsd 0
>>>      echo done
>>>
>>> or similar.  What distro are you using?
>>>
>>> I can't see how this would affect your problem with IPv6 but it would be
>>> nice if you could confirm that IPv6 still doesn't work even after
>>> changing the above.
>>> What version of nfs-utils are you using?
>>> Are you should that the kernel has IPv6 enabled?  Does "ping6 ::1" work?
>>>
>>> NeilBrown
>>>
>> It works as expected.
>>
>> My distro is Yocto and nfs-utils 2.5.3.
> Thanks.  I've sent a patch to openembedded to change the nfsserver
> script.
>
> Can you make the change to nfsserver and let me know if it fixes your
> problem?

What's the version of your nfs-utils?

The patch failed to apply.

$ git am '[PATCH OE-core] nfs-utils don'\''t use signals to shut down 
nfs server. - '\''NeilBrown '\'' (neil@...wn.name) - 2025-05-23 
1541.eml' Applying: nfs-utils: don't use signals to shut down nfs 
server. error: patch failed: 
meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver:89 error: 
meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver: patch does not 
apply Patch failed at 0001 nfs-utils: don't use signals to shut down nfs 
server. hint: Use 'git am --show-current-patch=diff' to see the failed 
patch When you have resolved this problem, run "git am --continue". If 
you prefer to skip this patch, run "git am --skip" instead. To restore 
the original branch and stop patching, run "git am --abort".

Thanks,

Haixiao

>
> Thanks,
> NeilBrown

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ