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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 7 Jun 2023 14:13:20 +0300
From:   Askar Safin <safinaskar@...il.com>
To:     Miklos Szeredi <miklos@...redi.hu>
Cc:     Luis Chamberlain <mcgrof@...nel.org>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bernd Schubert <bernd.schubert@...tmail.fm>,
        linux-pm@...r.kernel.org,
        fuse-devel <fuse-devel@...ts.sourceforge.net>
Subject: Re: [PATCH 0/6] vfs: provide automatic kernel freeze / resume

I found a workaround for sshfs+suspend problem!

On Tue, Jun 6, 2023 at 5:38 PM Miklos Szeredi <miklos@...redi.hu> wrote:
> Issues remaining:
>
>  - if requests are stuck (e.g. network is down) then the requester
> process can't be frozen and suspend will still fail.

> Solution to both these are probably non-kernel: impacted servers need
> to receive notification from systemd when suspend is starting and act
> accordingly.

Okay, so you said that the only way to solve the problem "network is
down" is to fix the problem at the sshfs side. Unfortunately, sshfs
project was closed ( https://github.com/libfuse/sshfs ). So the only
remaining option is to use some hack. And I found such a hack!

I simply added "-o ServerAliveInterval=10" to sshfs command. This will
cause ssh process exit if remote side is unreachable. Thus the bug is
prevented. I tested the fix and it works.

But this will mean that ssh process will exit in such situation, and
thus sshfs process will exit, too. If this is not what you want, then
also add "-o reconnect" option, this will restart connection if ssh
dies. So the final command will look like this:

sshfs -o reconnect,ServerAliveInterval=10 ...

This finally solved the problem for me.

But one issue still remains: if the network goes down and then you
immediately try to access sshfs filesystem and then you will try to
suspend (and ssh doesn't yet noticed that the network gone down), then
suspend will still fail. (I tested this situation, the suspend
actually fails.) But I don't think I even will reach such situation.
The lesser ServerAliveInterval you will set, the lower is probability
that you will reach such situation

-- 
Askar Safin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ