Commit 2dc559c8 authored by Russell King's avatar Russell King

[ARM] Add security framework hooks (ptrace and syscall)

parent b8d99b4c
......@@ -237,7 +237,7 @@ __syscall_start:
/* 220 */ .long sys_madvise
.long sys_fcntl64
.long sys_ni_syscall /* TUX */
.long sys_ni_syscall /* Security */
.long sys_security
.long sys_gettid
/* 225 */ .long sys_readahead
.long sys_setxattr
......
......@@ -17,6 +17,7 @@
#include <linux/smp_lock.h>
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/security.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
......@@ -655,6 +656,9 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
/* are we already being traced? */
if (current->ptrace & PT_PTRACED)
goto out;
ret = security_ops->ptrace(current->parent, current);
if (ret)
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment