Print this page
10908 Simplify SMAP relocations with krtld

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/sys/archsystm.h
          +++ new/usr/src/uts/intel/sys/archsystm.h
↓ open down ↓ 177 lines elided ↑ open up ↑
 178  178  extern void av_dispatch_softvect(uint_t);
 179  179  extern void av_dispatch_autovect(uint_t);
 180  180  extern uint_t atomic_btr32(uint32_t *, uint_t);
 181  181  extern uint_t bsrw_insn(uint16_t);
 182  182  extern int sys_rtt_common(struct regs *);
 183  183  extern void fakesoftint(void);
 184  184  
 185  185  extern void *plat_traceback(void *);
 186  186  
 187  187  /*
 188      - * The following two macros are the four byte instruction sequence of stac, ret
 189      - * and clac, ret. These are used in startup_smap() as a part of properly setting
 190      - * up the valid instructions. For more information on SMAP, see
 191      - * uts/intel/ia32/ml/copy.s.
      188 + * The following two macros are the four byte instruction sequence of stac, nop
      189 + * and clac, nop. These are used in startup_smap() and hotinline_smap() as a
      190 + * part of properly setting up the valid instructions. For more information on
      191 + * SMAP, see uts/intel/ia32/ml/copy.s, uts/i86pc/os/machdep.c and
      192 + * uts/common/os/modctl.c.
      193 + *
      194 + * Note that smap_disable and smap_enable are resolved to stubs at compile time,
      195 + * but inlined at runtime by do_hotinlines() in uts/i86pc/os/machdep.c.
 192  196   */
 193      -#define SMAP_CLAC_INSTR 0xc3ca010f
 194      -#define SMAP_STAC_INSTR 0xc3cb010f
      197 +#define SMAP_CLAC_INSTR 0x90ca010f
      198 +#define SMAP_STAC_INSTR 0x90cb010f
 195  199  extern void smap_disable(void);
 196  200  extern void smap_enable(void);
 197  201  
 198  202  #if defined(__xpv)
 199  203  extern void xen_init_callbacks(void);
 200  204  extern void xen_set_callback(void (*)(void), uint_t, uint_t);
 201  205  extern void xen_printf(const char *, ...);
 202  206  #define cpr_dprintf xen_printf
 203  207  extern int xpv_panicking;
 204  208  #define IN_XPV_PANIC() (xpv_panicking > 0)
↓ open down ↓ 24 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX