1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 13:10:29 +03:00
mobile-nixos/devices/asus-z00t/kernel/0001-Revert-qmp-sphinx-Add-Qualcomm-Malware-Protection-ke.patch
Samuel Dionne-Riel fb79113a00 asus-z00t: Fixes compilation with USER_NS
This is dumb... These are all android/google/qualcomm/asus "features"
added to the kernel with no concern about actually being compatible
with the kernel. They all assume no USER_NS stuff.

Fun!
2019-10-09 22:12:48 -04:00

81 lines
2.2 KiB
Diff

From c6dd0ab43f56b292d1c20ffa0154d238f90444c0 Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Wed, 9 Oct 2019 20:41:09 -0400
Subject: [PATCH] Revert "qmp: sphinx: Add Qualcomm Malware Protection kernel
instrumentation"
This reverts commit 3c77a990d0ce566b354b367824d1bf423617351c.
This breaks the kernel build in some situations, for a feature that is
undoubtedly useless to us, and already disabled.
---
fs/proc/base.c | 7 -------
net/socket.c | 5 -----
2 files changed, 12 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 77fd2d4226f..870abad7717 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -87,7 +87,6 @@
#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
@@ -968,9 +967,6 @@ 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;
@@ -1103,9 +1099,6 @@ 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;
diff --git a/net/socket.c b/net/socket.c
index 0e9f6dddb2a..a1cb73b83b0 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -88,7 +88,6 @@
#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>
@@ -1793,8 +1792,6 @@ 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;
if (unlikely(!access_ok(VERIFY_READ, buff, len)))
@@ -1856,8 +1853,6 @@ 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;
if (unlikely(!access_ok(VERIFY_WRITE, ubuf, size)))
--
2.23.0