git: kernel - Implement retpoline for kernel

Matthew Dillon dillon at crater.dragonflybsd.org
Thu May 16 11:14:56 PDT 2019


commit d4e0b0cdf7ba6c17a511731dd6a2abfd96516cbb
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu May 16 11:11:35 2019 -0700

    kernel - Implement retpoline for kernel
    
    * Now that we have gcc-8 operational, we can turn on retpoline (software
      spectre protection against the return stack buffer).  Turn it on via
      -mindirect-branch=thunk-inline
    
    * No discernable performance loss with a generic buildkernel test:
    
    				Xeon e5-2620v4 x 2
                            time make -j 32 nativekernel (all tmpfs)
    BEFORE 1717.427u 323.662s 2:28.49 1374.5%      9582+721k 200842+0io 4870pf+0w
    BEFORE 1720.130u 338.635s 2:30.21 1370.5%      9555+720k 199720+0io 4804pf+0w
    BEFORE 1722.395u 341.508s 2:30.71 1369.4%      9559+720k 199720+0io 4804pf+0w
    
    AFTER  1720.271u 329.492s 2:28.27 1382.4%      9578+721k 200842+0io 4870pf+0w
    AFTER  1736.268u 344.874s 2:30.90 1379.1%      9555+720k 199720+0io 4804pf+0w
    AFTER  1726.056u 348.324s 2:31.14 1372.4%      9543+719k 199720+0io 4804pf+0w

Summary of changes:
 sys/platform/pc64/conf/kern.mk      | 4 ++++
 sys/platform/vkernel64/conf/kern.mk | 8 ++++++++
 2 files changed, 12 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d4e0b0cdf7ba6c17a511731dd6a2abfd96516cbb


-- 
DragonFly BSD source repository



More information about the Commits mailing list