lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 15 Feb 2019 22:44:47 +0100
From:   Petr Vorel <pvorel@...e.cz>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     Alexey Kodanev <alexey.kodanev@...cle.com>,
        Network Development <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>
Subject: Re: [PATCH net] sock: return uapi errno in sock_setsockopt() for
 SO_ZEROCOPY

Hi,

> On Fri, Feb 15, 2019 at 11:51 AM Alexey Kodanev
> <alexey.kodanev@...cle.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@...cle.com>
> > Reported-by: Petr Vorel <pvorel@...e.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ