Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1108241ybc; Tue, 19 Nov 2019 14:45:13 -0800 (PST) X-Google-Smtp-Source: APXvYqy74rP08/GqOmqOBC+ZVMBJvaVUKhYMFE4r9zhsudhYfnisGZT9KMqTb5tCnHU1MOfWuIP4 X-Received: by 2002:a17:906:fcdb:: with SMTP id qx27mr122540ejb.255.1574203513456; Tue, 19 Nov 2019 14:45:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574203513; cv=none; d=google.com; s=arc-20160816; b=aDQc+qNpGVmqs4ViE452WsYbxC8xnElpvWKyxetLiVBiZUE21p7vNpXCV8expFkVGw 3Nme0gsoh7Q+RpZBrxvqprW3acVh9RCkg7sE8J0ExYS3XtJaHzni6YmZSesDlRZJuip7 h/7Y4/in9q7156ndiY+4FUhXxQUQzfWTZwMhIugg6SgHegVRehvafjVdbX/YvfMtcaF4 8RAsMjBBo7W2oRZCIOhbjVAdzof07eM3bX+h2tVkjUYnTBZzT3PmPdOaD4u4/6kiZNVG tygeNVyCGQ8Kp6Xg86YuQ7zM7qls6cgWOPnvLV79RxR88QCRfiCj9jaVMQ3h9Kik6MHB m5Fw== 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:dkim-signature; bh=RmelXEZbfZTrI5HxtJpeK/xmE6iGKJe/MNPcP/qSWPg=; b=hOrY+pB0pC1XzgpdDZOmzJu667Cfw0n8xaKEaUBAE4NMZyj4dEPGAC9cFQNMnLoOS2 4ZXfB7o+roCTKfIKyaVfDyB1RDxbQpBUHFG1gB/zceT+iUsE39b4Xs/7W+2IZbSCYI3W mSPhLGJkg11TPPGbmplYkH4sX7ggMXO6+DsxX1r6kUJLBwfD255k8l/mzkHTVZo6lIfG BXMgJddQmb0kBPLQ4n/ygucig1KTreKE+9FQx1BDKgdFl/vijGzoRtc4Nejp/xE9sm/9 2or7IZiSWIe4Wjeiz45vDE6hQy0M5siM8tuLXHYwgFVTbu+feCehE2syk+1b1/alaet4 29hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=iVRGnON8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i14si15764050edr.68.2019.11.19.14.44.43; Tue, 19 Nov 2019 14:45:13 -0800 (PST) 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; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=iVRGnON8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726196AbfKSWok (ORCPT + 99 others); Tue, 19 Nov 2019 17:44:40 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:44514 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbfKSWoj (ORCPT ); Tue, 19 Nov 2019 17:44:39 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xAJMYKek039172; Tue, 19 Nov 2019 22:44:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=RmelXEZbfZTrI5HxtJpeK/xmE6iGKJe/MNPcP/qSWPg=; b=iVRGnON8CERyIYt+MTEPXrciGh3m0G4aCo2y4vfGQXrC6dMsiQPN7v6veXrqjA4fJgtZ FeX1rBe2E5tSNezAr2xTFP2xNWAjSfaEP18kzqEpSUZzbjkWlIO2pB75zulRbFUycHGn GyUWRdzByhmbPSi68y21jaGzVfAHQ4ix8/kR1LCb1oOVSnX73Px1uCXZjTSi8MWj8V8+ AkVS/iI8r/kqLrcKlwM/BvEimLufVsmMYeb7cjCEdBh4Jnw/GQQl6lo62nOcPg+xtxmT N3qz+zelma2Q6kX2qJqbjuXGyxjA9eIiyj2UpHoZ1SDcbXoLU49HaF4R/mY3Atdy+Z8n KQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2wa8htt52v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 22:44:32 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xAJMceJM170085; Tue, 19 Nov 2019 22:44:32 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 2wc09y5jyh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 22:44:31 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id xAJMiUPU019553; Tue, 19 Nov 2019 22:44:30 GMT Received: from ca-dmjordan1.us.oracle.com (/10.211.9.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Nov 2019 14:44:30 -0800 Date: Tue, 19 Nov 2019 17:44:32 -0500 From: Daniel Jordan To: Herbert Xu Cc: Daniel Jordan , Linux Crypto Mailing List , Steffen Klassert , linux-kernel@vger.kernel.org Subject: Re: [PATCH] padata: Remove broken queue flushing Message-ID: <20191119224432.vr7lyoaqdzpelszo@ca-dmjordan1.us.oracle.com> References: <20191119051731.yev6dcsp2znjaagz@gondor.apana.org.au> <20191119192405.imfi6q4u3g2zgstc@ca-dmjordan1.us.oracle.com> <20191119215345.jr7y47b37ivshwcm@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191119215345.jr7y47b37ivshwcm@gondor.apana.org.au> User-Agent: NeoMutt/20180716 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9446 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1911190180 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9446 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1911190180 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Nov 20, 2019 at 05:53:45AM +0800, Herbert Xu wrote: > On Tue, Nov 19, 2019 at 02:24:05PM -0500, Daniel Jordan wrote: > > > > __padata_free unconditionally frees pd, so a padata job might choke on it > > later. padata_do_parallel calls seem safe because they use RCU, but it seems > > possible that a job could call padata_do_serial after the instance is gone. > > Actually __padata_free no longer frees the pd after my patch. I assume you mean the third patch you recently posted, "crypto: pcrypt - Avoid deadlock by using per-instance padata queues". That's true, the problem is fixed there, and the bug being present in bisection doesn't seem like enough justification to implement something short-lived just to prevent it. > We should also mandate that __padata_free can only be called after > all jobs have completed. This is already the case with pcrypt. Makes sense to me, though I don't see how it's enforced now in pcrypt. I'm not an async crypto person, but wouldn't unloading the pcrypt module when there are still outstanding async jobs break this rule? > In fact we should discuss merging padata into pcrypt. It's been > 10 years and not a single user of padata has emerged in the kernel. Actually, I'm working on an RFC right now to add more users for padata. It should be posted in the coming week or two, and I hope it can be part of that discussion.