Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp897370ybl; Wed, 4 Dec 2019 12:52:36 -0800 (PST) X-Google-Smtp-Source: APXvYqz1DVGwaRCLMMQi0zahgvTnIZTlPlIQcg0mve79KBLUNzutzcNFhu2+a5ByMJudNox2LlRa X-Received: by 2002:aca:1918:: with SMTP id l24mr4262688oii.19.1575492756248; Wed, 04 Dec 2019 12:52:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575492756; cv=none; d=google.com; s=arc-20160816; b=LBOwWsDLI8gPxTIOjy49EBu4ORxlw6yqbur6dbgc4HtvGKg6AeK/lSHoI5mhSd5S45 xbitb5pEQI/yJa7Mnd781PDJrav0SYYwRz8V7Qwt1kffeHDj2UB5rUDmFXRK8Ts1ZbNe gIAL60vyNLbYsvFqPgzN/WbRSytfBKSoYcUzZOPPQwGEoCcn9NKFCBH3iVKsv8NaQywf UGk3CZmbyT2RFbAA7/uxeY8LMmRbWk5BUtfLtE3zVHHsH3aBLaOp1QJIV0DJuBtCZ/i1 we6D0+ttNRRTzLGnjrfHnQvzYxXXGhmDgfNj4Ubqrvj/pHfOybMN7C8EzuNiuJ4gTs9d Zrwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=w5NuYYQPWPNRpQ6hsLsHoCoYo3XFvBpQkdTdzb4O0aA=; b=Xv+MR1mq/RpzOmoXZX7rdziPDzFh0DCz2rmJAAkvkfi5csvu4YPv6Qi8ZEIvd1b7KR vkdsThL+HwEvPXehvJPAzPqbwG01rXSexY8J8hcSSzjwQ14mjCkkM8I/+mFKyDgJcegW e5QOlm6trjsZVGrL+v+ge1yG5p+F4yFniTYzEwfAH9XKind18DvjsnuRoRbM6tGZ/Ll7 4WFHXtB1xCwzykfNTKzXsHOnBitv6O5VwsmcVjVY0fpoGz145Ofirvv/S6eCfAs5Ng1s vAjUtPoHOLtmmfJO4GMMhlFWOd2ndhR2JMOR5CzOUWYpcoYyuak95bB6sILtYKTjCUnp mI5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 25si3941297oiz.230.2019.12.04.12.52.24; Wed, 04 Dec 2019 12:52:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728227AbfLDUvh (ORCPT + 99 others); Wed, 4 Dec 2019 15:51:37 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:36442 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727889AbfLDUvh (ORCPT ); Wed, 4 Dec 2019 15:51:37 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:1c3::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 3211B14D9599A; Wed, 4 Dec 2019 12:51:36 -0800 (PST) Date: Wed, 04 Dec 2019 12:51:35 -0800 (PST) Message-Id: <20191204.125135.750458923752225025.davem@davemloft.net> To: willemdebruijn.kernel@gmail.com Cc: jakub.kicinski@netronome.com, vvidic@valentin-vidic.from.hr, borisp@mellanox.com, aviadye@mellanox.com, john.fastabend@gmail.com, daniel@iogearbox.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net/tls: Fix return values for setsockopt From: David Miller In-Reply-To: References: <20191204113544.2d537bf7@cakuba.netronome.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 04 Dec 2019 12:51:36 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Willem de Bruijn Date: Wed, 4 Dec 2019 15:43:00 -0500 > On Wed, Dec 4, 2019 at 2:36 PM Jakub Kicinski > wrote: >> >> (there is a v2, in case you missed) > > Thanks. I meant to respond to your comment. (but should have done sooner :) > >> On Wed, 4 Dec 2019 14:22:55 -0500, Willem de Bruijn wrote: >> > On Tue, Dec 3, 2019 at 6:08 PM Jakub Kicinski wrote: >> > > On Tue, 3 Dec 2019 23:44:58 +0100, Valentin Vidic wrote: >> > > > ENOTSUPP is not available in userspace: >> > > > >> > > > setsockopt failed, 524, Unknown error 524 >> > > > >> > > > Signed-off-by: Valentin Vidic >> > > >> > > I'm not 100% clear on whether we can change the return codes after they >> > > had been exposed to user space for numerous releases.. >> > >> > This has also come up in the context of SO_ZEROCOPY in the past. In my >> > opinion the answer is no. A quick grep | wc -l in net/ shows 99 >> > matches for this error code. Only a fraction of those probably make it >> > to userspace, but definitely more than this single case. >> > >> > If anything, it may be time to define it in uapi? >> >> No opinion but FWIW I'm toying with some CI for netdev, I've added a >> check for use of ENOTSUPP, apparently checkpatch already sniffs out >> uses of ENOSYS, so seems appropriate to add this one. > > Good idea if not exposing this in UAPI. I'm trying to understand this part of the discussion. If we have been returning a non-valid error code, this 524 internal kernel thing, it is _NOT_ an exposed UAPI. It is a kernel bug and we should fix it. If userspace anywhere is checking for 524, that is what needs to be fixed. Do we agree on this point?