Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp835392ybl; Wed, 4 Dec 2019 11:41:00 -0800 (PST) X-Google-Smtp-Source: APXvYqy5UUFG03jBU8RgPkg7jAED5JYbVdKqkUFBlD/LvzvzA7qfIaD0BN16A4MvqBOPWmtFZdAs X-Received: by 2002:a05:6808:681:: with SMTP id k1mr4171260oig.117.1575488459929; Wed, 04 Dec 2019 11:40:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575488459; cv=none; d=google.com; s=arc-20160816; b=PzU7JTOsDeKJTc5EYB3rVC04txQb+ZOFH3LkK+Pc9AORJundm8HDNdlvW3Hl6clmXC kpq9WOFdluQE4KT272GeBb7x3le4FAxcxrepw2J5IlLZ92JkIkVaFuk6DOZJodJMzCOp qiBvS7SQzV4hPr69SclvxVUFizL6RZKOo9szpeLpjwdQ5H3VnIwvq0rRITNXgoUTTMS/ XQJTRRw/YaHgyHmXEb5Abq+WNaUdkSKG7OP82RmaXT6XZEn3/kZeLoK5dj2GiF/8yxU5 6LCi43LfbymdtrtBeGgPVvr+a9/jkYcBiyZBtAmn0Pf6+EkVJPHcdx9L/oCPXwuRAqjR x8Ow== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=8YzffI6BTbDDQcKipmBH3epvQxf1I8mA0zvypaeoYk0=; b=YnbapI3S7FeuLhNQMI8JOZcD1Hxewd0aetuIcAHbzNdizP+jEC7B62V3lZju1sKnOR iAJ9Bv+JDApWOzpLEzBVBl46OLI+vI+k8mBs6wz1uVZAPByoMx+Ak/HyjaaZckrzQ0rG T/5W5S+K/0J230LO/uGdZn6Zm+UGuhXS0OJyJ1KFQtGbp/e+PdvyaxjN5rsGU/D6HOND dqVg9Xga15ReCXKv60eTgcaORBlj6qTBrocFBQqh25Z1p/YHJGauqnhVqVrUg2L0BmJK KK9gyeSL2sew8B+763+5ENybM4kbj6JG4urOrRl5m0LzEwMm5WhO7iJjLS/sFmA2Eiv9 +WCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=jjvcrGPC; 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 p10si3719897oib.88.2019.12.04.11.40.47; Wed, 04 Dec 2019 11:40:59 -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; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=jjvcrGPC; 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 S1728401AbfLDTgV (ORCPT + 99 others); Wed, 4 Dec 2019 14:36:21 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:40935 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727982AbfLDTgU (ORCPT ); Wed, 4 Dec 2019 14:36:20 -0500 Received: by mail-lf1-f68.google.com with SMTP id y5so489641lfy.7 for ; Wed, 04 Dec 2019 11:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=8YzffI6BTbDDQcKipmBH3epvQxf1I8mA0zvypaeoYk0=; b=jjvcrGPCuHTHOGJJrH8U0Iyx3nsiiJlWtNPChRrPmX8N5u9p2MMFCXAOFPLEY8M4gs RPtpg7yVp62/m5iFVQ01HaJPE6lPmyWLHI0C+LYBjNe1+MmgJseGa85LoFRhZXBGVwv1 IdyOohDBo/audQdOUMqjm7q3eJld7sprvONff0oMmdTq/d/cTSI761ZhBXPKrqrdmCXJ eyGbAgMD7fpi/wUB2Dgu5U2MjpFfuN5SXsEkFHuxRD1mx1MOAYSxBjIjM7g82faeE/+A iwwhT+PtByDqNf6hghXKTDPZxrEl30mrp8gkdTyKOyTqQ6RMveZrGCGRpBoWeKbp2TPQ dAyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=8YzffI6BTbDDQcKipmBH3epvQxf1I8mA0zvypaeoYk0=; b=ZvS7SEBtCCZIZWOIrkRpzdxWyznsR6UjXKmExOh6ZPJltQtpc9rt1adqBvX0HFdPm5 ezrrwX54lgz2yBWPm01WhbCHeAcc73ONrA1lu0gQgPQL/CXf7exrKc1weBNRoxZLWRX0 ncRgnFO5yB88pk0rd/FEXQ2JJSKmn6Ym2QKwKHkpqduaUqHIn7V0K7Nlc2kayYk9swSS bPLn+KgPDWejIDerEv7xl9wjHQJUf93IJek0klm+Px2wBsEJcP9WxWTZ/aGoAAbe+EOW 5QCs6fuDVnLUIjbipwUNlRIfV8rJr2J1eefqdPb626X/PCtHXaRSCuhyIrNdnBUq4Xr6 Fehw== X-Gm-Message-State: APjAAAV7xPjuJRX9Cp+29HRDMV2JJivO5dGDObrqoIDx2mqiss9UvuFy J9/bF+3yS8Xo9A6EoIGqq0pQBw== X-Received: by 2002:ac2:5473:: with SMTP id e19mr3155384lfn.108.1575488178400; Wed, 04 Dec 2019 11:36:18 -0800 (PST) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id 140sm1872100lfk.78.2019.12.04.11.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 11:36:17 -0800 (PST) Date: Wed, 4 Dec 2019 11:35:44 -0800 From: Jakub Kicinski To: Willem de Bruijn Cc: Valentin Vidic , Boris Pismenny , Aviad Yehezkel , John Fastabend , Daniel Borkmann , "David S. Miller" , Network Development , linux-kernel Subject: Re: [PATCH] net/tls: Fix return values for setsockopt Message-ID: <20191204113544.2d537bf7@cakuba.netronome.com> In-Reply-To: References: <20191203224458.24338-1-vvidic@valentin-vidic.from.hr> <20191203145535.5a416ef3@cakuba.netronome.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (there is a v2, in case you missed) 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. > > But if we can - please fix the tools/testing/selftests/net/tls.c test > > as well, because it expects ENOTSUPP. > > Even if changing the error code, EOPNOTSUPP is arguably a better > replacement. The request itself is valid. Also considering forward > compatibility. For the case TLS version case?