lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2444a44091ae292166c6cad1e31fd85ed2b77fe7.camel@redhat.com>
Date:   Sun, 16 Dec 2018 19:55:40 +0100
From:   Paolo Abeni <pabeni@...hat.com>
To:     David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, eric.dumazet@...il.com, pjt@...gle.com,
        linux-kernel@...r.kernel.org, ecree@...arflare.com,
        dwmw2@...radead.org
Subject: Re: [PATCH net-next v3 0/4] net: mitigate retpoline overhead

On Sat, 2018-12-15 at 13:23 -0800, David Miller wrote:
> From: Paolo Abeni <pabeni@...hat.com>
> Date: Fri, 14 Dec 2018 11:51:56 +0100
> 
> > The spectre v2 counter-measures, aka retpolines, are a source of measurable
> > overhead[1]. We can partially address that when the function pointer refers to
> > a builtin symbol resorting to a list of tests vs well-known builtin function and
> > direct calls.
> > 
> > Experimental results show that replacing a single indirect call via
> > retpoline with several branches and a direct call gives performance gains
> > even when multiple branches are added - 5 or more, as reported in [2].
> > 
> > This may lead to some uglification around the indirect calls. In netconf 2018
> > Eric Dumazet described a technique to hide the most relevant part of the needed
> > boilerplate with some macro help.
> > 
> > This series is a [re-]implementation of such idea, exposing the introduced
> > helpers in a new header file. They are later leveraged to avoid the indirect
> > call overhead in the GRO path, when possible.
> > 
> > Overall this gives > 10% performance improvement for UDP GRO benchmark and
> > smaller but measurable for TCP syn flood.
> > 
> > The added infra can be used in follow-up patches to cope with retpoline overhead
> > in other points of the networking stack (e.g. at the qdisc layer) and possibly
> > even in other subsystems.
>  ...
> 
> Series applied, I'll push this out after a build check completes.

Again, I messed it! I'm really sorry to waste everybody's time.
I was unable to give proper coverage with different configs. I tested
vs.:

CONFIG_IPV6=ymn
CONFIG_INET=yn

but

# CONFIG_RETPOLINE is not set

fooled me. The following patch should fix. I'll try more
configurations. Is there any way to try/tests all kbuild robot configs?

Please feel free to give me an hard stop if this sounds too much a
trial and error thing.

Paolo

--
diff --git a/include/linux/indirect_call_wrapper.h b/include/linux/indirect_call_wrapper.h
index 7c8b7f4..00d7e8e9 100644
--- a/include/linux/indirect_call_wrapper.h
+++ b/include/linux/indirect_call_wrapper.h
@@ -28,8 +28,8 @@
 #define INDIRECT_CALLABLE_SCOPE
 
 #else
-#define INDIRECT_CALL_1(f, name, ...) f(__VA_ARGS__)
-#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
+#define INDIRECT_CALL_1(f, f1, ...) f(__VA_ARGS__)
+#define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
 #define INDIRECT_CALLABLE_DECLARE(f)
 #define INDIRECT_CALLABLE_SCOPE                static
 #endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ