Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5606030rwd; Mon, 5 Jun 2023 06:12:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6OcG12+UR8dj9TeFgr4htmiNNAgqrUySqZiyh36JYfalA3tFyR1NWs80NsiXG7VdYKRN3B X-Received: by 2002:a17:902:c94a:b0:1b0:5a41:db40 with SMTP id i10-20020a170902c94a00b001b05a41db40mr8512602pla.50.1685970777301; Mon, 05 Jun 2023 06:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685970777; cv=none; d=google.com; s=arc-20160816; b=lSu3GyP00RJesD3/3FAKXnup0XScqf9G4wvCE+SAalzEdTC09bOSPHQinDLDFgBw/F G816h3VLUoqQshTcWU2iPWjvE8tjjkzm7PAjzumMt4igoE0dTa2VmS7YOW+p9+SBxRlX Y7Mdf/2Xa7VYO/LprTLjHzIDVDL/0zuUsGeWde/fERJO8YjtkW+tw2BQ7DwBKxGYqxxE GZZSVeyTj0f+4YuQ3T3b8VIQar1J87aO6QLWHUO1yX8i5htDlbQ4N81sYXtjozz04gPV 6ogbDCFpBqdF1/LavaCzyCDLAJ1tAsv4bmYRaJ5+xDYTq81sCfPy3Nqs0slSwXOovg/h vLKQ== 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=GIUHoDHkYJ6R7Kj3TX2onke+6WDgXd+OHlld+dEFkxk=; b=iFRdxJanFEV7ZykrTlTsRR2VtVyddB03+5P7zrJ7pWmUamHH9wwmvdk/2UcGWuWjde jLP8HkMvxwLKzJo+E/WNbTZytHpvBebAIaAZxHXq6IyIjlf14RXEOQ0WH6OHE4LJTg3m d2KACnVtIgGsnBEtI1eptGlS1av2w2PaGKxywXYUOWYhLQwLanuohhkQsvR3ddv3Z/wB wPEU+lUeDkDp2y7/PVroY8DrzaFtmew1iam5QJQ8j2qSPxDUsne3lpoJ18K5fv7cRnVx BmIhGDOPoMuFQgl0UjUveF2PvYc50tfTf4HhDySHgQNttVslhbDWZfwEduyRaxUldgG4 YzBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hpvtNxd6; 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 l11-20020a170903244b00b001b046acc84bsi5607535pls.226.2023.06.05.06.12.44; Mon, 05 Jun 2023 06:12:57 -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=hpvtNxd6; 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 S233100AbjFEMrD (ORCPT + 99 others); Mon, 5 Jun 2023 08:47:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232564AbjFEMrB (ORCPT ); Mon, 5 Jun 2023 08:47:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96AB8CD for ; Mon, 5 Jun 2023 05:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685969174; 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=GIUHoDHkYJ6R7Kj3TX2onke+6WDgXd+OHlld+dEFkxk=; b=hpvtNxd6wF5AhCckUhdfIT3KIfAXCmv6N5LnfDE0zPR2MZ/0nZAF/dBJSv0yTMFOksk2VQ nSR+jJFqMGVClj72jOeraaORBa9yu0NrNaQ/AAtwzUc3MNGg8jVxrQJeDIXlkfzA/6a/dM pbOqW4gTGqX8GMr9JEvY0+Jo2MI2qtw= 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-317-SQ2IsWf4OIK8YfiAO4St3w-1; Mon, 05 Jun 2023 08:46:11 -0400 X-MC-Unique: SQ2IsWf4OIK8YfiAO4St3w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1DB5285A5BA; Mon, 5 Jun 2023 12:46:11 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 243AF140E954; Mon, 5 Jun 2023 12:46:09 +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 v4 02/11] tls: Allow MSG_SPLICE_PAGES but treat it as normal sendmsg Date: Mon, 5 Jun 2023 13:45:51 +0100 Message-ID: <20230605124600.1722160-3-dhowells@redhat.com> In-Reply-To: <20230605124600.1722160-1-dhowells@redhat.com> References: <20230605124600.1722160-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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 6e6a7c37d685..cac1adc968e8 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -953,7 +953,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);