qmp: sphinx: Add Qualcomm Malware Protection kernel instrumentation
The kernel instrumentation for Sphinx is added as a seperate commit. Change-Id: I533e3f3f694165358d6756f1b8e18cbb09232c1c Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
This commit is contained in:
parent
06583ee780
commit
3c77a990d0
|
@ -87,6 +87,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/flex_array.h>
|
||||
#include <linux/posix-timers.h>
|
||||
#include <linux/qmp_sphinx_instrumentation.h>
|
||||
#ifdef CONFIG_HARDWALL
|
||||
#include <asm/hardwall.h>
|
||||
#endif
|
||||
|
@ -966,6 +967,9 @@ static ssize_t oom_adj_write(struct file *file, const char __user *buf,
|
|||
goto out;
|
||||
}
|
||||
|
||||
qmp_sphinx_logk_oom_adjust_write(task->pid,
|
||||
task->cred->uid, oom_adj);
|
||||
|
||||
task_lock(task);
|
||||
if (!task->mm) {
|
||||
err = -EINVAL;
|
||||
|
@ -1098,6 +1102,9 @@ static ssize_t oom_score_adj_write(struct file *file, const char __user *buf,
|
|||
goto out;
|
||||
}
|
||||
|
||||
qmp_sphinx_logk_oom_adjust_write(task->pid,
|
||||
task->cred->uid, oom_score_adj);
|
||||
|
||||
task_lock(task);
|
||||
if (!task->mm) {
|
||||
err = -EINVAL;
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
#include <linux/magic.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/xattr.h>
|
||||
#include <linux/qmp_sphinx_instrumentation.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/unistd.h>
|
||||
|
@ -1782,6 +1783,8 @@ SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len,
|
|||
struct iovec iov;
|
||||
int fput_needed;
|
||||
|
||||
qmp_sphinx_logk_sendto(fd, buff, len, flags, addr, addr_len);
|
||||
|
||||
if (len > INT_MAX)
|
||||
len = INT_MAX;
|
||||
sock = sockfd_lookup_light(fd, &err, &fput_needed);
|
||||
|
@ -1841,6 +1844,8 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
|
|||
int err, err2;
|
||||
int fput_needed;
|
||||
|
||||
qmp_sphinx_logk_recvfrom(fd, ubuf, size, flags, addr, addr_len);
|
||||
|
||||
if (size > INT_MAX)
|
||||
size = INT_MAX;
|
||||
sock = sockfd_lookup_light(fd, &err, &fput_needed);
|
||||
|
|
Loading…
Reference in New Issue