On 4/18/23 22:54, Alejandro Colomar wrote: > Hi Mickaël, > > On 4/18/23 22:50, Mickaël Salaün wrote: >> Indeed, ENOTSUPP is a kernel error type, only EOPNOTSUPP should be used >> to return error to user space. ENOTSUPP is not used by the kernel, it is >> only defined by the libc: >> >> # ifndef ENOTSUP >> # define ENOTSUP EOPNOTSUPP >> # endif >> >> > > [...] > >> >> ENOTSUP doesn't exist in the kernel source, so it is legitimate that >> Landlock and any other kernel interfaces use EOPNOTSUPP. ENOTSUP should >> then not replace EOPNOTSUPP for Landlock nor any other kernel interfaces. > > That sounds reasonable. It's a bit confusing that many man pages document > ENOTSUP (user-space). I'll take this into account for when I see some > patch that touches one of those ENOTSUPs, and ask why, and maybe remove > them all in favor of EOPNOTSUPP. I forgot to paste this: $ grep -rl '\bENOTSUP\b' man* man2/clock_getres.2 man2/clock_nanosleep.2 man2/getxattr.2 man2/listxattr.2 man2/setxattr.2 man2/removexattr.2 man2/timer_create.2 man2/chmod.2 man3/pthread_attr_setinheritsched.3 man3/dirfd.3 man3/pthread_setschedparam.3 man3/pthread_attr_setscope.3 man3/pthread_attr_setschedpolicy.3 man3/pthread_mutexattr_getpshared.3 man3/errno.3 man3/pthread_setschedprio.3 man3/pthread_attr_setschedparam.3 man7/cgroups.7 > > Thanks, > Alex > -- <http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature