]> git.baikalelectronics.ru Git - kernel.git/commit
lkdtm: Add tests for NULL pointer dereference
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 14 Dec 2018 15:26:20 +0000 (15:26 +0000)
committerKees Cook <keescook@chromium.org>
Wed, 9 Jan 2019 20:00:31 +0000 (12:00 -0800)
commitc1bf024c0bd08ce1ca621fa2268722fcd02b79d8
treef2de1d775529e2e3b4e57edf669356f2cbec6303
parentbf227782e73a7c277562d66ccc835ed973b8d189
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>
drivers/misc/lkdtm/core.c
drivers/misc/lkdtm/lkdtm.h
drivers/misc/lkdtm/perms.c