netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Alexey Kodanev <alexey.kodanev@oracle.com>,
	Network Development <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH net] sock: return uapi errno in sock_setsockopt() for SO_ZEROCOPY
Date: Fri, 15 Feb 2019 22:44:47 +0100	[thread overview]
Message-ID: <20190215214447.GA16335@x230> (raw)
In-Reply-To: <CA+FuTSeRV3Qy_S3c4qayTe3K1FkaPF7cZnV7_tNVKnS3cEuxmA@mail.gmail.com>

Hi,

> On Fri, Feb 15, 2019 at 11:51 AM Alexey Kodanev
> <alexey.kodanev@oracle.com> wrote:

> > For unsupported protocols, setsockopt() with SO_ZEROCOPY
> > option sets errno to ENOTSUPP(524). But this number is
> > not defined anywhere in the include/uapi/ headers.

> > To make sure userspace sees the known number, replace
> > ENOTSUPP(524) with EOPNOTSUPP(95).

> > Fixes: 76851d1212c1 ("sock: add SOCK_ZEROCOPY sockopt")
> > Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> > Reported-by: Petr Vorel <pvorel@suse.cz>

> This code has been there since 4.14. I think it's too late to change
> system call behavior.
BTW It reminds me commit 0fb44559ffd6 ("af_unix: move unix_mknod() out of
bindlock"), which while fixing a problem also for certain usage changed changed
from -EINVAL to -EADDRINUSE. Proposed fix to restore old behavior [1] was not
accepted, 0fb44559ffd6 was merged to some stable kernels so the behavior also
differs.
As there is no way to move these NFSv3 related definitions to uapi to make it
visible for userspace, I'd be for changing errno.

Kind regards,
Petr

[1] https://marc.info/?l=linux-kernel&m=149880810113888&w=2

  reply	other threads:[~2019-02-15 21:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15 16:52 [PATCH net] sock: return uapi errno in sock_setsockopt() for SO_ZEROCOPY Alexey Kodanev
2019-02-15 16:58 ` Willem de Bruijn
2019-02-15 21:44   ` Petr Vorel [this message]
2019-02-18 11:35   ` Alexey Kodanev
2019-02-18 16:04     ` Willem de Bruijn

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=20190215214447.GA16335@x230 \
    --to=pvorel@suse.cz \
    --cc=alexey.kodanev@oracle.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=willemdebruijn.kernel@gmail.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;
as well as URLs for NNTP newsgroup(s).