mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 00:46:47 +07:00
f85612967c
The hooks that we modify are: - Page fault handler (to handle kmemcheck faults) - Debug exception handler (to hide pages after single-stepping the instruction that caused the page fault) Also redefine memset() to use the optimized version if kmemcheck is enabled. (Thanks to Pekka Enberg for minimizing the impact on the page fault handler.) As kmemcheck doesn't handle MMX/SSE instructions (yet), we also disable the optimized xor code, and rely instead on the generic C implementation in order to avoid false-positive warnings. Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no> [whitespace fixlet] Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no>
11 lines
200 B
C
11 lines
200 B
C
#ifdef CONFIG_KMEMCHECK
|
|
/* kmemcheck doesn't handle MMX/SSE/SSE2 instructions */
|
|
# include <asm-generic/xor.h>
|
|
#else
|
|
#ifdef CONFIG_X86_32
|
|
# include "xor_32.h"
|
|
#else
|
|
# include "xor_64.h"
|
|
#endif
|
|
#endif
|