mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD
@ 2024-06-06  6:49 Aditya Garg
  2024-06-08  5:07 ` Christoph Hellwig
  2024-06-14 18:48 ` Lucas De Marchi
  0 siblings, 2 replies; 4+ messages in thread
From: Aditya Garg @ 2024-06-06  6:49 UTC (permalink / raw)
  To: mcgrof, linux-modules, linux-kernel

Hi

I am Aditya Garg. I often require using out of tree drivers to support various hardwares on Linux. Sometimes the provider doesn't write good drivers, and often they have to be force unloaded. It's a common thing in proprietary drivers. I know the author of the driver should take note of the issues, but still the force unloading of the modules does come in handy many times.

Unfortunately if CONFIG_MODULE_FORCE_UNLOAD is not enabled in your kernel, which most probably is not enabled if you are using a Distribution pre compiled kernel, you have to recompile the whole kernel again.

I want wondering if instead of a kernel config option, we could use a kernel parameter to enable/disable this feature, I believe it should act as a better alternative. After all there must be people like me who are forced to recompile the whole linux kernel just for the sake of getting a functionality.

I hope for a reply and suggestions

Regards
Aditya

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD
  2024-06-06  6:49 Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD Aditya Garg
@ 2024-06-08  5:07 ` Christoph Hellwig
  2024-06-14 18:48 ` Lucas De Marchi
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2024-06-08  5:07 UTC (permalink / raw)
  To: Aditya Garg; +Cc: mcgrof, linux-modules, linux-kernel

On Thu, Jun 06, 2024 at 06:49:59AM +0000, Aditya Garg wrote:
> Hi
> 
> I am Aditya Garg. I often require using out of tree drivers to support various hardwares on Linux.

Just stop buying hardwarew that requires this, or improve and upstream
the drivers to make your life easier instead of making other peoples
life worse.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD
  2024-06-06  6:49 Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD Aditya Garg
  2024-06-08  5:07 ` Christoph Hellwig
@ 2024-06-14 18:48 ` Lucas De Marchi
  2024-06-15  4:51   ` Aditya Garg
  1 sibling, 1 reply; 4+ messages in thread
From: Lucas De Marchi @ 2024-06-14 18:48 UTC (permalink / raw)
  To: Aditya Garg; +Cc: mcgrof, linux-modules, linux-kernel

On Thu, Jun 06, 2024 at 06:49:59AM GMT, Aditya Garg wrote:
>Hi
>
>I am Aditya Garg. I often require using out of tree drivers to support various hardwares on Linux. Sometimes the provider doesn't write good drivers, and often they have to be force unloaded. It's a common thing in proprietary drivers. I know the author of the driver should take note of the issues, but still the force unloading of the modules does come in handy many times.
>
>Unfortunately if CONFIG_MODULE_FORCE_UNLOAD is not enabled in your kernel, which most probably is not enabled if you are using a Distribution pre compiled kernel, you have to recompile the whole kernel again.

CONFIG_MODULE_FORCE_UNLOAD only ever makes sense on a developer
environment loading/unloading multiple times his own .ko module. Then
the developer knows better the state of the driver and hw to judge if
it's safe to ignore krefs.

>
>I want wondering if instead of a kernel config option, we could use a kernel parameter to enable/disable this feature, I believe it should act as a better alternative. After all there must be people like me who are forced to recompile the whole linux kernel just for the sake of getting a functionality.

Just allowing it like this is not a good thing. You may have a all kind
of issues with use after free, dangling pointers etc.  That would just
make life harder for people not involved with proprietary modules.


>I hope for a reply and suggestions

I´d ask them to upstream their driver and start sending the issues to
their side.

Lucas De Marchi

>
>Regards
>Aditya

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD
  2024-06-14 18:48 ` Lucas De Marchi
@ 2024-06-15  4:51   ` Aditya Garg
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Garg @ 2024-06-15  4:51 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: mcgrof, linux-modules, linux-kernel

Thanks for the reply Lucas. It makes sense now!

> On 15 Jun 2024, at 12:18 AM, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> 
> On Thu, Jun 06, 2024 at 06:49:59AM GMT, Aditya Garg wrote:
>> Hi
>> 
>> I am Aditya Garg. I often require using out of tree drivers to support various hardwares on Linux. Sometimes the provider doesn't write good drivers, and often they have to be force unloaded. It's a common thing in proprietary drivers. I know the author of the driver should take note of the issues, but still the force unloading of the modules does come in handy many times.
>> 
>> Unfortunately if CONFIG_MODULE_FORCE_UNLOAD is not enabled in your kernel, which most probably is not enabled if you are using a Distribution pre compiled kernel, you have to recompile the whole kernel again.
> 
> CONFIG_MODULE_FORCE_UNLOAD only ever makes sense on a developer
> environment loading/unloading multiple times his own .ko module. Then
> the developer knows better the state of the driver and hw to judge if
> it's safe to ignore krefs.
> 
>> 
>> I want wondering if instead of a kernel config option, we could use a kernel parameter to enable/disable this feature, I believe it should act as a better alternative. After all there must be people like me who are forced to recompile the whole linux kernel just for the sake of getting a functionality.
> 
> Just allowing it like this is not a good thing. You may have a all kind
> of issues with use after free, dangling pointers etc.  That would just
> make life harder for people not involved with proprietary modules.
> 
> 
>> I hope for a reply and suggestions
> 
> I´d ask them to upstream their driver and start sending the issues to
> their side.
> 
> Lucas De Marchi
> 
>> 
>> Regards
>> Aditya

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-15  4:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-06  6:49 Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD Aditya Garg
2024-06-08  5:07 ` Christoph Hellwig
2024-06-14 18:48 ` Lucas De Marchi
2024-06-15  4:51   ` Aditya Garg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®