Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp641415ybi; Tue, 16 Jul 2019 03:05:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGhbjLiydCqMoy1jriH7qedxWteyMWaNz96WE3fkMhQWEZqi4ZF7lca7gv6mAs/TFdGHRF X-Received: by 2002:a63:fd50:: with SMTP id m16mr31993813pgj.192.1563271528445; Tue, 16 Jul 2019 03:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563271528; cv=none; d=google.com; s=arc-20160816; b=C/Mr40py3Et/jp9fU/twNX8axeF6JcEXSGd8/Lir4BIduVV2l8G4aY4EGSV2qrgYUW Mwzl6NhK3VRDAZwMaffDLEYHFoymLQKFeEj9TcORwqa1SNCKB8Eb6lYHkXTxQrLj4AHI 93QUMoU6AWr5hvxFCLzccwhfm6utcpoYyCSMUOYLTOrRXqGtBwTkZtD1coVOLGj+o2jn iKx3aJ5Fqza604vV5GlIvO2lpwKU/ETqN9+vKiGPmFd486PSurO5mCOtdQxXhpMcGRUh n/aTz8FU8pSZieNw7FhrRdeat/EmCOsV7fPSD0D0FpQGtSsyhALnpnP3Ivg4CKAZzbH1 BsUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=yu0S6e0vLLlo9x4OOZXO7QyVHbxTY1rTJrO5XkPLCT4=; b=ehWTGaRiitul6IajI2HrRZxkNM2mOkRQsfohS8y20hqnATyLzVv2Z4sKpZW0v5PL8C hP/aq6TQjQyCp8ut1tuK1uP3RaS2s75amKtf718iQlYXz13pbY/TVBE6zwRHS+a7Coc6 y6Q9aqy1kAtpwjv2OqS1BXYwmhyBZVeQXAY+eM3vMeHK9vPfhJnHU5NM7+KjRSdzoYTf VjLCqr6dEGH4tmvkUHxhSyzlJs6irUKF0vBQKNj/lXTZql8P9/gktqTKOgva6ijptS0o FbfDEyrG9U2hSLXdNDb6srqz9aIg4aM9DMbeBp8Qextd0XYXQfXKT1PMh6pS4Hk9fJ8K 8yfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si19139314pjv.80.2019.07.16.03.05.09; Tue, 16 Jul 2019 03:05:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728310AbfGPKFG (ORCPT + 99 others); Tue, 16 Jul 2019 06:05:06 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:49860 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728015AbfGPKFG (ORCPT ); Tue, 16 Jul 2019 06:05:06 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hnKKN-0002OT-MR; Tue, 16 Jul 2019 18:04:55 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hnKKF-0003tz-SN; Tue, 16 Jul 2019 18:04:47 +0800 Date: Tue, 16 Jul 2019 18:04:47 +0800 From: Herbert Xu To: Daniel Jordan Cc: Steffen Klassert , andrea.parri@amarulasolutions.com, boqun.feng@gmail.com, paulmck@linux.ibm.com, peterz@infradead.org, linux-arch@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] padata: use smp_mb in padata_reorder to avoid orphaned padata jobs Message-ID: <20190716100447.pdongriwwfxsuajf@gondor.apana.org.au> References: <20190711221205.29889-1-daniel.m.jordan@oracle.com> <20190712100636.mqdr567p7ozanlyl@gondor.apana.org.au> <20190712101012.GW14601@gauss3.secunet.de> <20190712160737.iniaaxlsnhs6azg5@ca-dmjordan1.us.oracle.com> <20190713050321.c5wq7a7jrb6q2pxn@gondor.apana.org.au> <20190715161045.zqwgsp62uqjnvx3l@ca-dmjordan1.us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190715161045.zqwgsp62uqjnvx3l@ca-dmjordan1.us.oracle.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jul 15, 2019 at 12:10:46PM -0400, Daniel Jordan wrote: > > I've been wrong before plenty of times, and there's nothing preventing this > from being one of those times :) , but in this case I believe what I'm showing > is correct. > > The padata_do_serial call for a given job ensures padata_reorder runs on the > CPU that the job hashed to in padata_do_parallel, which is not necessarily the > same CPU as the one that padata_do_parallel itself ran on. You're right. I was taking the comment in the code at face value, never trust comments :) While looking at the code in question, I think it is seriously broken. For instance, padata_replace does not deal with async crypto at all. It would fail miserably if the underlying async crypto held onto references to the old pd. So we may have to restrict pcrypt to sync crypto only, which would obviously mean that it can no longer use aesni. Or we will have to spend a lot of time to fix this up properly. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt