mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
1957a85b00
commit
b602614a81
2 changed files with 9 additions and 4 deletions
|
|
@ -548,11 +548,12 @@ static int open_kcore(struct inode *inode, struct file *filp)
|
|||
{
|
||||
int ret = security_locked_down(LOCKDOWN_KCORE);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
if (!capable(CAP_SYS_RAWIO))
|
||||
return -EPERM;
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
filp->private_data = kmalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
if (!filp->private_data)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in a new issue