Print this page
11787 Kernel needs to be built with retpolines
11788 Kernel needs to generally use RSB stuffing
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: John Levon <john.levon@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/Makefile.uts
          +++ new/usr/src/uts/Makefile.uts
↓ open down ↓ 241 lines elided ↑ open up ↑
 242  242  SMOFF += sizeof
 243  243  
 244  244  #
 245  245  # Ensure that the standard function prologue remains at the very start
 246  246  # of a function, so DTrace fbt will instrument the right place.
 247  247  #
 248  248  CFLAGS_uts_i386 += -_gcc7=-fno-shrink-wrap
 249  249  CFLAGS_uts_i386 += -_gcc8=-fno-shrink-wrap
 250  250  CFLAGS_uts_i386 += -_gcc9=-fno-shrink-wrap
 251  251  
      252 +#
      253 +# retpoline support
      254 +#
      255 +CFLAGS_uts_i386 += -_gcc7=-mindirect-branch=thunk-extern
      256 +CFLAGS_uts_i386 += -_gcc7=-mindirect-branch-register
      257 +CFLAGS_uts_i386 += -_gcc8=-mindirect-branch=thunk-extern
      258 +CFLAGS_uts_i386 += -_gcc8=-mindirect-branch-register
      259 +CFLAGS_uts_i386 += -_gcc9=-mindirect-branch=thunk-extern
      260 +CFLAGS_uts_i386 += -_gcc9=-mindirect-branch-register
      261 +
 252  262  CSTD = $(CSTD_GNU99)
 253  263  
 254  264  CFLAGS_uts              =
 255  265  CFLAGS_uts              += $(STAND_FLAGS_$(CLASS))
 256  266  CFLAGS_uts              += $(CCVERBOSE)
 257  267  CFLAGS_uts              += $(ILDOFF)
 258  268  CFLAGS_uts              += $(XAOPT)
 259  269  CFLAGS_uts              += $(CTF_FLAGS_$(CLASS))
 260  270  CFLAGS_uts              += $(CERRWARN)
 261  271  CFLAGS_uts              += $(CCNOAUTOINLINE)
↓ open down ↓ 411 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX