Print this page
9059 Simplify SMAP relocations with krtld
Portions contributed by: John Levon <john.levon@joyent.com>

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