All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init_module.2: Add ETXTBSY error for finit_module
@ 2021-11-17  8:16 Yang Xu
  2021-11-22 16:37 ` Alejandro Colomar (man-pages)
  0 siblings, 1 reply; 4+ messages in thread
From: Yang Xu @ 2021-11-17  8:16 UTC (permalink / raw)
  To: alx.manpages, mtk.manpages; +Cc: linux-man, Yang Xu

Since kernel commit[1], finit_module fails with ETXTBSY error if fd has write permission.
Since kernel commit[2], finit_module fails with EBADF error if fd doesn't have read permission.

So we can use read-write permission to trigger ETXTBSY error all the time since linux 4.7.

[1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=39d637af
[2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=032146cd

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 man2/init_module.2 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/man2/init_module.2 b/man2/init_module.2
index aac0c6631..2bcbaf4c3 100644
--- a/man2/init_module.2
+++ b/man2/init_module.2
@@ -242,6 +242,13 @@ is invalid.
 .B ENOEXEC
 .I fd
 does not refer to an open file.
+.TP
+.BR ETXTBSY " (since Linux 4.7)"
+.\" commit 39d637af5aa7577f655c58b9e55587566c63a0af
+The file referred to by
+.I fd
+is opened for read-write.
+.
 .PP
 In addition to the above errors, if the module's
 .I init
-- 
2.23.0


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

* Re: [PATCH] init_module.2: Add ETXTBSY error for finit_module
  2021-11-17  8:16 [PATCH] init_module.2: Add ETXTBSY error for finit_module Yang Xu
@ 2021-11-22 16:37 ` Alejandro Colomar (man-pages)
  2021-11-23  0:59   ` [PATCH v2] " Yang Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-11-22 16:37 UTC (permalink / raw)
  To: Yang Xu; +Cc: linux-man, mtk.manpages

Hi Yang,

On 11/17/21 09:16, Yang Xu wrote:
> Since kernel commit[1], finit_module fails with ETXTBSY error if fd has write permission.
> Since kernel commit[2], finit_module fails with EBADF error if fd doesn't have read permission.
> 
> So we can use read-write permission to trigger ETXTBSY error all the time since linux 4.7.
> 
> [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=39d637af
> [2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=032146cd
> 
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>   man2/init_module.2 | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/man2/init_module.2 b/man2/init_module.2
> index aac0c6631..2bcbaf4c3 100644
> --- a/man2/init_module.2
> +++ b/man2/init_module.2
> @@ -242,6 +242,13 @@ is invalid.
>   .B ENOEXEC
>   .I fd
>   does not refer to an open file.
> +.TP
> +.BR ETXTBSY " (since Linux 4.7)"
> +.\" commit 39d637af5aa7577f655c58b9e55587566c63a0af
> +The file referred to by
> +.I fd
> +is opened for read-write.
> +.

Please, remove that trailing '.'

Thanks,
Alex

>   .PP
>   In addition to the above errors, if the module's
>   .I init
> 

-- 
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

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

* [PATCH v2] init_module.2: Add ETXTBSY error for finit_module
  2021-11-22 16:37 ` Alejandro Colomar (man-pages)
@ 2021-11-23  0:59   ` Yang Xu
  2021-11-23 11:07     ` Alejandro Colomar (man-pages)
  0 siblings, 1 reply; 4+ messages in thread
From: Yang Xu @ 2021-11-23  0:59 UTC (permalink / raw)
  To: alx.manpages; +Cc: linux-man, mtk.manpages, Yang Xu

Since kernel commit[1], finit_module fails with ETXTBSY error if fd has write permission.
Since kernel commit[2], finit_module fails with EBADF error if fd doesn't have read permission.

So we can use read-write permission to trigger ETXTBSY error all the time since linux 4.7.

[1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=39d637af
[2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=032146cd

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 man2/init_module.2 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/man2/init_module.2 b/man2/init_module.2
index aac0c6631..77cd8c4a6 100644
--- a/man2/init_module.2
+++ b/man2/init_module.2
@@ -242,6 +242,12 @@ is invalid.
 .B ENOEXEC
 .I fd
 does not refer to an open file.
+.TP
+.BR ETXTBSY " (since Linux 4.7)"
+.\" commit 39d637af5aa7577f655c58b9e55587566c63a0af
+The file referred to by
+.I fd
+is opened for read-write.
 .PP
 In addition to the above errors, if the module's
 .I init
-- 
2.23.0


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

* Re: [PATCH v2] init_module.2: Add ETXTBSY error for finit_module
  2021-11-23  0:59   ` [PATCH v2] " Yang Xu
@ 2021-11-23 11:07     ` Alejandro Colomar (man-pages)
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-11-23 11:07 UTC (permalink / raw)
  To: Yang Xu; +Cc: linux-man, mtk.manpages

Hi Yang,

On 11/23/21 01:59, Yang Xu wrote:
> Since kernel commit[1], finit_module fails with ETXTBSY error if fd has write permission.
> Since kernel commit[2], finit_module fails with EBADF error if fd doesn't have read permission.
> 
> So we can use read-write permission to trigger ETXTBSY error all the time since linux 4.7.
> 
> [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=39d637af
> [2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=032146cd
> 
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>

Patch applied.

Thanks,
Alex

> ---
>   man2/init_module.2 | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/man2/init_module.2 b/man2/init_module.2
> index aac0c6631..77cd8c4a6 100644
> --- a/man2/init_module.2
> +++ b/man2/init_module.2
> @@ -242,6 +242,12 @@ is invalid.
>   .B ENOEXEC
>   .I fd
>   does not refer to an open file.
> +.TP
> +.BR ETXTBSY " (since Linux 4.7)"
> +.\" commit 39d637af5aa7577f655c58b9e55587566c63a0af
> +The file referred to by
> +.I fd
> +is opened for read-write.
>   .PP
>   In addition to the above errors, if the module's
>   .I init
> 

-- 
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/

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

end of thread, other threads:[~2021-11-23 11:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17  8:16 [PATCH] init_module.2: Add ETXTBSY error for finit_module Yang Xu
2021-11-22 16:37 ` Alejandro Colomar (man-pages)
2021-11-23  0:59   ` [PATCH v2] " Yang Xu
2021-11-23 11:07     ` Alejandro Colomar (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.