Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1622177pxa; Thu, 6 Aug 2020 11:47:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKl0XGRH6raGc7cwkEZY8UTLukISRCt0rSKLleCPy+F7/ViaAJPlf5BRVlhPNMj4cteEAL X-Received: by 2002:aa7:d8d7:: with SMTP id k23mr5554060eds.54.1596739649042; Thu, 06 Aug 2020 11:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596739649; cv=none; d=google.com; s=arc-20160816; b=x22q7ee+ZYJSWs65WY+TPHZhHy5/a8jBb0GUuShj+jxIvse06L1wYbscmBAFdxsnpQ nxpDtj/2UlyrXozATaoBqOyEw5wMmTd5YF6cRWmwKBBh3qUtpoa4sVPY0a/knkP2gz2C kva8l/okgsu61cYI6l2O2yi/8ihPGyAGGloY76cDhrje1ngPCT2+8UzH8v/X3Nlp/VvX 750stP2pPAQfaTbDsEkUCrNTOhgpmYLWrO26I/g3jIOHA1AqDxFGK8kp10PfplUVxWQC 05b0uXd2Ox/XNNl6s+1Czd86J+SXvL7HNQroSMiMCILBplOutXrxp1lXl0QBy1JaWnD4 LsdQ== 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:message-id:subject:cc:to:from:date :dkim-signature; bh=JwgAw1WwqAOAxaNGCp+x/e+LI4CNlnVb2O9T4GyWCBk=; b=RjsYCFv7YMaFxILeYn/Hgbs/tymg6y9EqmV8qEkn3yVNtW1NujP/CIS3owSf5kDIdF XzFON5DX78PwC5+AxaxOYI0GwlMcPXDNd0Dj+VLS1BVjr3IMQVGg8fL9FQcYfqy2pofL 8aIiRDFxDlma11BFITbnkKo5rS3PHgkSJnct3I2nVbPBCB/kP5aFEY7GC1fXh6ZZbTnl jT2CnxlFpKj8DSYaUjBigrgFbWcrUvBPpKIsMcex2/KTac8hkcbnpGqkqlnSIQhKnp6X kKtfAA7nOOKrJOb9XOruL8Fb3himmcLyWOBTi9wCw7wuIRhfgFvfCN+6x2Iak66s+5Yl lyIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PLgazSnh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si3786479ejx.477.2020.08.06.11.47.06; Thu, 06 Aug 2020 11:47:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PLgazSnh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728253AbgHFSrA (ORCPT + 99 others); Thu, 6 Aug 2020 14:47:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:35966 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725927AbgHFSrA (ORCPT ); Thu, 6 Aug 2020 14:47:00 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B0EB520855; Thu, 6 Aug 2020 18:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596739620; bh=Y0WLyMYc/6bL6sF+tllMOotA+LW00xdgYY/+OD2U6vU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PLgazSnh6Q7APAOQ9R2fEqDg3eJ4DImjX6Wk/9tQpbYrG5For71BgmDQraXcuOZpT YlLeFd2JjAqBeXiGVCqAgj2Ti3AKcgE9K3ByGwRJl7SDifQRfAF5aM70EGZHVbs/rp y6+jtIYUseHPvJviOSur5eW3dE5xTX2JRH4naccU= Date: Thu, 6 Aug 2020 11:46:57 -0700 From: Jakub Kicinski To: Rouven Czerwinski Cc: Boris Pismenny , Aviad Yehezkel , John Fastabend , Daniel Borkmann , "David S. Miller" , kernel@pengutronix.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 net-next] net/tls: allow MSG_CMSG_COMPAT in sendmsg Message-ID: <20200806114657.42f1ce8c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200806064906.14421-1-r.czerwinski@pengutronix.de> References: <20200806064906.14421-1-r.czerwinski@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Aug 2020 08:49:06 +0200 Rouven Czerwinski wrote: > Trying to use ktls on a system with 32-bit userspace and 64-bit kernel > results in a EOPNOTSUPP message during sendmsg: >=20 > setsockopt(3, SOL_TLS, TLS_TX, =E2=80=A6, 40) =3D 0 > sendmsg(3, =E2=80=A6, msg_flags=3D0}, 0) =3D -1 EOPNOTSUPP (Operation n= ot supported) >=20 > The tls_sw implementation does strict flag checking and does not allow > the MSG_CMSG_COMPAT flag, which is set if the message comes in through > the compat syscall. >=20 > This patch adds MSG_CMSG_COMPAT to the flag check to allow the usage of > the TLS SW implementation on systems using the compat syscall path. >=20 > Note that the same check is present in the sendmsg path for the TLS > device implementation, however the flag hasn't been added there for lack > of testing hardware. >=20 > Signed-off-by: Rouven Czerwinski I don't know much about the compat stuff, I trust our cmsg handling is fine? Just to be sure - did you run tools/testing/selftests/net/tls ?