Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1141440rwd; Wed, 7 Jun 2023 11:35:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7kcNQ6Nb+n/HlZ4Uoc0ubR37Nz1eAhWpEg7XJ9CenA4cZBkUAi+3+Hf4cxMr3cV0GP4Gc9 X-Received: by 2002:a17:903:248:b0:1ad:f7d9:1ae2 with SMTP id j8-20020a170903024800b001adf7d91ae2mr3265998plh.55.1686162931797; Wed, 07 Jun 2023 11:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686162931; cv=none; d=google.com; s=arc-20160816; b=LZvNqYOBJAeTI3eqwQeat7Lu01HaUxK+HLtMDNgOekhHs4iLS/eHTJ15eToOpfpafg /JPJhyscXKVlXbnxNZ8b20u9mZRAL0Z7B4KHV38cFZ7B/4ZOxpdqhDWFMIzsS/kqzLk2 zbqcvIZYQ1+u3qH7fPyc8uNXwV3Yhxgxpe68U78hV4PBvCAYOolWiAAldbt4M17g0Cyi Poh4qOZ+e0JNtpgGanuGH1Xo07gmUSZCtKh+PdcB6TqZBK1rnRdVVdg1HNYlKHtXnNye QTD1DFiD8nsUL6edl7DwxJ+VkfiK4LCa99x366aaibWiHjVMuzqi0KS/1RmbLcmon7WQ kamA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oJUkpOQ7e9hBKCJRUR3yZoWIoUWj9MtOId6LGPzA6h0=; b=qjxaBlv6cOjxF20o7UeGe/VFwO0mEjY2+is/DnkCTgx09tS9jX84f4g3JOWqh9/0qj ZDXMeE42B3ZOx4dl6AglzdJh9vuU0hRCLEbufJB0VU0b+gLcqMfuBozJICFzooh1oKfZ mm/h88XlplZYf13EH5WYBNTN3vS9hOWXYtDPwsb4FHYIl0uUHiMOLRLTrHM1FKNvKUB+ l+WbbTieNgc9kj0B0ChU3m54Uj+50PwC8oJXou50V2aG7xjpI1fH6rDWq+juuG6FOGTV fzNEaxSTCbosL8pUnhQf25UEKvZXc5B1WOJJt8ofBcNJJIM6mcIz6afuAMLfAOndDfxM g+SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GxQZ29y/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w2-20020a1709027b8200b001b22df619e3si3559067pll.563.2023.06.07.11.35.16; Wed, 07 Jun 2023 11:35:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GxQZ29y/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229563AbjFGSUl (ORCPT + 99 others); Wed, 7 Jun 2023 14:20:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233137AbjFGSUT (ORCPT ); Wed, 7 Jun 2023 14:20:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55723101 for ; Wed, 7 Jun 2023 11:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686161978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oJUkpOQ7e9hBKCJRUR3yZoWIoUWj9MtOId6LGPzA6h0=; b=GxQZ29y/Dv4+K+wPNcL7Z2G012VXzXSGidvd/IrKjaOf1aWixcTJULymfcnj6opqRvZs2E Ztyuo+dr34n4/zo6CNMnCERRRFGEXJ4eaQ0kKG2czNqTMHUn/mUy8zo7vzOkCWOgFkRao6 3CYmQ5sltFxVkIHh3EosBFcLTRrQrzU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-412-TTybqZy5N2KGRf1jLAwqPg-1; Wed, 07 Jun 2023 14:19:35 -0400 X-MC-Unique: TTybqZy5N2KGRf1jLAwqPg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0B408101A58B; Wed, 7 Jun 2023 18:19:33 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94E792026D49; Wed, 7 Jun 2023 18:19:30 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org, Linus Torvalds Cc: David Howells , Chuck Lever , Boris Pismenny , John Fastabend , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v6 02/14] tls: Allow MSG_SPLICE_PAGES but treat it as normal sendmsg Date: Wed, 7 Jun 2023 19:19:08 +0100 Message-ID: <20230607181920.2294972-3-dhowells@redhat.com> In-Reply-To: <20230607181920.2294972-1-dhowells@redhat.com> References: <20230607181920.2294972-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow MSG_SPLICE_PAGES to be specified to sendmsg() but treat it as normal sendmsg for now. This means the data will just be copied until MSG_SPLICE_PAGES is handled. Signed-off-by: David Howells cc: Chuck Lever cc: Boris Pismenny cc: John Fastabend cc: Jakub Kicinski cc: Eric Dumazet cc: "David S. Miller" cc: Paolo Abeni cc: Jens Axboe cc: Matthew Wilcox cc: netdev@vger.kernel.org --- net/tls/tls_device.c | 3 ++- net/tls/tls_sw.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index a959572a816f..9ef766e41c7a 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -447,7 +447,8 @@ static int tls_push_data(struct sock *sk, long timeo; if (flags & - ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL | MSG_SENDPAGE_NOTLAST)) + ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL | MSG_SENDPAGE_NOTLAST | + MSG_SPLICE_PAGES)) return -EOPNOTSUPP; if (unlikely(sk->sk_err)) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 1a53c8f481e9..38acc27a0dd0 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -955,7 +955,7 @@ int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size) int pending; if (msg->msg_flags & ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL | - MSG_CMSG_COMPAT)) + MSG_CMSG_COMPAT | MSG_SPLICE_PAGES)) return -EOPNOTSUPP; ret = mutex_lock_interruptible(&tls_ctx->tx_lock);