diff options
author | Vegard Nossum <vegard.nossum@gmail.com> | 2009-02-27 11:35:55 +0100 |
---|---|---|
committer | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 15:49:22 +0200 |
commit | ac61a7579625ddfca3b2e0aa298879a94d15884d (patch) | |
tree | adb11c2513bfdb4825e1ac213f8116d7280ac4a9 /arch/x86/mm/kmemcheck/selftest.h | |
parent | eb63657e1314ae4af5e19a61db8dc1b6e935775a (diff) | |
download | op-kernel-dev-ac61a7579625ddfca3b2e0aa298879a94d15884d.zip op-kernel-dev-ac61a7579625ddfca3b2e0aa298879a94d15884d.tar.gz |
kmemcheck: add opcode self-testing at boot
We've had some troubles in the past with weird instructions. This
patch adds a self-test framework which can be used to verify that
a certain set of opcodes are decoded correctly. Of course, the
opcodes which are not tested can still give the wrong results.
In short, this is just a safeguard to catch unintentional changes
in the opcode decoder. It does not mean that errors can't still
occur!
[rebased for mainline inclusion]
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Diffstat (limited to 'arch/x86/mm/kmemcheck/selftest.h')
-rw-r--r-- | arch/x86/mm/kmemcheck/selftest.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/mm/kmemcheck/selftest.h b/arch/x86/mm/kmemcheck/selftest.h new file mode 100644 index 0000000..8fed4fe --- /dev/null +++ b/arch/x86/mm/kmemcheck/selftest.h @@ -0,0 +1,6 @@ +#ifndef ARCH_X86_MM_KMEMCHECK_SELFTEST_H +#define ARCH_X86_MM_KMEMCHECK_SELFTEST_H + +bool kmemcheck_selftest(void); + +#endif |