Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp616051rwd; Thu, 1 Jun 2023 04:42:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Vcrk7sfoVwwrBQBLFpx8LkHyq02ep6moNrlGt8MCnBHiHgVFDGJbTufyGzRd0FU/3tiU0 X-Received: by 2002:a05:6a00:21d6:b0:63d:2d7d:b6f2 with SMTP id t22-20020a056a0021d600b0063d2d7db6f2mr9266321pfj.4.1685619728284; Thu, 01 Jun 2023 04:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685619728; cv=none; d=google.com; s=arc-20160816; b=a9WmOs1VnD1LAIRli5WTTXkaMQ+KycFAoyHgbw8+SC5TLuzmNrcZpQCphikvflKDJm eN/tOzJDBZ9tI5zUDrx8pmW5b4JdGwmDlWkuzghraD8oUhwCJ81BD1oYNpQjQxJkGyB1 MMYm9oZ7YmRETHRuixQKmLS4aKkQc48eRqfeJYHjkP7UeR9N1G6rNQZPNubJrP6w7wWN k4NepeDkMca8rQzpzf9BdLypb8Igj/MfP9nB2FHV5ZjXSeett9tFmNlcpq46WDWxTBm4 V2N59XLDMZeGvZeIerfMvnADH03Phh78pyGpF3mqwggydNvznCcQ3sJfbvic1g5mBSU9 O9eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=g2HrdO1luTCQTFelo54c1HAUWB7J3N54nooptJdm2oE=; b=nRT5Qq4OFxY5g+arB7zr9xIkKSfa9iN2FTe8LONdcxfzzKKo7BsUIo5DznuRf9cQyc ugVjLwblMqYGZxYOzlsgDobQlHZS9QvAX6cGnfZWCGwUFPr0np8K10kcz8dDvCQ5Tzo1 /Kj8Tl9htOc60ugfQ7OH06QKkXER3h2g9WP4a4SrfWBCzsQ3c4z2zlCNqdOGK4Xn2KHI ro6Xs0dolblJZZ4DzHgDESDhwWEtL3QzUCc/G65ji0CkJXFlm/U3wiFXHktK10Gq9b0R BdESJjLz7K0tIkdiALKie81O0EAuPvICMQg2Io9STynZjKXKoxFLKeGcaO417Xln1s2w ZqcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g9999PCh; 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 a27-20020aa794bb000000b0064547f9483bsi1417155pfl.405.2023.06.01.04.41.55; Thu, 01 Jun 2023 04:42:08 -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=g9999PCh; 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 S232009AbjFALgJ (ORCPT + 99 others); Thu, 1 Jun 2023 07:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231970AbjFALgI (ORCPT ); Thu, 1 Jun 2023 07:36:08 -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 13500125 for ; Thu, 1 Jun 2023 04:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685619320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=g2HrdO1luTCQTFelo54c1HAUWB7J3N54nooptJdm2oE=; b=g9999PChwm6UiyIi5Bzd8wFXGWC9pul4cXVajMI3otlXQ42wPOokdHVX757Wy9ywHuUEBw KGYGnAwGtPkBMVFNdElnx9YGQocx03WxHhs148HZtoZFUQH9nmrb+4D4gLVM48fDnWzG8Z mZq8w1EErSGcqKd+TBwGcdV/eg6o3X0= 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-138-b71uj-mYOMqSwieJCWkpYw-1; Thu, 01 Jun 2023 07:35:16 -0400 X-MC-Unique: b71uj-mYOMqSwieJCWkpYw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 261D13C14111; Thu, 1 Jun 2023 11:35:16 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC97C8162; Thu, 1 Jun 2023 11:35:13 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20230530141635.136968-1-dhowells@redhat.com> <20230530141635.136968-9-dhowells@redhat.com> To: Paolo Abeni Cc: dhowells@redhat.com, netdev@vger.kernel.org, Herbert Xu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-crypto@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 08/10] crypto: af_alg: Support MSG_SPLICE_PAGES MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <822307.1685619312.1@warthog.procyon.org.uk> Date: Thu, 01 Jun 2023 12:35:12 +0100 Message-ID: <822308.1685619312@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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=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 Paolo Abeni wrote: > > + if ((msg->msg_flags & MSG_SPLICE_PAGES) && > > + !iov_iter_is_bvec(&msg->msg_iter)) > > + return -EINVAL; > > + > ... > It looks like the above expect/supports only ITER_BVEC iterators, what > about adding a WARN_ON_ONCE()? Meh. I relaxed that requirement as I'm now using tools to extract stuff from any iterator (extract_iter_to_sg() in this case) rather than walking the bvec[] directly. I forgot to remove the check from af_alg. I can add an extra patch to remove it. Also, it probably doesn't matter for AF_ALG since that's only likely to be called from userspace, either directly (which will not set MSG_SPLICE_PAGES) or via splice (which will pass a BVEC). Internal kernel code will use crypto API directly. > Also, I'm keeping this series a bit more in pw to allow Herbert or > others to have a look. Thanks. David