aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/vdso/vdso2c.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/x86/vdso/vdso2c.h b/arch/x86/vdso/vdso2c.h
index fd57829b30d8..0224987556ce 100644
--- a/arch/x86/vdso/vdso2c.h
+++ b/arch/x86/vdso/vdso2c.h
@@ -109,16 +109,18 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
109 109
110 /* Validate mapping addresses. */ 110 /* Validate mapping addresses. */
111 for (i = 0; i < sizeof(special_pages) / sizeof(special_pages[0]); i++) { 111 for (i = 0; i < sizeof(special_pages) / sizeof(special_pages[0]); i++) {
112 if (!syms[i]) 112 INT_BITS symval = syms[special_pages[i]];
113
114 if (!symval)
113 continue; /* The mapping isn't used; ignore it. */ 115 continue; /* The mapping isn't used; ignore it. */
114 116
115 if (syms[i] % 4096) 117 if (symval % 4096)
116 fail("%s must be a multiple of 4096\n", 118 fail("%s must be a multiple of 4096\n",
117 required_syms[i].name); 119 required_syms[i].name);
118 if (syms[sym_vvar_start] > syms[i] + 4096) 120 if (symval + 4096 < syms[sym_vvar_start])
119 fail("%s underruns begin_vvar\n", 121 fail("%s underruns vvar_start\n",
120 required_syms[i].name); 122 required_syms[i].name);
121 if (syms[i] + 4096 > 0) 123 if (symval + 4096 > 0)
122 fail("%s is on the wrong side of the vdso text\n", 124 fail("%s is on the wrong side of the vdso text\n",
123 required_syms[i].name); 125 required_syms[i].name);
124 } 126 }