Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 680c43e3 authored by Michael Davidson's avatar Michael Davidson Committed by Shadab Naseem
Browse files

misc: lkdtm: Add volatile to intentional NULL pointer reference

Add a volatile qualifier where a NULL pointer is deliberately
dereferenced to trigger a panic.

Without the volatile qualifier clang will issue the following warning:
"indirection of non-volatile null pointer will be deleted,
not trap [-Wnull-dereference]" and replace the pointer reference
with a __builtin_trap() (which generates a ud2 instruction on x86_64).

Change-Id: I6ed1d723234c607eb33dc3ed0be23c093d8c835c
Link: https://lore.kernel.org/patchwork/patch/780024/


Signed-off-by: default avatarMichael Davidson <md@google.com>
Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 9e18308a5dcc2250a271e598dfe0d917b5522475
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarShadab Naseem <snaseem@codeaurora.org>
parent 3db62e09
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment