Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5653216imu; Mon, 26 Nov 2018 03:34:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/XzAxqvbfZdA20oc5FlvIiENfRkrx5Ef2mPys9jJKsIYPFGnygci16ZPPoWSMFXxZG/WlXj X-Received: by 2002:a62:4b4d:: with SMTP id y74mr26047402pfa.186.1543232076751; Mon, 26 Nov 2018 03:34:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543232076; cv=none; d=google.com; s=arc-20160816; b=ZkYPvPp/9csMFXfezwtuV1+dI3K2VVshY8xoporyc6SeoqoRHcULD6c0ef8p1RQ8uF C+8YTwAUtNWpcblzzqhyn6xxqtQInuh3jIwrzwUQLdK5K7nn9eH4zm3SMAvLP9Qr9Xha cITzdCiqkaO/5j1raldBQxAALkqTRVg+xirnJrhw8Rt5q1bswAPAP5n5p0IXJsP6kpeJ u4FP+EJGaV2ERE47TJS3HGCO+bhV/eSHGEE5GbpFfAeZPDwyqvqY0YxW752jPmaAlgl3 1v2ImX5SlH/RzdWk5UwclPD4LWm+VRtanO86t2fi0Wr28jiRDW8+Br0rP03Ztnhqf4Xn IElw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Mi+c6q+dboRiX7Gd+I7n5WxlElR/5jOopEc1CYFz2Bo=; b=SWZbAK6I2oOaRcgN0VBRJdwo8JrPx93SoilMn1SOsTWpXab+6G8VJtDknYd08wqCHM ix6UNeXpLcxXa5RXSdVlFbrF2CUnoT/McYdIg54YuJmCO3d97pYZ1bGIPrZaLPkNwjsm GAE+uRNGsYDQZOOoLrZNe1BX4WWCb7/GEpImp8h35c5TowczAr9/lIpYFAoTLROlOMQe YFgVfDS88QKYxMgQVXfGSapMu9k7TsTuLOu2VGtfkFb7CksxESUMn5T4kmcunpEQ9iCy Q/BjsrVDi5yIzVZWAQu/hAKvIxBsc2R058Gqr4WKezGV/nqMq6gLnrYlW6vhlS6UFtPB 5Eow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h20si11738pgm.366.2018.11.26.03.34.01; Mon, 26 Nov 2018 03:34:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726412AbeKZW0k (ORCPT + 99 others); Mon, 26 Nov 2018 17:26:40 -0500 Received: from mga17.intel.com ([192.55.52.151]:20365 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726241AbeKZW0k (ORCPT ); Mon, 26 Nov 2018 17:26:40 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2018 03:32:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,281,1539673200"; d="scan'208";a="99184288" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by FMSMGA003.fm.intel.com with ESMTP; 26 Nov 2018 03:32:48 -0800 Received: from andy by smile with local (Exim 4.91) (envelope-from ) id 1gRF8B-0003KU-0z; Mon, 26 Nov 2018 13:32:47 +0200 Date: Mon, 26 Nov 2018 13:32:47 +0200 From: Andy Shevchenko To: David CARLIER Cc: linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, aryabinin@virtuozzo.com, gregkh@linuxfoundation.org Subject: Re: [PATCH] Little memset_explicit optimisation Message-ID: <20181126113247.GD10650@smile.fi.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 24, 2018 at 03:35:05PM +0000, David CARLIER wrote: > Subject: [PATCH] memzero_explicit, optimisation for size. > > > Using the return value of memset for save/load sake. It's mangled, you, perhaps, need to use `git format-patch ...; git send-email ...` for sake of correctness. On top of that, same comment as per previous attempt. Btw, you need to use versioning (hint: `git format-patch -v ` IIRC). > > > Signed-off-by: David Carlier > > --- > > lib/string.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > diff --git a/lib/string.c b/lib/string.c > > index 38e4ca08e757..92da04a0213b 100644 > > --- a/lib/string.c > > +++ b/lib/string.c > > @@ -720,7 +720,7 @@ EXPORT_SYMBOL(memset); > > */ > > void memzero_explicit(void *s, size_t count) > > { > > - memset(s, 0, count); > > + s = memset(s, 0, count); > > barrier_data(s); > > } > > EXPORT_SYMBOL(memzero_explicit); > > -- > > 2.19.1 -- With Best Regards, Andy Shevchenko