Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1613270ybt; Mon, 15 Jun 2020 05:08:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvkVFs8m6vamEMvvgjH6Eebz+uqXyMgu84JBEkDmB0WfCms5a+FK2Ezllc/ZaB9IMcnc+E X-Received: by 2002:a17:906:4c81:: with SMTP id q1mr25688312eju.273.1592222884051; Mon, 15 Jun 2020 05:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592222884; cv=none; d=google.com; s=arc-20160816; b=nolYtuRf6n6sZ1D3zrrO3W0htDvomwM10Mj8saNJs81B08cSnwP0czOg/2yb4a4Ygf 4owM3B5jeDdg+9ATWZj2hdx0PKcx7V4HlLvAYFk6kgk+m4oIJgl+2mDtkUuNo5TAcCUh pXfiF+Ny4097Ap39JP9O2OTfRCRngSJszHM2ggHypE1GoA/F8rv3jt0ZPlywIBVhNss2 UveapIVnfqf/0x9pIKFA5h8WOdzi9QZ5gtWlSpNNb0I1a1MC3dqzHX4vY/8BG/ZLmpf8 P6g1kauCYQy47xhTc2LoHJvzVBwCp0y+N/CrH0GbndLdsDyi0EzIn8VtAI1OXTnoJVll TONw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1ZyfpjNW70O/reszk5u6HkvTyC7DS0UPZqomeyJuQ8E=; b=LGZB6SjTjcQw4Tkjg3bZduWSEHMrqib960D8fYVTET0i8kWNq7gt50Xr2HGvcgdy09 hPtpB0yDmXFAXS56bv5wTSZMRh7E80rRAe9nF/kOE3DTHYSS4LP66AU38ecHWLcwpXzZ 3z5VSxYV92ii7VGb4JFy/7ykHmd2VmxPjn+1L/ejYcOqinI4XWPPp996FBGoXaPV8PvZ H7BEoupIYYTWuG8RVLcZvNGwMiPmUo9UOVUMD9iPZNC5l4unv/SL5xjr1UoPCtqHbfwG ycnVUYuBhnbBdigtBShNvQHXOnTB4fAKVAaUGTrSTDfMmrFQw8P1TioS2ERQ/onT2tB4 ppGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=c88CDHOE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si7967917edq.229.2020.06.15.05.07.41; Mon, 15 Jun 2020 05:08:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=c88CDHOE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729761AbgFOMFx (ORCPT + 99 others); Mon, 15 Jun 2020 08:05:53 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:36666 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728510AbgFOMFx (ORCPT ); Mon, 15 Jun 2020 08:05:53 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05FBuhUj185278; Mon, 15 Jun 2020 12:05:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=1ZyfpjNW70O/reszk5u6HkvTyC7DS0UPZqomeyJuQ8E=; b=c88CDHOEdp4q5gpgtUJ8XS5PjNzV9xNwM1feZaL2UGm5DCNhARFHYxa3YwFHMfJbbeOt nkVSWIysGkdzeqwWub0LCOjjR0WG7KiIEQamrKSW7rHgDiJTuH9710h6jWyIbM7DPwDp F6UtyugpPQCuu0C6aQ/8NqjXF+ejhtA3jRxhZHd1SLBIk9CmZp6I61f2QTyRt7ghyxw6 CF6bgMCRq3T8C/laEoXdyroxOb5Sn9Kesi0HL33QaM+dZjHoHMuE22sv2tED+TOT9gef XJu5Djbpnd4sI0WgQigMGtmu6SJ1qB3i3Z2xS4AScxKzh9KaYOCQP21ykKARUesU1f8e cQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 31p6e7rn6k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Jun 2020 12:05:43 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05FBxGj5153699; Mon, 15 Jun 2020 12:03:42 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 31p6darng0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jun 2020 12:03:42 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 05FC3eWw012453; Mon, 15 Jun 2020 12:03:40 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 15 Jun 2020 05:03:39 -0700 Date: Mon, 15 Jun 2020 15:03:32 +0300 From: Dan Carpenter To: Denis Efremov Cc: Joe Perches , Julia Lawall , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coccinelle: api: add kzfree script Message-ID: <20200615120332.GJ4282@kadam> References: <20200604140805.111613-1-efremov@linux.com> <345c783b-a8cf-9dd1-29c6-d32b9b29053f@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <345c783b-a8cf-9dd1-29c6-d32b9b29053f@linux.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9652 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006150097 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9652 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 impostorscore=0 bulkscore=0 clxscore=1011 malwarescore=0 suspectscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 lowpriorityscore=0 cotscore=-2147483648 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006150097 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 14, 2020 at 10:42:54PM +0300, Denis Efremov wrote: > On 6/4/20 7:27 PM, Joe Perches wrote: > > On Thu, 2020-06-04 at 17:08 +0300, Denis Efremov wrote: > >> Check for memset() with 0 followed by kfree(). > > > > Perhaps those uses should be memzero_explicit or kvfree_sensitive. > > > > Is it safe to suggest to use kzfree instead of memzero_explicit && kfree? > Or it would be better to use kvfree_sensitive in this case. > > kzfree uses memset(0) with no barrier_data. Yeah. That seems buggy. It should have a barrier. Also I thought I saw somewhere that Linus doesn't like the name and so that's why we have the _sensitive() name? regards, dan carpenter