Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp702599rwi; Wed, 19 Oct 2022 01:37:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6I+tFAA33yL+h4OMzygemdcI2lsqlJsyFikSnngOPKH8TLV5kt+pVJlraL0A8Qq+BuyadZ X-Received: by 2002:a05:6a00:4093:b0:563:2d96:8f44 with SMTP id bw19-20020a056a00409300b005632d968f44mr7372360pfb.4.1666168679408; Wed, 19 Oct 2022 01:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666168679; cv=none; d=google.com; s=arc-20160816; b=nfASI+R4Xx630JsTYRDx2oo4SmUehkhuKmqeDamGIJKpAOXq12F9nShQzz6l0GbqUh dKw1ynK4Zo4r0eGc/81rpItNzkpM36iQ7bnD0j3OUzzmaX8X3ohxrZbhE52MB2W40MFy qg1acrXwwvxNQ3ePn1kMAdUTQNtw3G+AxzTX759Zb9Zr3OIFumPvjwkvxbzQT36L1HhL vANilPz3w/MugvF4gvhVjeC8JS4nWnY6JsqQllSID3RaVtxvdYoAJ0hmVsXzV2TQGKMl d6we411wyLSjaNStpxzmt3Z6KamT0EvERopjOgDgPyt6h/hUR0IBLxS2HdTR2dVjV5oE m2/g== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=OnRTNV6BJLlEJNjkgcYAe4uit2FAkqV3YDM031DnAjE=; b=aT3SoQ5s35jTxrAzD6UuKNDOWzH1l/hsdyRv+2HrfYUCphkqPSApLJv2GxfLyr9zJJ jA8T5+aPYKVq8Cr5Wpey0/xSb+sczaKL95MyECEq2C6GeYazaD0+Ue4XmzzjOeAhHe80 eRTVOTU9k8uV7bFun4/VZJXmZ34mtkbJTdME//FvgHU/VAI18KhS+GLNQE5ObqlnocaT e9u5GYHZ8fca3JvR4FWF9DY2tNXKvb4vJ8L5daBBTHqzbd3iDjE5GeunSv8H0bVjZ7nw HQiCN8MrECvh5U/i7u9ALr1UeVloD216+4ODyAu5PA2P5kI4PgPDiWPciHzZ4T1kX9Ar RlEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=qdw21VjJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=xKJYrZFc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k36-20020a635624000000b0043f06af782esi17527193pgb.304.2022.10.19.01.37.34; Wed, 19 Oct 2022 01:37:59 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=qdw21VjJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=xKJYrZFc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbiJSIhX (ORCPT + 99 others); Wed, 19 Oct 2022 04:37:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229592AbiJSIhW (ORCPT ); Wed, 19 Oct 2022 04:37:22 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D8975FF70; Wed, 19 Oct 2022 01:37:20 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 51CC72036B; Wed, 19 Oct 2022 08:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666168638; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=OnRTNV6BJLlEJNjkgcYAe4uit2FAkqV3YDM031DnAjE=; b=qdw21VjJrnUFHHve/t0gJpZJrl62EO2IZSnjlOAoITfWFEkT0wpCEuSbRCqVZ9vmZXb3y0 x56RQLq+J70YeXXpA2v3tuQvylQx6txaPSegsN6SboM3fwSfttzOd3H3X09O/LZoBJ58oN fr2xkdlVhofeo9oW/ZbtnBd/fRUkTzo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666168638; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=OnRTNV6BJLlEJNjkgcYAe4uit2FAkqV3YDM031DnAjE=; b=xKJYrZFcwpB00oIPj6Yk7HYJL59Obnxgk8Jw2A58hltPHw4q8T0IssWxG+RVIqTyR21Eho IFV7pgcjnpXexVCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 408DD13345; Wed, 19 Oct 2022 08:37:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Api1Dz63T2M/ZQAAMHmgww (envelope-from ); Wed, 19 Oct 2022 08:37:18 +0000 From: Nicolai Stange To: Steffen Klassert , Daniel Jordan Cc: Herbert Xu , Martin Doucha , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolai Stange Subject: [PATCH 0/5] padata: fix liftime issues after ->serial() has completed Date: Wed, 19 Oct 2022 10:37:03 +0200 Message-Id: <20221019083708.27138-1-nstange@suse.de> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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-crypto@vger.kernel.org Hi all, this series is supposed to fix some lifetime issues all related to the fact that once the last ->serial() has been invoked, the padata user (i.e. pcrypt) is well with its right to tear down the associated padata_shell or parallel_data instance respectively. Only the first one, addressed by patch [2/5], has actually been observed, namely on a (downstream) RT kernel under a very specific workload involving LTP's pcrypt_aead01. On non-RT, I've been unable to reproduce. The remainder of this series, 3-5/5, fixes two more, somewhat related, but purely theoretical issues I spotted when scratching my head about possible reasons for the original Oops. Thanks! Nicolai Nicolai Stange (5): padata: introduce internal padata_get/put_pd() helpers padata: make padata_free_shell() to respect pd's ->refcnt padata: grab parallel_data refcnt for reorder padata: split out dequeue operation from padata_find_next() padata: avoid potential UAFs to the padata_shell from padata_reorder() kernel/padata.c | 129 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 96 insertions(+), 33 deletions(-) -- 2.37.3