From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: linux-man@vger.kernel.org, mtk.manpages@gmail.com
Subject: Re: [PATCH] init_module.2: Add ETXTBSY error for finit_module
Date: Mon, 22 Nov 2021 17:37:24 +0100 [thread overview]
Message-ID: <4a08d1e1-4bed-2428-e29f-8b7cb37294b4@gmail.com> (raw)
In-Reply-To: <1637136967-13028-1-git-send-email-xuyang2018.jy@fujitsu.com>
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/
next prev parent reply other threads:[~2021-11-22 16:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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) [this message]
2021-11-23 0:59 ` [PATCH v2] " Yang Xu
2021-11-23 11:07 ` Alejandro Colomar (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4a08d1e1-4bed-2428-e29f-8b7cb37294b4@gmail.com \
--to=alx.manpages@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=xuyang2018.jy@fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox