summaryrefslogtreecommitdiff
path: root/arch/x86/vdso/vdso2c.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2014-08-08 16:22:15 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2014-08-08 16:22:15 +1000
commitc39eb7727ca46d1819b66ccb4518376c9f38f568 (patch)
tree7dc3b374d1433c72514634a3969515e2c87f7e96 /arch/x86/vdso/vdso2c.h
parent9028bb948d3c3a5bfd5c4c66854a34f9a0d3c59d (diff)
parentfe6140d1e45157761c950abdbab3e9c1777b1e44 (diff)
Merge branch 'akpm/master'
Diffstat (limited to 'arch/x86/vdso/vdso2c.h')
-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,
/* Validate mapping addresses. */
for (i = 0; i < sizeof(special_pages) / sizeof(special_pages[0]); i++) {
- if (!syms[i])
+ INT_BITS symval = syms[special_pages[i]];
+
+ if (!symval)
continue; /* The mapping isn't used; ignore it. */
- if (syms[i] % 4096)
+ if (symval % 4096)
fail("%s must be a multiple of 4096\n",
required_syms[i].name);
- if (syms[sym_vvar_start] > syms[i] + 4096)
- fail("%s underruns begin_vvar\n",
+ if (symval + 4096 < syms[sym_vvar_start])
+ fail("%s underruns vvar_start\n",
required_syms[i].name);
- if (syms[i] + 4096 > 0)
+ if (symval + 4096 > 0)
fail("%s is on the wrong side of the vdso text\n",
required_syms[i].name);
}