[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGXu5j+xz8_wkY2rVRML_iq1o7ZoF1jVp2mi73LjxaKuMNw1cw@mail.gmail.com>
Date: Tue, 12 Feb 2019 09:54:38 -0800
From: Kees Cook <keescook@...omium.org>
To: Alexander Popov <alex.popov@...ux.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Laura Abbott <labbott@...hat.com>,
xen-devel <xen-devel@...ts.xenproject.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>, intel-gfx@...ts.freedesktop.org,
intel-wired-lan@...ts.osuosl.org,
Network Development <netdev@...r.kernel.org>,
linux-usb@...r.kernel.org,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>, dev@...nvswitch.org,
linux-kbuild <linux-kbuild@...r.kernel.org>,
linux-security-module <linux-security-module@...r.kernel.org>,
Kernel Hardening <kernel-hardening@...ts.openwall.com>,
Greg KH <gregkh@...uxfoundation.org>,
Jann Horn <jannh@...gle.com>,
William Kucharski <william.kucharski@...cle.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Edwin Zimmerman <edwin@...mainstreet.net>,
Matthew Wilcox <willy@...radead.org>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: Re: [PATCH 0/3] gcc-plugins: Introduce stackinit plugin
On Mon, Jan 28, 2019 at 4:12 PM Alexander Popov <alex.popov@...ux.com> wrote:
>
> On 23.01.2019 14:03, Kees Cook wrote:
> > This adds a new plugin "stackinit" that attempts to perform unconditional
> > initialization of all stack variables
>
> Hello Kees! Hello everyone!
>
> I was curious about the performance impact of the initialization of all stack
> variables. So I did a very brief test with this plugin on top of 4.20.5.
>
> hackbench on Intel Core i7-4770 showed ~0.7% slowdown.
> hackbench on Kirin 620 (ARM Cortex-A53 Octa-core 1.2GHz) showed ~1.3% slowdown.
Thanks for looking at this! I'll be including my hackbench
measurements for the v2 here in a moment.
> This test involves the kernel scheduler and allocator. I can't say whether they
> use stack aggressively. Maybe performance tests of other subsystems (e.g.
> network subsystem) can show different numbers. Did you try?
I haven't found a stable network test yet. If someone can find a
reasonable workload, I'd love to hear about it.
> I've heard a hypothesis that the initialization of all stack variables would
> pollute CPU caches, which is critical for some types of computations. Maybe some
> micro-benchmarks can disprove/confirm that?
I kind of think micro-benchmarks aren't so useful because they don't
represent a real-world workload. I've heard people talk about SAP-HANA
as a good test, but I can't get my hands on it. I wonder if anyone has
tried "mysqlslap"?
--
Kees Cook
Powered by blists - more mailing lists