Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp425434rwd; Wed, 7 Jun 2023 01:42:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ69lVt0bExIZU3WGR5YUPMFYf8mzdcWSWFoW/6wEkE8JN0dhm51sT2Vz86uqR8o22x0uPPO X-Received: by 2002:a05:6a20:7f8c:b0:116:696f:1dd1 with SMTP id d12-20020a056a207f8c00b00116696f1dd1mr5142330pzj.4.1686127358176; Wed, 07 Jun 2023 01:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686127358; cv=none; d=google.com; s=arc-20160816; b=ntgq6lPvGfwCwk3J1kyj68J+hfwVkzlcza13jAO552AMvN/jwUdeldzRSOw/KRinD+ z0nQyXHTUJZvNY3jHv+MtjKnHmldKI9wi9h72SJSsY1dGeefowm7kuuJQ3T/hoo20ONM 71LdE1VJYOkkaapxlsMvp2Ne4PhOEMOGQHHospgMDj90zbnlsqAG/mFHUHqBtUZmSl96 H0yeckc2DlIESqBkrE7vFIms7lO2usaMzBrP5syuTnrobzyTGRvM95SzWfSFd5TEgtaO m3tNJ0tXUs8F5N7wnnqOrUrnsxpto8RXAZLeOOvqcf4VcZwMDDan/UQh5R4OKgpk+AMk cVew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=AgF7Nf7XvVlI+9gtCxrJKyAbFzhNzMJ3/y4DzrxtxaE=; b=vACcK5ct2nc1EPXgEVnakDsEUNTzL+tQDm+WefaYh6e5CcFQAuON7jYcX4k7yK7Mn4 HLVzLMDburnY/5MlNkU5PYlGfXhgTNZXkr2PP2lnFVoH5a53RTxJ/TKC9jM4RkIhZhr7 j2gImjKjL+LrZrXH9uZD9Gs21LCLkG6JEHL/5OAmQxlE3fyLiMIE8xETPsmD2MUQMXX5 k4Mx/4G091ssGDmSBfDspl2/JvlN9vcgTSWbFdx/EKybNwF86A21wcdPUg6ZPbYPjlR+ 34mnR/mME+nrUaG5/EDzy3q/w3j8mZeIwi+TgIq7Uotm0aCm0nb+xAv+dYNq1yqBNpjD cn/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f22-20020a633816000000b00517a2ca5ecbsi8573883pga.692.2023.06.07.01.42.20; Wed, 07 Jun 2023 01:42:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235674AbjFGIlI (ORCPT + 99 others); Wed, 7 Jun 2023 04:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238524AbjFGIlH (ORCPT ); Wed, 7 Jun 2023 04:41:07 -0400 Received: from 167-179-156-38.a7b39c.syd.nbn.aussiebb.net (167-179-156-38.a7b39c.syd.nbn.aussiebb.net [167.179.156.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01907173A; Wed, 7 Jun 2023 01:41:03 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1q6oia-00075p-Kc; Wed, 07 Jun 2023 16:40:37 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Wed, 07 Jun 2023 16:40:36 +0800 Date: Wed, 7 Jun 2023 16:40:36 +0800 From: Herbert Xu To: David Howells Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , 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 v3 05/10] crypto: af_alg: Pin pages rather than ref'ing if appropriate Message-ID: References: <20230606130856.1970660-1-dhowells@redhat.com> <20230606130856.1970660-6-dhowells@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230606130856.1970660-6-dhowells@redhat.com> X-Spam-Status: No, score=2.7 required=5.0 tests=BAYES_00,HELO_DYNAMIC_IPADDR2, PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS,TVD_RCVD_IP, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Jun 06, 2023 at 02:08:51PM +0100, David Howells wrote: > Convert AF_ALG to use iov_iter_extract_pages() instead of > iov_iter_get_pages(). This will pin pages or leave them unaltered rather > than getting a ref on them as appropriate to the iterator. > > The pages need to be pinned for DIO-read rather than having refs taken on > them to prevent VM copy-on-write from malfunctioning during a concurrent > fork() (the result of the I/O would otherwise end up only visible to the > child process and not the parent). > > Signed-off-by: David Howells > cc: Herbert Xu > cc: "David S. Miller" > cc: Eric Dumazet > cc: Jakub Kicinski > cc: Paolo Abeni > cc: Jens Axboe > cc: Matthew Wilcox > cc: linux-crypto@vger.kernel.org > cc: netdev@vger.kernel.org > --- > crypto/af_alg.c | 10 +++++++--- > include/crypto/if_alg.h | 1 + > 2 files changed, 8 insertions(+), 3 deletions(-) Acked-by: Herbert Xu -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt