Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2659693pxa; Fri, 7 Aug 2020 17:42:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkYl/WAKS5mp4z1HypXAKaZlrRg/+BOuHFOjy8LNIaUiVNkyur4QUEbnKsfZqx/RVYOu1Y X-Received: by 2002:a17:906:7104:: with SMTP id x4mr12430071ejj.417.1596847334569; Fri, 07 Aug 2020 17:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596847334; cv=none; d=google.com; s=arc-20160816; b=Zsi57UsZbATDidG8vsnRPrcCXxbSd6r391DXsZXlExa37clOwrjaBuiM9bReqleOEJ JdfYus7mQi7HOTcBVtkpSAo5SBjg/VbDg/EphG6NPTufmzbvkcOrsUWESPkieHPGzMT6 9nthght3bPHBC/uesVlIX8rEEIw+GN7aGpnQa9QUoibAhMgnLu/aFZDWeebkyotxknz2 mN3q/kRvxjvtC3YguQmK5xJAQ7NoVjD4J35lOraXr4TZZftl6XwFcRq03qUs9FoY7jlr RUaWKVCsizLitM0tD8wwJ9WQk7N8GswtSNSRYFtgJDbrWswgUWjX6PS5tKSwwEcprJCl ONHA== 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=KClksvuoIPCIEo94Yn3Iv5+92QxHLNmvpuB/CqEdJ8M=; b=znrLgBZglWJ5XTmsOs/q62l+zkLCEqHU3MzpZccUcr5mP+BqZrBD5HCsCOqWzZecLg h/wSdDGv9HMKTEzbeZMR5qFaN6Af5gStutDlalODQvTbSJeCOGl7khaj2q8b8oNIJ6Ca RCyKrOh7OCjiWYDCPwosCpgv/cbWSUdV4oldJZU0yudQWvQ6yCiE8IM9ZQmmIVn53j4j SWSOvLAgRTu9U4OEzTqgq113CtLaHJ5csisDGwYZ26vZF3EFntN6x5NuoA2/7lMVUesI r+43McJ7Ml4OWjfYl8dqV9xtsbI7kt3KAjf3rj3UZbyILxWPSWxOEcicSoDDGJUwFoxz YTnA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b17si7135672ejd.636.2020.08.07.17.41.51; Fri, 07 Aug 2020 17:42:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbgHHAlF (ORCPT + 99 others); Fri, 7 Aug 2020 20:41:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbgHHAlF (ORCPT ); Fri, 7 Aug 2020 20:41:05 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 874ABC061756; Fri, 7 Aug 2020 17:41:05 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::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 4BAC81276E70D; Fri, 7 Aug 2020 17:24:19 -0700 (PDT) Date: Fri, 07 Aug 2020 17:41:04 -0700 (PDT) Message-Id: <20200807.174104.946455971597492292.davem@davemloft.net> To: r.czerwinski@pengutronix.de Cc: borisp@mellanox.com, aviadye@mellanox.com, john.fastabend@gmail.com, daniel@iogearbox.net, kuba@kernel.org, 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 From: David Miller In-Reply-To: <20200806064906.14421-1-r.czerwinski@pengutronix.de> References: <20200806064906.14421-1-r.czerwinski@pengutronix.de> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-2022-jp 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]); Fri, 07 Aug 2020 17:24:19 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rouven Czerwinski Date: Thu, 6 Aug 2020 08:49:06 +0200 > Trying to use ktls on a system with 32-bit userspace and 64-bit kernel > results in a EOPNOTSUPP message during sendmsg: > > setsockopt(3, SOL_TLS, TLS_TX, …, 40) = 0 > sendmsg(3, …, msg_flags=0}, 0) = -1 EOPNOTSUPP (Operation not supported) > > 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. > > 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. > > 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. > > Signed-off-by: Rouven Czerwinski I'll apply this, thank you.