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:   Tue, 24 May 2022 19:43:44 +0800
From:   Tony Lu <tonylu@...ux.alibaba.com>
To:     liuyacan@...p.netease.com
Cc:     kgraul@...ux.ibm.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, linux-kernel@...r.kernel.org,
        linux-s390@...r.kernel.org, netdev@...r.kernel.org,
        pabeni@...hat.com, ubraun@...ux.ibm.com
Subject: Re: [PATCH v2 net] net/smc: postpone sk_refcnt increment in connect()

On Mon, May 23, 2022 at 11:21:19PM +0800, liuyacan@...p.netease.com wrote:
> > >> This is a rather unusual problem that can come up when fallback=true BEFORE smc_connect()
> > >> is called. But nevertheless, it is a problem.
> > >>
> > >> Right now I am not sure if it is okay when we NOT hold a ref to smc->sk during all fallback
> > >> processing. This change also conflicts with a patch that is already on net-next (3aba1030).
> > > 
> > > Do you mean put the ref to smc->sk during all fallback processing unconditionally and remove 
> > > the fallback branch sock_put() in __smc_release()?
> > 
> > What I had in mind was to eventually call sock_put() in __smc_release() even if sk->sk_state == SMC_INIT
> > (currently the extra check in the if() for sk->sk_state != SMC_INIT prevents the sock_put()), but only
> > when it is sure that we actually reached the sock_hold() in smc_connect() before.
> > 
> > But maybe we find out that the sock_hold() is not needed for fallback sockets, I don't know...
> 
> I do think the sock_hold()/sock_put() for smc->sk is a bit complicated, Emm, I'm not sure if it 
> can be simplified..
> 
> In fact, I'm sure there must be another ref count issue in my environment,but I haven't caught it yet.

I am wondering the issue of this ref count. If it is convenient, would
you like to provide some more details?

syzkaller has reported some issues about ref count, but syzkaller and
others' bot don't have RDMA devices, they cannot cover most of the code
routines in SMC. We are working on it to provide SMC fuzz test with RDMA
environment. So it's very nice to have real world issues.

Thanks,
Tony Lu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ