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: <20250721140425.OeD16I4D@linutronix.de>
Date: Mon, 21 Jul 2025 16:04:25 +0200
From: Nam Cao <namcao@...utronix.de>
To: Gabriele Monaco <gmonaco@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] rv: Remove rv_reactor's reference counter

On Mon, Jul 21, 2025 at 03:20:44PM +0200, Gabriele Monaco wrote:
> Mmh, I'm not understanding how, let's assume I create a custom reactor
> as a kernel module and I want to use it on existing models (built in or
> modules themselves), I'd do.
> 
>  insmod myreactor
>  echo myreactor > mymodel/reactors
>  rmmod myreactor
>  ## I want this one to fail because the reactor is in use
> 
>  echo nop > mymodel/reactors
>  rmmod myreactor
>  # now it can succeed
> 
> How is MODULE_SOFTDEP helping in this scenario?
> Am I missing something here?

You are right, MODULE_SOFTDEP does not help this use case.

I did a quick search, it seems try_module_get() and module_put() are what
we need for this. Let me amend the commit message.

But my essential point in this patch is that, the current ref count
implementation does not work. Furthermore, we should use the centralized
kernel module's facilities, not implementing our own custom logic.

Best regards,
Nam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ