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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 06 Jul 2015 09:37:02 +0200
From:	Clemens Ladisch <clemens@...isch.de>
To:	Masahiro Yamada <yamada.masahiro@...ionext.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [Question] Usage of ENOTSUPP error code

Masahiro Yamada wrote:
> I noticed many drivers return -ENOTSUPP on error.
>
> I assume ENOTSUPP is defined in include/linux/errno.h
> as follows:
>
> /* Defined for the NFSv3 protocol */
> ...
> #define ENOTSUPP 524 /* Operation is not supported */
>
> If so, should ENOTSUPP be only used for NFS-related errors?

There is typcially no such restriction.

However, the problem with ENOTSUPP is that it is not defined in
the uapi header, so it will not be known to user space programs.

> In fact, ENOTSUPP is used by various drivers
> including non-network ones such as pinctrl, USB, etc.

If it is possible that the error code shows up for user space, ENOTSUPP
should not be used.  Alternatives would be something like ENOTSUP,
EOPNOTSUPP, ENOIOCTLCMD, ENOSYS, or EINVAL.


Regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ