kernel: fix missing log tag (#117)
This commit is contained in:
@@ -2,11 +2,10 @@
|
|||||||
#include "linux/fs.h"
|
#include "linux/fs.h"
|
||||||
#include "linux/kernel.h"
|
#include "linux/kernel.h"
|
||||||
#include "linux/list.h"
|
#include "linux/list.h"
|
||||||
#include "linux/printk.h"
|
|
||||||
#include "linux/slab.h"
|
#include "linux/slab.h"
|
||||||
|
|
||||||
#include "selinux/selinux.h"
|
#include "selinux/selinux.h"
|
||||||
|
#include "klog.h" // IWYU pragma: keep
|
||||||
#define FILE_MAGIC 0x7f4b5355 // ' KSU', u32
|
#define FILE_MAGIC 0x7f4b5355 // ' KSU', u32
|
||||||
#define FILE_FORMAT_VERSION 1 // u32
|
#define FILE_FORMAT_VERSION 1 // u32
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "linux/moduleparam.h"
|
#include "linux/moduleparam.h"
|
||||||
|
|
||||||
#include "apk_sign.h"
|
#include "apk_sign.h"
|
||||||
|
#include "klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
static __always_inline int
|
static __always_inline int
|
||||||
check_v2_signature(char *path, unsigned expected_size, unsigned expected_hash)
|
check_v2_signature(char *path, unsigned expected_size, unsigned expected_hash)
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "linux/kernel.h"
|
#include "linux/kernel.h"
|
||||||
#include "linux/kprobes.h"
|
#include "linux/kprobes.h"
|
||||||
#include "linux/lsm_hooks.h"
|
#include "linux/lsm_hooks.h"
|
||||||
#include "linux/printk.h"
|
|
||||||
#include "linux/uaccess.h"
|
#include "linux/uaccess.h"
|
||||||
#include "linux/uidgid.h"
|
#include "linux/uidgid.h"
|
||||||
#include "linux/version.h"
|
#include "linux/version.h"
|
||||||
@@ -20,6 +19,7 @@
|
|||||||
#include "manager.h"
|
#include "manager.h"
|
||||||
#include "selinux/selinux.h"
|
#include "selinux/selinux.h"
|
||||||
#include "uid_observer.h"
|
#include "uid_observer.h"
|
||||||
|
#include "klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
static inline bool is_allow_su()
|
static inline bool is_allow_su()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#ifndef __KSU_H_KLOG
|
#ifndef __KSU_H_KLOG
|
||||||
#define __KSU_H_KLOG
|
#define __KSU_H_KLOG
|
||||||
|
|
||||||
|
#include <linux/printk.h>
|
||||||
|
|
||||||
#ifdef pr_fmt
|
#ifdef pr_fmt
|
||||||
#undef pr_fmt
|
#undef pr_fmt
|
||||||
#define pr_fmt(fmt) "KernelSU: " fmt
|
#define pr_fmt(fmt) "KernelSU: " fmt
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "core_hook.h"
|
#include "core_hook.h"
|
||||||
#include "ksu.h"
|
#include "ksu.h"
|
||||||
#include "uid_observer.h"
|
#include "uid_observer.h"
|
||||||
|
#include "klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
static struct workqueue_struct *ksu_workqueue;
|
static struct workqueue_struct *ksu_workqueue;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "linux/err.h"
|
#include "linux/err.h"
|
||||||
#include "linux/fs.h"
|
#include "linux/fs.h"
|
||||||
#include "linux/kprobes.h"
|
#include "linux/kprobes.h"
|
||||||
#include "linux/printk.h"
|
|
||||||
#include "linux/types.h"
|
#include "linux/types.h"
|
||||||
#include "linux/uaccess.h"
|
#include "linux/uaccess.h"
|
||||||
#include "linux/version.h"
|
#include "linux/version.h"
|
||||||
@@ -13,6 +12,7 @@
|
|||||||
#include "allowlist.h"
|
#include "allowlist.h"
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
#include "selinux/selinux.h"
|
#include "selinux/selinux.h"
|
||||||
|
#include "klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
static const char KERNEL_SU_RC[] =
|
static const char KERNEL_SU_RC[] =
|
||||||
"\n"
|
"\n"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "linux/cred.h"
|
#include "linux/cred.h"
|
||||||
#include "linux/gfp.h"
|
#include "linux/gfp.h"
|
||||||
#include "linux/printk.h"
|
|
||||||
#include "linux/slab.h"
|
#include "linux/slab.h"
|
||||||
#include "linux/uidgid.h"
|
#include "linux/uidgid.h"
|
||||||
#include "linux/version.h"
|
#include "linux/version.h"
|
||||||
@@ -12,6 +11,7 @@
|
|||||||
#include "apk_sign.h"
|
#include "apk_sign.h"
|
||||||
#include "ksu.h"
|
#include "ksu.h"
|
||||||
#include "manager.h"
|
#include "manager.h"
|
||||||
|
#include "klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
uid_t ksu_manager_uid = INVALID_UID;
|
uid_t ksu_manager_uid = INVALID_UID;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "selinux.h"
|
#include "selinux.h"
|
||||||
#include "sepolicy.h"
|
#include "sepolicy.h"
|
||||||
#include "ss/services.h"
|
#include "ss/services.h"
|
||||||
|
#include "../klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
||||||
#define SELINUX_POLICY_INSTEAD_SELINUX_SS
|
#define SELINUX_POLICY_INSTEAD_SELINUX_SS
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#include "linux/printk.h"
|
|
||||||
|
|
||||||
#include "objsec.h"
|
#include "objsec.h"
|
||||||
#include "selinux.h"
|
#include "selinux.h"
|
||||||
|
|
||||||
|
#include "../klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#define KERNEL_SU_DOMAIN "u:r:su:s0"
|
#define KERNEL_SU_DOMAIN "u:r:su:s0"
|
||||||
|
|
||||||
static u32 ksu_sid;
|
static u32 ksu_sid;
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
#include "sepolicy.h"
|
#include "sepolicy.h"
|
||||||
#include "linux/gfp.h"
|
#include "linux/gfp.h"
|
||||||
#include "linux/printk.h"
|
|
||||||
#include "linux/slab.h"
|
#include "linux/slab.h"
|
||||||
#include "linux/version.h"
|
#include "linux/version.h"
|
||||||
|
|
||||||
|
#include "../klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
||||||
// TODO: backport to lower kernel
|
// TODO: backport to lower kernel
|
||||||
#define KSU_SUPPORT_ADD_TYPE
|
#define KSU_SUPPORT_ADD_TYPE
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include "linux/err.h"
|
#include "linux/err.h"
|
||||||
#include "linux/fs.h"
|
#include "linux/fs.h"
|
||||||
#include "linux/kprobes.h"
|
#include "linux/kprobes.h"
|
||||||
#include "linux/printk.h"
|
|
||||||
#include "linux/types.h"
|
#include "linux/types.h"
|
||||||
#include "linux/uaccess.h"
|
#include "linux/uaccess.h"
|
||||||
#include "linux/version.h"
|
#include "linux/version.h"
|
||||||
@@ -15,6 +14,7 @@
|
|||||||
|
|
||||||
#include "allowlist.h"
|
#include "allowlist.h"
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
|
#include "klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#define SU_PATH "/system/bin/su"
|
#define SU_PATH "/system/bin/su"
|
||||||
#define SH_PATH "/system/bin/sh"
|
#define SH_PATH "/system/bin/sh"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "ksu.h"
|
#include "ksu.h"
|
||||||
#include "manager.h"
|
#include "manager.h"
|
||||||
#include "uid_observer.h"
|
#include "uid_observer.h"
|
||||||
|
#include "klog.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#define SYSTEM_PACKAGES_LIST_PATH "/data/system/packages.list"
|
#define SYSTEM_PACKAGES_LIST_PATH "/data/system/packages.list"
|
||||||
static struct work_struct ksu_update_uid_work;
|
static struct work_struct ksu_update_uid_work;
|
||||||
|
|||||||
Reference in New Issue
Block a user