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 E4C12C46467 for ; Sat, 7 Jan 2023 20:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232649AbjAGULj (ORCPT ); Sat, 7 Jan 2023 15:11:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230092AbjAGULa (ORCPT ); Sat, 7 Jan 2023 15:11:30 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 206F1C1 for ; Sat, 7 Jan 2023 12:11:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673122286; bh=2jAWUHpZvG9WVuKVdH4/vwk9rrSIoQjgFwnQvFJzt2s=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=IYYpVMBy5dmCuZ4rVG8wPfx8XAqDH3bEm3Do3QGYY3GQ/l/ZxChDCNeIwcS2YkSkw voZ+Wd79S12PZjrqYdBCPfpRohUKuEwf59r48qRdSx4ERm7e/iVhNJkyDamn49YdG6 +h7eUmbYfxRYY1Jw/lDgqe8qmnZ2JPZ763rCoX5o= Received: by b-2.in.mailobj.net [192.168.90.12] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sat, 7 Jan 2023 21:11:26 +0100 (CET) X-EA-Auth: 4l5+Xe6Ly/VAYW6moYYL7Yx7Ru1d5vZaMwThYkslI9LWlt5Jg0CSvmdYol5TWm30bYf01yHcJhqI5GGdVLA26iavnqIHHJLm Date: Sun, 8 Jan 2023 01:41:18 +0530 From: Deepak R Varma To: Evgeniy Polyakov , linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar , Deepak R Varma Subject: Re: [PATCH] w1: Use kfree_sensitive to clear sensitive information Message-ID: References: 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-kernel@vger.kernel.org On Fri, Dec 23, 2022 at 04:09:22AM +0530, Deepak R Varma wrote: > Replace combination of 'memset(0) + kfree()' by kfree_sensitive() as it > prevents compiler from optimizing away from zeroing out memory at the > end of a scope. kfree_sensitive() is also safe in case the memory > pointer turns out to be null, which simply gets ignored. > > Issue identified using kfree_sensitive.cocci coccinelle semantic patch. > > Signed-off-by: Deepak R Varma > --- Hello, Requesting a review and feedback on this patch proposal. Thank you, ./drv