From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Joe Lawrence <joe.lawrence@redhat.com>,
Alice Ferrazzi <alicef@alicef.me>,
jeyu@kernel.org, jikos@kernel.org, mbenes@suse.cz,
live-patching@vger.kernel.org, linux-kernel@vger.kernel.org,
Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Subject: Re: [PATCH] livepatch: core: Return ENOTSUPP instead of ENOSYS
Date: Wed, 30 Jan 2019 07:10:49 -0600 [thread overview]
Message-ID: <20190130131049.gnhge73xvh62p3gl@treble> (raw)
In-Reply-To: <20190130124156.qjtbvrkjctu6wi62@pathway.suse.cz>
On Wed, Jan 30, 2019 at 01:41:56PM +0100, Petr Mladek wrote:
> Hmm, the error code is passed to the syscall, for example:
>
> + SYSCALL_DEFINE3(init_module
> + load_module()
> + do_init_module()
> + do_one_initcall(mod->init);
>
> I am not sure if we are allowed to return -ENOTSUPP (-524).
> It is defined in the internal include/linux/errno.h. There
> is the following commnent:
>
> /*
> * These should never be seen by user programs...
>
>
>
> I tried to find a better alternative and found:
>
> #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
>
>
> There is the following note in man errno:
>
> ENOTSUP Operation not supported (POSIX.1)
>
> EOPNOTSUPP Operation not supported on socket (POSIX.1)
> (ENOTSUP and EOPNOTSUPP have the same value
> on Linux, but according to POSIX.1 these error
> values should be distinct.)
>
> And it looks that -EOPNOTSUPP is used widely in many subsystes (not
> only network).
Yes, you are right. It's confusing that ENOTSUPP and ENOTSUP are not
the same thing. EOPNOTSUPP sounds good.
--
Josh
prev parent reply other threads:[~2019-01-30 13:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-26 19:26 Alice Ferrazzi
2019-01-28 19:49 ` Joe Lawrence
2019-01-29 16:50 ` Josh Poimboeuf
2019-01-30 12:41 ` Petr Mladek
2019-01-30 13:00 ` alicef
2019-01-30 13:10 ` Josh Poimboeuf [this message]
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=20190130131049.gnhge73xvh62p3gl@treble \
--to=jpoimboe@redhat.com \
--cc=alice.ferrazzi@miraclelinux.com \
--cc=alicef@alicef.me \
--cc=jeyu@kernel.org \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.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
all inboxes | Powered by JetHome®