From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1893A3C8732 for ; Thu, 26 Mar 2026 10:32:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774521142; cv=none; b=CPC7P6PI4mJmdJjn9so9UEp9IdUIFdSvROhBOThyitoVnsY/dyDXYN0a0PrBlznTdYq9u63ZWX4fin2ryg1MsfzeebIYC+zWQRudpgpP76QdxdPZAklmWWTsIZELyF/bdkTDanx7m2T/Mp3utzafPVm/abrmlRfaNPLyIW6lH1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774521142; c=relaxed/simple; bh=LMfVNnrxJJd9gdlMkFmUVQdVmFGd4fGhz8RYFoXw1rI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=t/zCo/O5w8ATQytceLLyyNVyvKnQIdJ+b9C2L2l/FX4CE0wbZOMTtDdux05PB7E0L2rmH7vloJLhQcpmDfoyxIIcY/Z3tuB5CEty2ULQQlc4nBFNAtLLUNBDskCzTEsZydai9IryK8L/ENtW9bs6IxnOqpG5eVzWHc91Zmqi1fg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=XJT4ilsP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=PaVursrP; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=XJT4ilsP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=PaVursrP; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="XJT4ilsP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="PaVursrP"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="XJT4ilsP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="PaVursrP" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 276385BD9F; Thu, 26 Mar 2026 10:32:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1774521139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cALTDbWqnpT05rRD1IQCUi5i7gzg3zyuodKvM7itrYE=; b=XJT4ilsP49mNDgTZTdyTWWlgVHZmwfWuDPpPL5UADY+rdcV/PG4hjAhLoJRbc/ko6D/0fn Osh3kE+WOcTajQcCAKIWt+qomKimd7Cap5tceFoLmYZgzX+hNI32sR9bT7OeVhOGfi2QxC NhLShskVXMgOHZJn1iUrQGpw1QfL64k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1774521139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cALTDbWqnpT05rRD1IQCUi5i7gzg3zyuodKvM7itrYE=; b=PaVursrPWn7NbG2sOrLpTtT97P7uegQkv2TjeCjIIiqEswZQoD3rp679tP3TWyK82bD+sp b5U1d05c0cHKc7AA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1774521139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cALTDbWqnpT05rRD1IQCUi5i7gzg3zyuodKvM7itrYE=; b=XJT4ilsP49mNDgTZTdyTWWlgVHZmwfWuDPpPL5UADY+rdcV/PG4hjAhLoJRbc/ko6D/0fn Osh3kE+WOcTajQcCAKIWt+qomKimd7Cap5tceFoLmYZgzX+hNI32sR9bT7OeVhOGfi2QxC NhLShskVXMgOHZJn1iUrQGpw1QfL64k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1774521139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cALTDbWqnpT05rRD1IQCUi5i7gzg3zyuodKvM7itrYE=; b=PaVursrPWn7NbG2sOrLpTtT97P7uegQkv2TjeCjIIiqEswZQoD3rp679tP3TWyK82bD+sp b5U1d05c0cHKc7AA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 131BD4A0A3; Thu, 26 Mar 2026 10:32:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 54guBDMLxWnhLwAAD6G6ig (envelope-from ); Thu, 26 Mar 2026 10:32:19 +0000 Message-ID: <834dae72-fd21-4458-ba61-48fb36d05c6c@suse.de> Date: Thu, 26 Mar 2026 11:32:18 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v5 1/6] tls: Purge async_hold in tls_decrypt_async_wait() To: Chuck Lever , john.fastabend@gmail.com, kuba@kernel.org, sd@queasysnail.net Cc: netdev@vger.kernel.org, kernel-tls-handshake@lists.linux.dev, Chuck Lever References: <20260324-tls-read-sock-v5-0-5408befe5774@oracle.com> <20260324-tls-read-sock-v5-1-5408befe5774@oracle.com> Content-Language: en-US From: Hannes Reinecke In-Reply-To: <20260324-tls-read-sock-v5-1-5408befe5774@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.80 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_TO(0.00)[kernel.org,gmail.com,queasysnail.net]; TAGGED_RCPT(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[7]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo] X-Spam-Flag: NO On 3/24/26 13:53, Chuck Lever wrote: > From: Chuck Lever > > The async_hold queue pins encrypted input skbs while > the AEAD engine references their scatterlist data. Once > tls_decrypt_async_wait() returns, every AEAD operation > has completed and the engine no longer references those > skbs, so they can be freed unconditionally. > > A subsequent patch adds batch async decryption to > tls_sw_read_sock(), introducing a new call site that > must drain pending AEAD operations and release held > skbs. Move __skb_queue_purge(&ctx->async_hold) into > tls_decrypt_async_wait() so the purge is centralized > and every caller -- recvmsg's drain path, the -EBUSY > fallback in tls_do_decryption(), and the new read_sock > batch path -- releases held skbs on synchronization > without each site managing the purge independently. > > Signed-off-by: Chuck Lever > --- > net/tls/tls_sw.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich