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
| ||
|
Message-ID: <a069393c-86b3-ef79-82dd-0b60caf2a907@intel.com> Date: Thu, 2 Nov 2023 09:57:45 +0100 From: Przemek Kitszel <przemyslaw.kitszel@...el.com> To: Thomas Weißschuh <linux@...ssschuh.net>, Johannes Berg <johannes@...solutions.net>, "David S. Miller" <davem@...emloft.net>, "Eric Dumazet" <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com> CC: <linux-wireless@...r.kernel.org>, <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] rfkill: return ENOTTY on invalid ioctl On 11/1/23 20:41, Thomas Weißschuh wrote: > For unknown ioctls the correct error is > ENOTTY "Inappropriate ioctl for device". For sure! I would like to learn more of why this is not an UAPI breaking change? > > ENOSYS as returned before should only be used to indicate that a syscall > is not available at all. > > Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net> > --- > net/rfkill/core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/rfkill/core.c b/net/rfkill/core.c > index 14cc8fe8584b..c3feb4f49d09 100644 > --- a/net/rfkill/core.c > +++ b/net/rfkill/core.c > @@ -1351,11 +1351,11 @@ static long rfkill_fop_ioctl(struct file *file, unsigned int cmd, > unsigned long arg) > { > struct rfkill_data *data = file->private_data; > - int ret = -ENOSYS; > + int ret = -ENOTTY; > u32 size; > > if (_IOC_TYPE(cmd) != RFKILL_IOC_MAGIC) > - return -ENOSYS; > + return -ENOTTY; > > mutex_lock(&data->mtx); > switch (_IOC_NR(cmd)) { > > --- > base-commit: 7d461b291e65938f15f56fe58da2303b07578a76 > change-id: 20231101-rfkill-ioctl-enosys-00a2bb0a4ab1 > > Best regards,
Powered by blists - more mailing lists