summaryrefslogtreecommitdiffstats
path: root/drivers/misc/lkdtm/lkdtm.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2018-12-14 15:26:20 +0000
committerKees Cook <keescook@chromium.org>2019-01-09 12:00:31 -0800
commit59a12205d3c32aee4c13ca36889fdf7cfed31126 (patch)
treef2de1d775529e2e3b4e57edf669356f2cbec6303 /drivers/misc/lkdtm/lkdtm.h
parent4c411157a42f122051ae3469bee0b5cabe89e139 (diff)
downloadlinux-59a12205d3c32aee4c13ca36889fdf7cfed31126.tar.bz2
lkdtm: Add tests for NULL pointer dereference
Introduce lkdtm tests for NULL pointer dereference: check access or exec at NULL address, since these errors tend to be reported differently from the general fault error text. For example from x86: pr_alert("BUG: unable to handle kernel %s at %px\n", address < PAGE_SIZE ? "NULL pointer dereference" : "paging request", (void *)address); Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/misc/lkdtm/lkdtm.h')
-rw-r--r--drivers/misc/lkdtm/lkdtm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm/lkdtm.h b/drivers/misc/lkdtm/lkdtm.h
index 3c6fd327e166..b69ee004a3f7 100644
--- a/drivers/misc/lkdtm/lkdtm.h
+++ b/drivers/misc/lkdtm/lkdtm.h
@@ -45,7 +45,9 @@ void lkdtm_EXEC_KMALLOC(void);
void lkdtm_EXEC_VMALLOC(void);
void lkdtm_EXEC_RODATA(void);
void lkdtm_EXEC_USERSPACE(void);
+void lkdtm_EXEC_NULL(void);
void lkdtm_ACCESS_USERSPACE(void);
+void lkdtm_ACCESS_NULL(void);
/* lkdtm_refcount.c */
void lkdtm_REFCOUNT_INC_OVERFLOW(void);