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>
@@ -22,10 +22,14 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
#include <sys/asm_linkage.h>
#ifndef __xpv
#include <sys/xpv_support.h>
#endif
#include <sys/hypervisor.h>
@@ -162,11 +166,11 @@
.size hypercall_page, HYPERCALL_PAGESIZE
#if defined(__amd64)
#define TRAP_INSTR \
shll $5, %eax; \
addq $hypercall_page, %rax; \
- jmp *%rax
+ INDIRECT_JMP_REG(rax);
#else
#define TRAP_INSTR \
shll $5, %eax; \
addl $hypercall_page, %eax; \
call *%eax