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 E9AF0C19F2A for ; Mon, 1 Aug 2022 16:40:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232898AbiHAQkw (ORCPT ); Mon, 1 Aug 2022 12:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234245AbiHAQkt (ORCPT ); Mon, 1 Aug 2022 12:40:49 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B6E5F3D; Mon, 1 Aug 2022 09:40:48 -0700 (PDT) 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 sin.source.kernel.org (Postfix) with ESMTPS id E304BCE176D; Mon, 1 Aug 2022 16:40:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB6C2C433C1; Mon, 1 Aug 2022 16:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659372045; bh=ka1KQO7g3lQa9qYWoLj3EEBCib4PxRY+082o/dfbQnQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RbUUsyqEbREZcwQQd4MNED4pvd9uUOw9s1xkvRGamu+tggUC1xVk0kIMXXDP8eCf2 1LN6zOo0ruIlNH5/cAsC9SSRhtD9DXgAyZLoIusS/0BPCoJ0vGfWWn+X2OxYPaofwN 2aXvRYo1ttZ7E/EwGJDwL1+HoXhr0gozy5v3C6p3H2aFIWN18lm6Z6181zB8tGaEbz aHc4Co+z5UM3pjQy9H9/cocliBrRKAieTWzd9JCJvlAZcwpkZsMI5KA4mU1VbKiS0/ lwoNDnEZgEM85LX6r9albcAiEpaoHMhzTmEt+euWry54yqMuJae//xfrYLkc5E8NeQ Rb8/+18wmPlvg== Date: Mon, 1 Aug 2022 19:40:39 +0300 From: Jarkko Sakkinen To: Dave Hansen Cc: Kristen Carlson Accardi , linux-kernel@vger.kernel.org, Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , linux-sgx@vger.kernel.org Subject: Re: [PATCH] x86/sgx: Improve comments for sgx_encl_lookup/alloc_backing() Message-ID: References: <20220720182120.1160956-1-kristen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Thu, Jul 28, 2022 at 06:47:01AM -0700, Dave Hansen wrote: > On 7/28/22 00:58, Jarkko Sakkinen wrote: > > On Wed, Jul 20, 2022 at 11:21:19AM -0700, Kristen Carlson Accardi wrote: > >> Modify the comments for sgx_encl_lookup_backing() and for > >> sgx_encl_alloc_backing() to indicate that they take a reference > >> which must be dropped with a call to sgx_encl_put_backing(). > >> Make sgx_encl_lookup_backing() static for now, and change the > >> name of sgx_encl_get_backing() to __sgx_encl_get_backing() to > >> make it more clear that sgx_encl_get_backing() is an internal > >> function. > >> > >> Signed-off-by: Kristen Carlson Accardi > > The rename is unnecessary. > > Well, it was done to address some reviewer confusion: > > https://lore.kernel.org/all/YtUs3MKLzFg+rqEV@zn.tnic/ > > I wouldn't call it unnecessary. Heck, I'd argue that the one of the > main reasons that this code leaked memory in the first place was the > naming and lack of comments. Maybe the rename should be its own patch with this tag in the commit: Link: https://lore.kernel.org/all/YtUs3MKLzFg+rqEV@zn.tnic/ BR, Jarkko