linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* man page for syscall delete_module is outdated
@ 2024-02-19  8:17 Александр Офицеров
  2024-02-19 11:56 ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Александр Офицеров @ 2024-02-19  8:17 UTC (permalink / raw)
  To: alx; +Cc: dutyrok, kovalev, linux-man

Found out that man page for delete_module syscall is outdated.
The behaviour described there doesn't match to code, specifically for 
unloading module if its have no refcnt. Parameter O_NONBLOCK described 
in man doesn't exist anymore in kernel versions 3.13+, which is quite 
old, only O_TRUNC parameter present for actual kernel version, 
O_NONBLOCK does nothing.
I've also opened an issue on bugzilla: 
https://bugzilla.kernel.org/show_bug.cgi?id=218489

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

* Re: man page for syscall delete_module is outdated
  2024-02-19  8:17 man page for syscall delete_module is outdated Александр Офицеров
@ 2024-02-19 11:56 ` Alejandro Colomar
  2024-02-19 16:11   ` Alexander Ofitserov
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Colomar @ 2024-02-19 11:56 UTC (permalink / raw)
  To: Александр Офицеров
  Cc: dutyrok, kovalev, linux-man

[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]

Hi,

On Mon, Feb 19, 2024 at 11:17:29AM +0300, Александр Офицеров wrote:
> Found out that man page for delete_module syscall is outdated.
> The behaviour described there doesn't match to code, specifically for
> unloading module if its have no refcnt. Parameter O_NONBLOCK described in
> man doesn't exist anymore in kernel versions 3.13+, which is quite old, only
> O_TRUNC parameter present for actual kernel version, O_NONBLOCK does
> nothing.
> I've also opened an issue on bugzilla:
> https://bugzilla.kernel.org/show_bug.cgi?id=218489

Would you mind suggesting a patch?  Also, would you mind showing your
findings in the kernel code?

See also:
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING>
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/bugs>
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/patches>
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/mail>

Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: man page for syscall delete_module is outdated
  2024-02-19 11:56 ` Alejandro Colomar
@ 2024-02-19 16:11   ` Alexander Ofitserov
  2024-03-04 16:10     ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Ofitserov @ 2024-02-19 16:11 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: dutyrok, kovalev, linux-man



On 19.02.2024 14:56, Alejandro Colomar wrote:
> Hi,
> 
> On Mon, Feb 19, 2024 at 11:17:29AM +0300, Александр Офицеров wrote:
>> Found out that man page for delete_module syscall is outdated.
>> The behaviour described there doesn't match to code, specifically for
>> unloading module if its have no refcnt. Parameter O_NONBLOCK described in
>> man doesn't exist anymore in kernel versions 3.13+, which is quite old, only
>> O_TRUNC parameter present for actual kernel version, O_NONBLOCK does
>> nothing.
>> I've also opened an issue on bugzilla:
>> https://bugzilla.kernel.org/show_bug.cgi?id=218489
> 
> Would you mind suggesting a patch?  Also, would you mind showing your
> findings in the kernel code?
> 
> See also:
> <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING>
> <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/bugs>
> <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/patches>
> <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/mail>
> 
> Have a lovely day!
> Alex
> 

Sure!
O_NONBLOCK used in "try_stop_module" function, which is invoked by 
syscall delete_module, here is the code of this function for kernel 
version 3.12.74:
https://elixir.bootlin.com/linux/v3.12.74/source/kernel/module.c#L775

However, in later kernels, this parameter disappeared.
Also, here is the code for 3.13:
https://elixir.bootlin.com/linux/v3.13/source/kernel/module.c#L767

In recent kernels, 6.7.5 for example, this parameter also absent:
https://elixir.bootlin.com/linux/v6.7.5/source/kernel/module/main.c#L637

I'll make patch for man tomorrow.

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

* Re: man page for syscall delete_module is outdated
  2024-02-19 16:11   ` Alexander Ofitserov
@ 2024-03-04 16:10     ` Alejandro Colomar
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar @ 2024-03-04 16:10 UTC (permalink / raw)
  To: Alexander Ofitserov; +Cc: dutyrok, kovalev, linux-man

[-- Attachment #1: Type: text/plain, Size: 2078 bytes --]

Hi Alexander,

On Mon, Feb 19, 2024 at 07:11:24PM +0300, Alexander Ofitserov wrote:
> 
> 
> On 19.02.2024 14:56, Alejandro Colomar wrote:
> > Hi,
> > 
> > On Mon, Feb 19, 2024 at 11:17:29AM +0300, Александр Офицеров wrote:
> > > Found out that man page for delete_module syscall is outdated.
> > > The behaviour described there doesn't match to code, specifically for
> > > unloading module if its have no refcnt. Parameter O_NONBLOCK described in
> > > man doesn't exist anymore in kernel versions 3.13+, which is quite old, only
> > > O_TRUNC parameter present for actual kernel version, O_NONBLOCK does
> > > nothing.
> > > I've also opened an issue on bugzilla:
> > > https://bugzilla.kernel.org/show_bug.cgi?id=218489
> > 
> > Would you mind suggesting a patch?  Also, would you mind showing your
> > findings in the kernel code?
> > 
> > See also:
> > <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING>
> > <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/bugs>
> > <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/patches>
> > <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/mail>
> > 
> > Have a lovely day!
> > Alex
> > 
> 
> Sure!
> O_NONBLOCK used in "try_stop_module" function, which is invoked by syscall
> delete_module, here is the code of this function for kernel version 3.12.74:
> https://elixir.bootlin.com/linux/v3.12.74/source/kernel/module.c#L775
> 
> However, in later kernels, this parameter disappeared.
> Also, here is the code for 3.13:
> https://elixir.bootlin.com/linux/v3.13/source/kernel/module.c#L767
> 
> In recent kernels, 6.7.5 for example, this parameter also absent:
> https://elixir.bootlin.com/linux/v6.7.5/source/kernel/module/main.c#L637
> 
> I'll make patch for man tomorrow.

Please include this in the commit message.

Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2024-03-04 16:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-19  8:17 man page for syscall delete_module is outdated Александр Офицеров
2024-02-19 11:56 ` Alejandro Colomar
2024-02-19 16:11   ` Alexander Ofitserov
2024-03-04 16:10     ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).