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]
Message-ID: <CAMArcTV4Go2axa9EiKARcnEatoJ_RfM2-_CN=R3rKoUTEfjJ2A@mail.gmail.com>
Date: Fri, 18 Apr 2025 19:46:22 +0900
From: Taehee Yoo <ap420073@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Stanislav Fomichev <stfomichev@...il.com>, Mina Almasry <almasrymina@...gle.com>, davem@...emloft.net, 
	pabeni@...hat.com, edumazet@...gle.com, andrew+netdev@...n.ch, 
	horms@...nel.org, asml.silence@...il.com, dw@...idwei.uk, sdf@...ichev.me, 
	skhawaja@...gle.com, simona.vetter@...ll.ch, kaiyuanz@...gle.com, 
	netdev@...r.kernel.org
Subject: Re: [PATCH net] net: devmem: fix kernel panic when socket close after
 module unload

On Thu, Apr 17, 2025 at 11:09 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu, 17 Apr 2025 15:57:47 +0900 Taehee Yoo wrote:
> > Thanks Mina for the suggestion!
> > What I would like to do is like that
> > If binding->dev is NULL, it skips locking, but it still keeps calling
> > net_devmem_unbind_dmabuf().
>
> note that the current code in net_devmem_unbind_dmabuf() is also not
> safe against double removal from the socket list.

Okay, I will look into this too.

>
> > Calling net_devmem_unbind_dmabuf() is safe even if after module unload,
> > because binding->bound_rxq is deleted by the uninstall path.
> > If bound_rxq is empty, binding->dev will not be accessed.
> > The only uninstall side code change is to set binding->dev to NULL and
> > add priv->lock.
> > This approach was already suggested by Stanislav earlier in this thread.
>
> > Mina, Stanislav, and Jakub, can you confirm this?
>
> Maybe just send the code, even if it's not perfect. It's a bit hard
> to track all the suggested changes :)

Thanks! I will send a patch soon.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ