lockdown: Print current->comm in restriction messages
authorMatthew Garrett <matthewgarrett@google.com>
Tue, 20 Aug 2019 00:18:05 +0000 (17:18 -0700)
committerJames Morris <jmorris@namei.org>
Tue, 20 Aug 2019 04:54:17 +0000 (21:54 -0700)
commitb602614a81078bf29c82b2671bb96a63488f68d6
treeeb83d8f6461eeff1bd51eda39267ab0f523bd5f8
parent1957a85b0032a81e6482ca4aab883643b8dae06e
lockdown: Print current->comm in restriction messages

Print the content of current->comm in messages generated by lockdown to
indicate a restriction that was hit.  This makes it a bit easier to find
out what caused the message.

The message now patterned something like:

        Lockdown: <comm>: <what> is restricted; see man kernel_lockdown.7

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Matthew Garrett <mjg59@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <jmorris@namei.org>
fs/proc/kcore.c
security/lockdown/lockdown.c