Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2348423rwd; Fri, 2 Jun 2023 08:13:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5hZVj9zyNr+Xt7QzMp/MUFWRnyWaGv7E/7Ck1zLVhIlZzwKEzB7D/N3FS2sZZsSKe+iW8u X-Received: by 2002:a05:6a20:3d02:b0:112:c262:a2f6 with SMTP id y2-20020a056a203d0200b00112c262a2f6mr6153068pzi.52.1685718837930; Fri, 02 Jun 2023 08:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685718837; cv=none; d=google.com; s=arc-20160816; b=p04WzPBbVonSFWzMklDV1kigBJiJgsctODtK3lbdc6PW98lqhLyFsqHamK9gsGU65Y lpAG4J+zfTEmOtc9EyPN5jBMxx1zP9Ib9xIqgthw/DheDKv4YAe5uzXDSzN+bpMk0bMu kLQTpiQPdwqqwEOtVyO6p9jm0WzTdB8UiwjM+8N7553GNMYuMTfRr1676JK3orVLNUDa BKPptTcjx4yjTOXMqaxohfxMkreTlAN14IjypCclynYYJRikLh+64b9AiAzyr6/Dypai xnDyCRlSo1dYe3WR8mVkBgFesCbZQPGcNnloPXyZxBV1L7u8FU/jmHouLSH8monA+poP vsRg== 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=CorezBTsH9c8XBUNTGZcx5ny90tCB6L3VcBOGX+twqrEOrYlIkjHbHPi9Hnx++cpNr FXPH4Ye7EKcLL4RbYF1rTgIj5G38goSa2BzJDmRzGDsfCE5wINF8dkP1VjyW2vps+u/c 37fAosxhLQBtgHNMEmL3qUFN7PB0xyK8lUF07jdRUWYBXEWnQ4FnNKDeY+rSWpc2NEqv hPwZB1/ceF/cUhqkponH+QG2mzAewfRss1bJeNSpNrNvdNyau1zQ8/OkSSdJGQ+RUtUQ 1UfCHcHqfQ8jaVE/iPz/szTzMAtdIDg3yFRfJkU6bRz2Se9mNVbrSGeIyu/eN6fo2EdI eIMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=K7bnd8tw; 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 l134-20020a633e8c000000b0054257e4e917si1141663pga.31.2023.06.02.08.13.45; Fri, 02 Jun 2023 08:13: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=K7bnd8tw; 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 S236424AbjFBPJG (ORCPT + 99 others); Fri, 2 Jun 2023 11:09:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236428AbjFBPJC (ORCPT ); Fri, 2 Jun 2023 11:09:02 -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 9A7F5E58 for ; Fri, 2 Jun 2023 08:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685718494; 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=K7bnd8twd7hgXUrlrbkuYcTXvI35JEwwy7sLT5HygS4SFSW4rHpqL6lQj3cGaoPYAGmMPm 34Ejx362mplMJ5a6ZbCjsltZBxXFVxZLPppoL5sgKxGiIPQQYg4qnRjeBg95H8nmF+angD Op3XTK0qIUH/rTJb694QWa31y+tOHHs= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-575-BOuQHjwKMQyEta6FCH7Pyw-1; Fri, 02 Jun 2023 11:08:11 -0400 X-MC-Unique: BOuQHjwKMQyEta6FCH7Pyw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CAA3D3C0BE44; Fri, 2 Jun 2023 15:08:10 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D922492B00; Fri, 2 Jun 2023 15:08:07 +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 v3 02/11] tls: Allow MSG_SPLICE_PAGES but treat it as normal sendmsg Date: Fri, 2 Jun 2023 16:07:43 +0100 Message-ID: <20230602150752.1306532-3-dhowells@redhat.com> In-Reply-To: <20230602150752.1306532-1-dhowells@redhat.com> References: <20230602150752.1306532-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-2.3 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=unavailable 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);