Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5658668imu; Mon, 26 Nov 2018 03:39:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/URAInDN68Y+LjGirtvNzwpBW1oF2jJBnVx4BgezScfF05bCHGVBncRj7ZCteuTG/C5Q3VV X-Received: by 2002:a17:902:1745:: with SMTP id i63mr24389840pli.145.1543232364152; Mon, 26 Nov 2018 03:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543232364; cv=none; d=google.com; s=arc-20160816; b=vvI5yKOd6NsGnv4A4R0n+J30HSF6AOKvDM1hmjgWsMuqvAqPV4UGbuLC96LqsyBR+O U5bq526WqCRpUGv+EVCTDxmXhyg4kL/Z80SJaZMpSNxkL2z+yAN+EBuvv6yCeeY89+SG OD5jxJYpq+4/upfoxxhrH0WSKb7bFNAtzdiy9MnzUBgmagKBi8y4UqMhvo8ZEY9omSox 1/G/WEZ3aUVpekGyInZw8tv9ItscQUKIGOQIRsa5pehvflr5ZXUWtNXKwHjGUvlr+e4J NCrpiYfGB345s7Ap6yrSO1WJdGz2A3sjq6dZtyGRk+u4LcdZsVg3S/3lQhOPwpoW18eV XGQw== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=Z8XzU9F0w4mpIyg4lw6AUlhlAzE+KAv9MaHONrxV38I=; b=kOCLkcssMarVCkLsJBEy7HUIoYqIwjdvC+JrfH/syLRFJ7mQqedKi9OiScyA5O5u1W a3W73Lmg9Oyz56VFSHOgXTbTpQzWyQJhjYEUXRaIS2x0tKIHXw8u3S45rr8ZXvTeozVZ 3QQ2196czgbjNfbQMB0r6NJzQmF7hVGWFjeyi7DYj6EJffjXnx8NYbS3i4k938dMMBah RCxeMOa+5QzVeiLm5smBCnL10lHLWJV/IN5tT1me9QUzb/5TPhJem5TY0ePnrXGskps3 hC5dJaU/aguKPXjoQnwaJH+/F306fY3rxB/m0IeXbgcQ7GMAckQxfqOqdaAHVziVfZWO J1SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gLFo+uOd; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si24964pgj.558.2018.11.26.03.38.49; Mon, 26 Nov 2018 03:39:24 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gLFo+uOd; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726622AbeKZWbU (ORCPT + 99 others); Mon, 26 Nov 2018 17:31:20 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:47101 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726369AbeKZWbT (ORCPT ); Mon, 26 Nov 2018 17:31:19 -0500 Received: by mail-pg1-f194.google.com with SMTP id w7so6035927pgp.13 for ; Mon, 26 Nov 2018 03:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Z8XzU9F0w4mpIyg4lw6AUlhlAzE+KAv9MaHONrxV38I=; b=gLFo+uOdS8Vido5xeuuE5MS4XJ1/V9KtV5MnQfrhhP/ohoVSuPvoGWRRMdeI3/fRGK LjBM7sLyqqGvde4Enfa9u6dN09J3887ARme6OBMrsCnIdITWt9+C0pBFpIXH4xDe/FeX XUQ3LbCxnrqmCw+yEcUOB1DsNjVLyQX9rYi3vB0Dh2EZBz7HObrY3eyWfc4dPBJvfrHN uSCq2HBZdk72vLLbyNXv5bgrH1OYXRbwZEeJdfRMsAKfYzoWtahWJnIwtlR3e9U8ZY2V qUgKJy8F6KynVjZECJWV7I4HwsZvU3AiV2Qjb9qWauhU9UjcMQRVLfJCJVmT+erBk9NQ yjUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=Z8XzU9F0w4mpIyg4lw6AUlhlAzE+KAv9MaHONrxV38I=; b=MoBmzTU0L+Mz8gm6NzyxZXQgtDvAN9Hso/d5p0m9fy46VQ+32UrZQNWwfCok/NGv79 j9wyav3/YW8udBwpneQUOlhXlLGSP+F2nyVEkFrwnc0w3ifBEinjfudAQt6ZbASpbJQP QjtavIb7pMPdIHpaXGLYu48Bd77/WMVpoHnqIoTsCvIBwKYqwtO8KcLzlf9lZGer18OC 3q/1xGvjkzVnMsG/X+mH/8s0rAj4pdFURzDWrGcsIlskxhRaZ3zAQEWJOTWQ6TpySayM Zi1kaV1FBDFFB6HQLYC0c1n0EkPEkvObBBFv4ahyvfhyID9N4DpSxS+OcFqc5JDYL7BH a5kQ== X-Gm-Message-State: AGRZ1gLPITOzktm9SjOK6vGfBABChXfd8pgKnG739tBLP0D13BKwuc52 QTYnIa6wd0Kmx/PXteIH/AY= X-Received: by 2002:a63:2d46:: with SMTP id t67mr25019528pgt.140.1543232247359; Mon, 26 Nov 2018 03:37:27 -0800 (PST) Received: from gmail.com (cpe-98-150-136-16.hawaii.res.rr.com. [98.150.136.16]) by smtp.gmail.com with ESMTPSA id x7sm101853pga.68.2018.11.26.03.37.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Nov 2018 03:37:26 -0800 (PST) Date: Mon, 26 Nov 2018 01:37:24 -1000 From: Joey Pabalinas To: David CARLIER Cc: linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com, aryabinin@virtuozzo.com, Joey Pabalinas Subject: Re: [PATCH] Little memset_explicit optimisation Message-ID: <20181126113724.svbv6np25fzxkhrm@gmail.com> Mail-Followup-To: Joey Pabalinas , David CARLIER , linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com, aryabinin@virtuozzo.com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ues3xolvxrd43lmw" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ues3xolvxrd43lmw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 24, 2018 at 12:35:43PM +0000, David CARLIER wrote: > Using the return value of memset for save/load sake. >=20 > Signed-off-by: David Carlier > --- > lib/string.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 =3D memset(s, 0, count); > barrier_data(s); > } > EXPORT_SYMBOL(memzero_explicit); Could you elaborate on the optimization that this patch performs? --=20 Cheers, Joey Pabalinas --ues3xolvxrd43lmw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEENpTlWU2hUK/KMvHp2rGdfm9DtVIFAlv72vMACgkQ2rGdfm9D tVJr9Q/+LUn12Ov3tI8izc5J2EKpfM11GDqdt0K5QW/z5bNhn8PDXqy8VcNjww7I 58XkpvXphDy+zBUjVs3HGtEJnMDfP85g7xA784HomWoMt/QrmiiIYzuphOoVLpb1 iw2/ExifO11otq7NDHWTeMYuiVQ4xadc/D47lP/ADzzcRo0EWy35xcVIp9U1oJgT HwNyOq5vda/j01TEnHRd91Psh2kIHdNtpQ6f6U3t0eQ0Mx3O5ymCEfemFgWFPP0r sD34T4lhfQ29LcK4lyabj2DpIE3+3wOb6UOTILRaHNrSJKhfmNVvqmzy9jT/ZDLF oEl4XtaPWoYMkuRGC7GQRfR8cwdHdwUlnvypwKru8a+2tP6M3P83U6XB4lCvVGnv q9nGwZqltwfOCuwHqdJ20OSA1wBtV/jy2YxVPVWf0w3L2UOqVUmBrMa7jhRzSh5j +dCKg/MqyAxnzX4EWVapZN/FV8pd4jjOiAD0UWp9ZOkOLndxYLgzbGplzp6Yut+8 RG9EDI0Da3L5hcyhh0eNY4ReoQDzqAoxZzdNZRf79jj63m/jLpCTcCbs9IdYPy9E A/xol1K/I8qp8hxzo1EVqGZFU5t/Wz3KSNaaWGmkt0/19XvPKoHDyv0z3UkEuwZb 2Vs6lNLl4gDQkweKLq5o10lHAgEW48s5n4TliECd3ZZjSLNRkyQ= =zYWT -----END PGP SIGNATURE----- --ues3xolvxrd43lmw--