aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/asm.h1
-rw-r--r--arch/x86/lib/kaslr.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h
index 7acb51c49fec..7a9df3beb89b 100644
--- a/arch/x86/include/asm/asm.h
+++ b/arch/x86/include/asm/asm.h
@@ -32,6 +32,7 @@
32#define _ASM_ADD __ASM_SIZE(add) 32#define _ASM_ADD __ASM_SIZE(add)
33#define _ASM_SUB __ASM_SIZE(sub) 33#define _ASM_SUB __ASM_SIZE(sub)
34#define _ASM_XADD __ASM_SIZE(xadd) 34#define _ASM_XADD __ASM_SIZE(xadd)
35#define _ASM_MUL __ASM_SIZE(mul)
35 36
36#define _ASM_AX __ASM_REG(ax) 37#define _ASM_AX __ASM_REG(ax)
37#define _ASM_BX __ASM_REG(bx) 38#define _ASM_BX __ASM_REG(bx)
diff --git a/arch/x86/lib/kaslr.c b/arch/x86/lib/kaslr.c
index 5761a4f19455..ab2d1d73e9e7 100644
--- a/arch/x86/lib/kaslr.c
+++ b/arch/x86/lib/kaslr.c
@@ -5,6 +5,7 @@
5 * kernel starts. This file is included in the compressed kernel and 5 * kernel starts. This file is included in the compressed kernel and
6 * normally linked in the regular. 6 * normally linked in the regular.
7 */ 7 */
8#include <asm/asm.h>
8#include <asm/kaslr.h> 9#include <asm/kaslr.h>
9#include <asm/msr.h> 10#include <asm/msr.h>
10#include <asm/archrandom.h> 11#include <asm/archrandom.h>
@@ -79,7 +80,7 @@ unsigned long kaslr_get_random_long(const char *purpose)
79 } 80 }
80 81
81 /* Circular multiply for better bit diffusion */ 82 /* Circular multiply for better bit diffusion */
82 asm("mul %3" 83 asm(_ASM_MUL "%3"
83 : "=a" (random), "=d" (raw) 84 : "=a" (random), "=d" (raw)
84 : "a" (random), "rm" (mix_const)); 85 : "a" (random), "rm" (mix_const));
85 random += raw; 86 random += raw;