Print this page
8956 Implement KPTI
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
*** 21,31 ****
/*
* Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/*
! * Copyright (c) 2016, Joyent, Inc. All rights reserved.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
--- 21,31 ----
/*
* Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/*
! * Copyright (c) 2018 Joyent, Inc.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
*** 1184,1194 ****
movq %rdi, %r12
call dtrace_instr_size
addq %rax, %r12
movq %r12, REGOFF_RIP(%rbp)
INTR_POP
! IRET
/*NOTREACHED*/
3:
leaq dtrace_badflags(%rip), %rdi
xorl %eax, %eax
call panic
--- 1184,1194 ----
movq %rdi, %r12
call dtrace_instr_size
addq %rax, %r12
movq %r12, REGOFF_RIP(%rbp)
INTR_POP
! jmp tr_iret_auto
/*NOTREACHED*/
3:
leaq dtrace_badflags(%rip), %rdi
xorl %eax, %eax
call panic
*** 1597,1616 ****
/*
* Return to 32-bit userland
*/
ALTENTRY(sys_rtt_syscall32)
USER32_POP
! IRET
/*NOTREACHED*/
ALTENTRY(sys_rtt_syscall)
/*
* Return to 64-bit userland
*/
USER_POP
ALTENTRY(nopop_sys_rtt_syscall)
! IRET
/*NOTREACHED*/
SET_SIZE(nopop_sys_rtt_syscall)
/*
* Return to supervisor
--- 1597,1616 ----
/*
* Return to 32-bit userland
*/
ALTENTRY(sys_rtt_syscall32)
USER32_POP
! jmp tr_iret_user
/*NOTREACHED*/
ALTENTRY(sys_rtt_syscall)
/*
* Return to 64-bit userland
*/
USER_POP
ALTENTRY(nopop_sys_rtt_syscall)
! jmp tr_iret_user
/*NOTREACHED*/
SET_SIZE(nopop_sys_rtt_syscall)
/*
* Return to supervisor
*** 1621,1631 ****
ALTENTRY(sr_sup)
/*
* Restore regs before doing iretq to kernel mode
*/
INTR_POP
! IRET
.globl _sys_rtt_end
_sys_rtt_end:
/*NOTREACHED*/
SET_SIZE(sr_sup)
SET_SIZE(_sys_rtt_end)
--- 1621,1631 ----
ALTENTRY(sr_sup)
/*
* Restore regs before doing iretq to kernel mode
*/
INTR_POP
! jmp tr_iret_kernel
.globl _sys_rtt_end
_sys_rtt_end:
/*NOTREACHED*/
SET_SIZE(sr_sup)
SET_SIZE(_sys_rtt_end)