Received: by 2002:ac8:6216:0:b0:41c:c224:f26f with SMTP id ks22csp85429qtb; Thu, 2 Nov 2023 12:14:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHso1N039luUpQvnGG393G7xwIqOyZOqgvt5iaM1thhiqrjviF7NRPTPg2mv9Aw5ommu3B1 X-Received: by 2002:a05:6a20:160e:b0:181:6b3d:ca1c with SMTP id l14-20020a056a20160e00b001816b3dca1cmr476990pzj.3.1698952476859; Thu, 02 Nov 2023 12:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698952476; cv=none; d=google.com; s=arc-20160816; b=bnOzgNsv+GtveUFfOoMbmTG6Q2ECY0UVE4I2DapcLQLz5dfiSi6i3eBgmKxKGhGXrU Zx28WOCMP4M3WmOxQIKqVlq6W1mhBpxOLGFynPWhBOUwVbPGd0bLfM/dnQ56JgTIb5Z+ oArRiGa070542VOr4CAecaSYLKBrTV3b9F6a07KaWFNNC+EFgrVMTvDvIZjkbhoUPJuw AmwKrbSg7CFqlr1yPFyl2Z6puKHd1ma3RieJB/VvvM7vEP6Mitrh9VOBRbEMGoNPncYe a01ALl9Jg3WnhFhHmQU9qJ53K+dAllHI7qtnk6z32a5mjPTdIaZDnqNMT004yr5W6AD4 I1NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+hsK5FdnGdAP2Va7dl3SYh4jak+49kwsP9VLMvekNxQ=; fh=Sx3DIdzIXAI3zSKwXM50i2h5Fca75DnEixXUmSUl2+Q=; b=VS468L4SoX25LHFy7iE6WQDX69HkLrmKx4/TJ7RoOcSQN4OtIV6rTQFT4FH0ZlU3ty pE5gWGJMmdpbPsneI10YDg4a2ahms+g0bw6kBGpMNrpmu17QTjmAjcK+Ddfz+S+8FJkX lneh1j+Le6j/j3RmpgZj6OBXrvPgZgbAw9ReY4pAu5x2Uvq6ZeetaLLUj2T6MjAK0OMk JyrhyfCURr9iMsSSidLZhUF11opJrZjuYCtSQTM8YCMOq1AdNXmbrGfRlZHWzRi4FdX5 BwlTamPKREF43Dg2vnE4fxbx3ZUXC0J1+SSybOzJVoS5KK0GuxI4e5eMg+r6AcXuxeSD 0gQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=mPDbYyzj; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id a65-20020a636644000000b005aa0e7d39f4si136995pgc.733.2023.11.02.12.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 12:14:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=mPDbYyzj; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id D579E838F054; Thu, 2 Nov 2023 12:14:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233206AbjKBTOa (ORCPT + 52 others); Thu, 2 Nov 2023 15:14:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbjKBTO3 (ORCPT ); Thu, 2 Nov 2023 15:14:29 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B561C188; Thu, 2 Nov 2023 12:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1698952460; bh=O7wEcDJtrGJ2yEwB0sEkgTD3GrHwoBv5RI3h12B/TWg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mPDbYyzj2o7kfdQXXedsrUe8Ts0XLpOU4a2ChB6jMnNoFOwzBU97iZ5d7QZ00ekr4 BirHopLx8Qy05TCzR71Ua/aGkDs4JdExXFm45Bsz8W5tT/23QYJSV2X/Br3bfo9uKn 7bmJ/7HLYGg+8BnqSk72TpcADtK5s4dA533fXfgA= Date: Thu, 2 Nov 2023 20:14:19 +0100 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Przemek Kitszel Cc: Johannes Berg , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rfkill: return ENOTTY on invalid ioctl Message-ID: <613039a4-41af-48ff-8113-3b0ee8077bcf@t-8ch.de> References: <20231101-rfkill-ioctl-enosys-v1-1-5bf374fabffe@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 02 Nov 2023 12:14:30 -0700 (PDT) Hi! On 2023-11-02 09:57:45+0100, Przemek Kitszel wrote: > 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? "break" would mean that some user application worked correctly before but does not do so anymore with this change. This seems highly unlikely and I was not able to find such an application via Debian code search. In general I did *not* mark this change for stable so if some application would indeed break it gets detected before the patch hits a release. > > > > ENOSYS as returned before should only be used to indicate that a syscall > > is not available at all. > > > > Signed-off-by: Thomas Weißschuh > > --- > > 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, >