From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 368DFC6379F for ; Tue, 7 Feb 2023 07:10:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230520AbjBGHKX (ORCPT ); Tue, 7 Feb 2023 02:10:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbjBGHKO (ORCPT ); Tue, 7 Feb 2023 02:10:14 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CF1C2278C; Mon, 6 Feb 2023 23:10:13 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0B2E2B81716; Tue, 7 Feb 2023 07:10:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B308DC433D2; Tue, 7 Feb 2023 07:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675753810; bh=VvGaQpQYZUpL7fyQlSvZZVk0dw3V7tJuaCipJTwS3LE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gwRQHVQZXXLf3IlUyHa5iYI2x/L5N7XSGYnPzfWftS3FkFJWWNX+ramJHM7xTarTG Fgushcdoy4VOIDfg3VQQQP4kIog7p+H4L7o0VDY8qDErtqPifDnrXgsxt9OHBq+iXU I+S2kZQxITWQawon3Y5XMWeCmkTMQeQWFEXIZexhWPhnRKWfoHqhVjcICME87wNn1j rrdd7K9B89hrQH7I8AO1EhiPCvkz74PSxs/U3JkKrspeJ77s1MWJpgxWFSz/e7yKmh MgLTIhjDdW1JgOzu4Id1uQgkVRk19vXWNxZfbgtxWkE9czEOtwQfd002OTaqr5Gg4s N82CH80wcAS1g== Date: Mon, 6 Feb 2023 23:10:08 -0800 From: Jakub Kicinski To: Herbert Xu Cc: Linux Crypto Mailing List , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, Tyler Hicks , ecryptfs@vger.kernel.org, Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, Steffen Klassert , Jon Maloy , Ying Xue , Boris Pismenny , John Fastabend , David Howells , Jarkko Sakkinen , keyrings@vger.kernel.org Subject: Re: [PATCH 0/17] crypto: api - Change completion callback argument to void star Message-ID: <20230206231008.64c822c1@kernel.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Mon, 6 Feb 2023 18:21:06 +0800 Herbert Xu wrote: > The crypto completion function currently takes a pointer to a > struct crypto_async_request object. However, in reality the API > does not allow the use of any part of the object apart from the > data field. For example, ahash/shash will create a fake object > on the stack to pass along a different data field. "different data field" == copy the value to a different structure? A bit hard to parse TBH. > This leads to potential bugs where the user may try to dereference > or otherwise use the crypto_async_request object. > > This series changes the completion function to take a void * > argument instead of crypto_async_request. > > This series touches code in a number of different subsystems. > Most of them are trivial except for tls which was actually buggy > as it did exactly what was described above. Buggy means bug could be hit in real light or buggy == did not use the API right? > I'd like to pull all the changes through the crypto tree. But > feel free to object if you'd like the relevant patches to go > through your trees instead and I'll split this up.